summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-12-03 18:07:19 +0800
committerGitHub <noreply@github.com>2018-12-03 18:07:19 +0800
commit21433f2812bf36c8149050d39b6fcf0b62a6f19b (patch)
tree7fa44324eb1fe317110b748fa62fbddbb2dafdec /src/libstd
parenta498a6d198dcaa55281b1eb5acff3820ae5b9c1e (diff)
parentbd20718c8f14cc7f486e1556f7d7897f8f32725b (diff)
downloadrust-21433f2812bf36c8149050d39b6fcf0b62a6f19b.tar.gz
rust-21433f2812bf36c8149050d39b6fcf0b62a6f19b.zip
Rollup merge of #56435 - RalfJung:libstd-without-c, r=alexcrichton
make the C part of compiler-builtins opt-out

I'd like to be able to use Xargo to build a libstd without having a full C toolchain for the target.  This is a start (but the fact that libstd is a dylib is still a problem).

However, compiler_builtin already has somewhat similar logic to not require a C compiler for wasm:

https://github.com/rust-lang-nursery/compiler-builtins/blob/fe74674f6e4be76d47b66f67d529ebf4186f4eb1/build.rs#L36-L41

(WTF GitHub, why doesn't this show an embedded code preview??)

I wonder if there is a way to not have two separate mechanisms? Like, move the above wasm logic to some place that controls the libstd feature, or so? Or is it okay to have these two mechanisms co-exist?

Cc @alexcrichton
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/Cargo.toml3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstd/Cargo.toml b/src/libstd/Cargo.toml
index c1446218367..cae2f405318 100644
--- a/src/libstd/Cargo.toml
+++ b/src/libstd/Cargo.toml
@@ -43,9 +43,12 @@ cc = "1.0"
 build_helper = { path = "../build_helper" }
 
 [features]
+default = ["compiler_builtins_c"]
+
 backtrace = []
 panic-unwind = ["panic_unwind"]
 profiler = ["profiler_builtins"]
+compiler_builtins_c = ["compiler_builtins/c"]
 
 # Make panics and failed asserts immediately abort without formatting any message
 panic_immediate_abort = ["core/panic_immediate_abort"]