Skip to content

Commit 77c3bfa

Browse files
committed
std: Remove cfg(cargobuild) annotations
These are all now no longer needed that we've only got rustbuild in tree.
1 parent ce4abc3 commit 77c3bfa

File tree

25 files changed

+7
-205
lines changed

25 files changed

+7
-205
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,6 @@ system internals, try asking in [`#rust-internals`][pound-rust-internals].
9393

9494
[bootstrap]: https://github.com/rust-lang/rust/tree/master/src/bootstrap/
9595

96-
> **Note**: the build system was recently rewritten from a jungle of makefiles
97-
> to the current incarnation you'll see in `src/bootstrap`. If you experience
98-
> bugs you can temporarily revert back to the makefiles with
99-
> `--disable-rustbuild` passed to `./configure`.
100-
10196
### Configuration
10297

10398
Before you can start building the compiler you need to configure the build for

src/liballoc_jemalloc/build.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ use std::process::Command;
2121
use build_helper::{run, rerun_if_changed_anything_in_dir, up_to_date};
2222

2323
fn main() {
24-
println!("cargo:rustc-cfg=cargobuild");
2524
println!("cargo:rerun-if-changed=build.rs");
2625

2726
// FIXME: This is a hack to support building targets that don't

src/liballoc_jemalloc/lib.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,6 @@ pub use imp::*;
3030
mod imp {
3131
use libc::{c_int, c_void, size_t};
3232

33-
// Linkage directives to pull in jemalloc and its dependencies.
34-
//
35-
// On some platforms we need to be sure to link in `pthread` which jemalloc
36-
// depends on, and specifically on android we need to also link to libgcc.
37-
// Currently jemalloc is compiled with gcc which will generate calls to
38-
// intrinsics that are libgcc specific (e.g. those intrinsics aren't present in
39-
// libcompiler-rt), so link that in to get that support.
40-
#[link(name = "jemalloc", kind = "static")]
41-
#[cfg_attr(target_os = "android", link(name = "gcc"))]
42-
#[cfg_attr(all(not(windows),
43-
not(target_os = "android"),
44-
not(target_env = "musl")),
45-
link(name = "pthread"))]
46-
#[cfg(not(cargobuild))]
47-
extern "C" {}
48-
4933
// Note that the symbols here are prefixed by default on OSX and Windows (we
5034
// don't explicitly request it), and on Android and DragonFly we explicitly
5135
// request it as unprefixing cause segfaults (mismatches in allocators).

src/libflate/build.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
extern crate gcc;
1212

1313
fn main() {
14-
println!("cargo:rustc-cfg=cargobuild");
1514
gcc::Config::new()
1615
.file("../rt/miniz.c")
1716
.compile("libminiz.a");

src/libflate/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@ impl Drop for Bytes {
7474
}
7575
}
7676

77-
#[link(name = "miniz", kind = "static")]
78-
#[cfg(not(cargobuild))]
79-
extern "C" {}
80-
8177
extern "C" {
8278
/// Raw miniz compression function.
8379
fn tdefl_compress_mem_to_heap(psrc_buf: *const c_void,

src/libpanic_unwind/gcc.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,10 +301,6 @@ unsafe extern "C" fn rust_eh_unwind_resume(panic_ctx: *mut u8) -> ! {
301301
// with any GCC runtime.
302302
#[cfg(all(target_os="windows", target_arch = "x86", target_env="gnu"))]
303303
pub mod eh_frame_registry {
304-
#[link(name = "gcc_eh")]
305-
#[cfg(not(cargobuild))]
306-
extern "C" {}
307-
308304
extern "C" {
309305
fn __register_frame_info(eh_frame_begin: *const u8, object: *mut u8);
310306
fn __deregister_frame_info(eh_frame_begin: *const u8, object: *mut u8);

src/librustc_llvm/build.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ fn detect_llvm_link(llvm_config: &Path) -> (&'static str, Option<&'static str>)
4747
}
4848

4949
fn main() {
50-
println!("cargo:rustc-cfg=cargobuild");
51-
5250
let target = env::var("TARGET").expect("TARGET was not set");
5351
let llvm_config = env::var_os("LLVM_CONFIG")
5452
.map(PathBuf::from)

src/librustc_llvm/lib.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -422,13 +422,3 @@ impl Drop for OperandBundleDef {
422422
}
423423
}
424424
}
425-
426-
// The module containing the native LLVM dependencies, generated by the build system
427-
// Note that this must come after the rustllvm extern declaration so that
428-
// parts of LLVM that rustllvm depends on aren't thrown away by the linker.
429-
// Works to the above fix for #15460 to ensure LLVM dependencies that
430-
// are only used by rustllvm don't get stripped by the linker.
431-
#[cfg(not(cargobuild))]
432-
mod llvmdeps {
433-
include! { env!("CFG_LLVM_LINKAGE_FILE") }
434-
}

src/librustdoc/build.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
extern crate gcc;
1212

1313
fn main() {
14-
println!("cargo:rustc-cfg=cargobuild");
1514
let mut cfg = gcc::Config::new();
1615
cfg.file("../rt/hoedown/src/autolink.c")
1716
.file("../rt/hoedown/src/buffer.c")

src/librustdoc/html/markdown.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,6 @@ struct hoedown_buffer {
162162
unit: libc::size_t,
163163
}
164164

165-
// hoedown FFI
166-
#[link(name = "hoedown", kind = "static")]
167-
#[cfg(not(cargobuild))]
168-
extern {}
169-
170165
extern {
171166
fn hoedown_html_renderer_new(render_flags: libc::c_uint,
172167
nesting_level: libc::c_int)

0 commit comments

Comments
 (0)