summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2017-02-07 22:54:25 -0500
committerGitHub <noreply@github.com>2017-02-07 22:54:25 -0500
commit6fb57bf13fcc316ce622af70d3922ae5d811928d (patch)
tree9768f794e9c3f6afd5922540a2f1aed98618f96b /src/libstd
parent3d8fa5af213e24e83ded9dbed15572045c27fbbf (diff)
parentc8e0d04878f38e8a91e7a6196fb18878da208887 (diff)
downloadrust-6fb57bf13fcc316ce622af70d3922ae5d811928d.tar.gz
rust-6fb57bf13fcc316ce622af70d3922ae5d811928d.zip
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](https://github.com/rust-lang/rust/pull/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!
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/build.rs1
-rw-r--r--src/libstd/lib.rs3
-rw-r--r--src/libstd/panicking.rs6
-rw-r--r--src/libstd/rtdeps.rs68
-rw-r--r--src/libstd/sys/unix/args.rs5
-rw-r--r--src/libstd/sys/unix/mod.rs2
-rw-r--r--src/libstd/sys/unix/rand.rs4
-rw-r--r--src/libstd/sys/windows/c.rs7
-rw-r--r--src/libstd/sys_common/gnu/libbacktrace.rs3
-rw-r--r--src/libstd/sys_common/mod.rs4
10 files changed, 6 insertions, 97 deletions
diff --git a/src/libstd/build.rs b/src/libstd/build.rs
index a0844821709..0fca374f6e6 100644
--- a/src/libstd/build.rs
+++ b/src/libstd/build.rs
@@ -21,7 +21,6 @@ use std::process::Command;
 use build_helper::{run, rerun_if_changed_anything_in_dir, up_to_date};
 
 fn main() {
-    println!("cargo:rustc-cfg=cargobuild");
     println!("cargo:rerun-if-changed=build.rs");
 
     let target = env::var("TARGET").expect("TARGET was not set");
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 1f3526e1a09..3a552c060a9 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -464,9 +464,6 @@ mod panicking;
 mod rand;
 mod memchr;
 
-// This module just defines per-platform native library dependencies
-mod rtdeps;
-
 // The runtime entry point and a few unstable public functions used by the
 // compiler
 pub mod rt;
diff --git a/src/libstd/panicking.rs b/src/libstd/panicking.rs
index e5edea241e1..d76e8816ca4 100644
--- a/src/libstd/panicking.rs
+++ b/src/libstd/panicking.rs
@@ -311,12 +311,12 @@ impl<'a> Location<'a> {
 }
 
 fn default_hook(info: &PanicInfo) {
-    #[cfg(any(not(cargobuild), feature = "backtrace"))]
+    #[cfg(feature = "backtrace")]
     use sys_common::backtrace;
 
     // If this is a double panic, make sure that we print a backtrace
     // for this panic. Otherwise only print it if logging is enabled.
-    #[cfg(any(not(cargobuild), feature = "backtrace"))]
+    #[cfg(feature = "backtrace")]
     let log_backtrace = {
         let panics = update_panic_count(0);
 
@@ -341,7 +341,7 @@ fn default_hook(info: &PanicInfo) {
         let _ = writeln!(err, "thread '{}' panicked at '{}', {}:{}",
                          name, msg, file, line);
 
-        #[cfg(any(not(cargobuild), feature = "backtrace"))]
+        #[cfg(feature = "backtrace")]
         {
             use sync::atomic::{AtomicBool, Ordering};
 
diff --git a/src/libstd/rtdeps.rs b/src/libstd/rtdeps.rs
deleted file mode 100644
index 5dc6ee2bc8c..00000000000
--- a/src/libstd/rtdeps.rs
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! This module contains the linkage attributes to all runtime dependencies of
-//! the standard library This varies per-platform, but these libraries are
-//! necessary for running libstd.
-
-#![cfg(not(cargobuild))]
-
-// LLVM implements the `frem` instruction as a call to `fmod`, which lives in
-// libm. Hence, we must explicitly link to it.
-//
-// On Linux, librt and libdl are indirect dependencies via std,
-// and binutils 2.22+ won't add them automatically
-#[cfg(all(target_os = "linux", not(target_env = "musl")))]
-#[link(name = "dl")]
-#[link(name = "pthread")]
-extern {}
-
-#[cfg(target_os = "android")]
-#[link(name = "dl")]
-#[link(name = "log")]
-extern {}
-
-#[cfg(target_os = "freebsd")]
-#[link(name = "execinfo")]
-#[link(name = "pthread")]
-extern {}
-
-#[cfg(any(target_os = "dragonfly",
-          target_os = "bitrig",
-          target_os = "netbsd",
-          target_os = "openbsd"))]
-#[link(name = "pthread")]
-extern {}
-
-#[cfg(target_os = "solaris")]
-#[link(name = "socket")]
-#[link(name = "posix4")]
-#[link(name = "pthread")]
-extern {}
-
-// For PNaCl targets, nacl_io is a Pepper wrapper for some IO functions
-// missing (ie always error) in Newlib.
-#[cfg(all(target_os = "nacl", not(test)))]
-#[link(name = "nacl_io", kind = "static")]
-#[link(name = "c++", kind = "static")] // for `nacl_io` and EH.
-#[link(name = "pthread", kind = "static")]
-extern {}
-
-#[cfg(target_os = "macos")]
-#[link(name = "System")]
-extern {}
-
-#[cfg(target_os = "ios")]
-#[link(name = "System")]
-extern {}
-
-#[cfg(target_os = "haiku")]
-#[link(name = "network")]
-extern {}
diff --git a/src/libstd/sys/unix/args.rs b/src/libstd/sys/unix/args.rs
index 0f447ff4ec4..6e35a472792 100644
--- a/src/libstd/sys/unix/args.rs
+++ b/src/libstd/sys/unix/args.rs
@@ -189,11 +189,6 @@ mod imp {
             fn objc_msgSend_ul(obj: NsId, sel: Sel, ...) -> NsId;
         }
 
-        #[link(name = "Foundation", kind = "framework")]
-        #[link(name = "objc")]
-        #[cfg(not(cargobuild))]
-        extern {}
-
         type Sel = *const libc::c_void;
         type NsId = *const libc::c_void;
 
diff --git a/src/libstd/sys/unix/mod.rs b/src/libstd/sys/unix/mod.rs
index fd7dc17cccd..c57751a01d7 100644
--- a/src/libstd/sys/unix/mod.rs
+++ b/src/libstd/sys/unix/mod.rs
@@ -33,7 +33,7 @@ pub mod weak;
 
 pub mod args;
 pub mod android;
-#[cfg(any(not(cargobuild), feature = "backtrace"))]
+#[cfg(feature = "backtrace")]
 pub mod backtrace;
 pub mod condvar;
 pub mod env;
diff --git a/src/libstd/sys/unix/rand.rs b/src/libstd/sys/unix/rand.rs
index 9b1cf6ffd0e..77ebad4e344 100644
--- a/src/libstd/sys/unix/rand.rs
+++ b/src/libstd/sys/unix/rand.rs
@@ -257,10 +257,6 @@ mod imp {
     #[allow(non_upper_case_globals)]
     const kSecRandomDefault: *const SecRandom = ptr::null();
 
-    #[link(name = "Security", kind = "framework")]
-    #[cfg(not(cargobuild))]
-    extern {}
-
     extern {
         fn SecRandomCopyBytes(rnd: *const SecRandom,
                               count: size_t, bytes: *mut u8) -> c_int;
diff --git a/src/libstd/sys/windows/c.rs b/src/libstd/sys/windows/c.rs
index 850d6f49612..e5010ca3564 100644
--- a/src/libstd/sys/windows/c.rs
+++ b/src/libstd/sys/windows/c.rs
@@ -833,13 +833,6 @@ pub struct CONSOLE_READCONSOLE_CONTROL {
 }
 pub type PCONSOLE_READCONSOLE_CONTROL = *mut CONSOLE_READCONSOLE_CONTROL;
 
-#[link(name = "ws2_32")]
-#[link(name = "userenv")]
-#[link(name = "shell32")]
-#[link(name = "advapi32")]
-#[cfg(not(cargobuild))]
-extern {}
-
 extern "system" {
     pub fn WSAStartup(wVersionRequested: WORD,
                       lpWSAData: LPWSADATA) -> c_int;
diff --git a/src/libstd/sys_common/gnu/libbacktrace.rs b/src/libstd/sys_common/gnu/libbacktrace.rs
index d464a13ad1d..0bdbeddb112 100644
--- a/src/libstd/sys_common/gnu/libbacktrace.rs
+++ b/src/libstd/sys_common/gnu/libbacktrace.rs
@@ -39,9 +39,6 @@ pub fn print(w: &mut Write, idx: isize, addr: *mut libc::c_void,
                       msg: *const libc::c_char,
                       errnum: libc::c_int);
     enum backtrace_state {}
-    #[link(name = "backtrace", kind = "static")]
-    #[cfg(all(not(test), not(cargobuild)))]
-    extern {}
 
     extern {
         fn backtrace_create_state(filename: *const libc::c_char,
diff --git a/src/libstd/sys_common/mod.rs b/src/libstd/sys_common/mod.rs
index 634d6258885..d4d3365dc01 100644
--- a/src/libstd/sys_common/mod.rs
+++ b/src/libstd/sys_common/mod.rs
@@ -29,7 +29,7 @@ use sync::Once;
 use sys;
 
 pub mod at_exit_imp;
-#[cfg(any(not(cargobuild), feature = "backtrace"))]
+#[cfg(feature = "backtrace")]
 pub mod backtrace;
 pub mod condvar;
 pub mod io;
@@ -50,7 +50,7 @@ pub use sys::net;
 #[cfg(not(target_os = "redox"))]
 pub mod net;
 
-#[cfg(any(not(cargobuild), feature = "backtrace"))]
+#[cfg(feature = "backtrace")]
 #[cfg(any(all(unix, not(any(target_os = "macos", target_os = "ios", target_os = "emscripten"))),
           all(windows, target_env = "gnu")))]
 pub mod gnu;