Skip to content

Commit 1bfde0c

Browse files
authored
Rollup merge of #39431 - alexcrichton:no-more-makefiles, r=brson
Delete the makefile build system This PR deletes the makefile build system in favor of the rustbuild build system. The beta has now been branched so 1.16 will continue to be buildable from the makefiles, but going forward 1.17 will only be buildable with rustbuild. Rustbuild has been the default build system [since 1.15.0](rust-lang/rust#37817) and the makefiles were [proposed for deletion](https://internals.rust-lang.org/t/proposal-for-promoting-rustbuild-to-official-status/4368) at this time back in November of last year. And now with the deletion of these makefiles we can start getting those sweet sweet improvements of using crates.io crates in the compiler!
2 parents 563f6ec + c42d470 commit 1bfde0c

File tree

10 files changed

+6
-97
lines changed

10 files changed

+6
-97
lines changed

src/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
let target = env::var("TARGET").expect("TARGET was not set");

src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -464,9 +464,6 @@ mod panicking;
464464
mod rand;
465465
mod memchr;
466466

467-
// This module just defines per-platform native library dependencies
468-
mod rtdeps;
469-
470467
// The runtime entry point and a few unstable public functions used by the
471468
// compiler
472469
pub mod rt;

src/panicking.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,12 +311,12 @@ impl<'a> Location<'a> {
311311
}
312312

313313
fn default_hook(info: &PanicInfo) {
314-
#[cfg(any(not(cargobuild), feature = "backtrace"))]
314+
#[cfg(feature = "backtrace")]
315315
use sys_common::backtrace;
316316

317317
// If this is a double panic, make sure that we print a backtrace
318318
// for this panic. Otherwise only print it if logging is enabled.
319-
#[cfg(any(not(cargobuild), feature = "backtrace"))]
319+
#[cfg(feature = "backtrace")]
320320
let log_backtrace = {
321321
let panics = update_panic_count(0);
322322

@@ -341,7 +341,7 @@ fn default_hook(info: &PanicInfo) {
341341
let _ = writeln!(err, "thread '{}' panicked at '{}', {}:{}",
342342
name, msg, file, line);
343343

344-
#[cfg(any(not(cargobuild), feature = "backtrace"))]
344+
#[cfg(feature = "backtrace")]
345345
{
346346
use sync::atomic::{AtomicBool, Ordering};
347347

src/rtdeps.rs

Lines changed: 0 additions & 68 deletions
This file was deleted.

src/sys/unix/args.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,6 @@ mod imp {
189189
fn objc_msgSend_ul(obj: NsId, sel: Sel, ...) -> NsId;
190190
}
191191

192-
#[link(name = "Foundation", kind = "framework")]
193-
#[link(name = "objc")]
194-
#[cfg(not(cargobuild))]
195-
extern {}
196-
197192
type Sel = *const libc::c_void;
198193
type NsId = *const libc::c_void;
199194

src/sys/unix/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub mod weak;
3333

3434
pub mod args;
3535
pub mod android;
36-
#[cfg(any(not(cargobuild), feature = "backtrace"))]
36+
#[cfg(feature = "backtrace")]
3737
pub mod backtrace;
3838
pub mod condvar;
3939
pub mod env;

src/sys/unix/rand.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,6 @@ mod imp {
257257
#[allow(non_upper_case_globals)]
258258
const kSecRandomDefault: *const SecRandom = ptr::null();
259259

260-
#[link(name = "Security", kind = "framework")]
261-
#[cfg(not(cargobuild))]
262-
extern {}
263-
264260
extern {
265261
fn SecRandomCopyBytes(rnd: *const SecRandom,
266262
count: size_t, bytes: *mut u8) -> c_int;

src/sys/windows/c.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -833,13 +833,6 @@ pub struct CONSOLE_READCONSOLE_CONTROL {
833833
}
834834
pub type PCONSOLE_READCONSOLE_CONTROL = *mut CONSOLE_READCONSOLE_CONTROL;
835835

836-
#[link(name = "ws2_32")]
837-
#[link(name = "userenv")]
838-
#[link(name = "shell32")]
839-
#[link(name = "advapi32")]
840-
#[cfg(not(cargobuild))]
841-
extern {}
842-
843836
extern "system" {
844837
pub fn WSAStartup(wVersionRequested: WORD,
845838
lpWSAData: LPWSADATA) -> c_int;

src/sys_common/gnu/libbacktrace.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ pub fn print(w: &mut Write, idx: isize, addr: *mut libc::c_void,
3939
msg: *const libc::c_char,
4040
errnum: libc::c_int);
4141
enum backtrace_state {}
42-
#[link(name = "backtrace", kind = "static")]
43-
#[cfg(all(not(test), not(cargobuild)))]
44-
extern {}
4542

4643
extern {
4744
fn backtrace_create_state(filename: *const libc::c_char,

src/sys_common/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use sync::Once;
2929
use sys;
3030

3131
pub mod at_exit_imp;
32-
#[cfg(any(not(cargobuild), feature = "backtrace"))]
32+
#[cfg(feature = "backtrace")]
3333
pub mod backtrace;
3434
pub mod condvar;
3535
pub mod io;
@@ -50,7 +50,7 @@ pub use sys::net;
5050
#[cfg(not(target_os = "redox"))]
5151
pub mod net;
5252

53-
#[cfg(any(not(cargobuild), feature = "backtrace"))]
53+
#[cfg(feature = "backtrace")]
5454
#[cfg(any(all(unix, not(any(target_os = "macos", target_os = "ios", target_os = "emscripten"))),
5555
all(windows, target_env = "gnu")))]
5656
pub mod gnu;

0 commit comments

Comments
 (0)