diff options
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/config.rs | 3 | ||||
| -rw-r--r-- | src/bootstrap/config.toml.example | 8 | ||||
| -rw-r--r-- | src/bootstrap/native.rs | 6 |
3 files changed, 17 insertions, 0 deletions
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index 64b2a665e25..fd8aa320fb3 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -60,6 +60,7 @@ pub struct Config { pub llvm_static_stdcpp: bool, pub llvm_link_shared: bool, pub llvm_targets: Option<String>, + pub llvm_experimental_targets: Option<String>, pub llvm_link_jobs: Option<u32>, pub llvm_clean_rebuild: bool, @@ -189,6 +190,7 @@ struct Llvm { version_check: Option<bool>, static_libstdcpp: Option<bool>, targets: Option<String>, + experimental_targets: Option<String>, link_jobs: Option<u32>, clean_rebuild: Option<bool>, } @@ -350,6 +352,7 @@ impl Config { set(&mut config.llvm_static_stdcpp, llvm.static_libstdcpp); set(&mut config.llvm_clean_rebuild, llvm.clean_rebuild); config.llvm_targets = llvm.targets.clone(); + config.llvm_experimental_targets = llvm.experimental_targets.clone(); config.llvm_link_jobs = llvm.link_jobs; } diff --git a/src/bootstrap/config.toml.example b/src/bootstrap/config.toml.example index 3a467dafbfb..7a52222e46e 100644 --- a/src/bootstrap/config.toml.example +++ b/src/bootstrap/config.toml.example @@ -53,6 +53,14 @@ # Rust team and file an issue if you need assistance in porting! #targets = "X86;ARM;AArch64;Mips;PowerPC;SystemZ;JSBackend;MSP430;Sparc;NVPTX;Hexagon" +# LLVM experimental targets to build support for. These targets are specified in +# the same format as above, but since these targets are experimental, they are +# not built by default and the experimental Rust compilation targets that depend +# on them will not work unless the user opts in to building them. Possible +# experimental LLVM targets include WebAssembly for the +# wasm32-experimental-emscripten Rust target. +#experimental-targets = "" + # Cap the number of parallel linker invocations when compiling LLVM. # This can be useful when building LLVM with debug info, which significantly # increases the size of binaries and consequently the memory required by diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index 6b9a6347d22..a23be37b15e 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -86,6 +86,11 @@ pub fn llvm(build: &Build, target: &str) { None => "X86;ARM;AArch64;Mips;PowerPC;SystemZ;JSBackend;MSP430;Sparc;NVPTX;Hexagon", }; + let llvm_exp_targets = match build.config.llvm_experimental_targets { + Some(ref s) => s, + None => "", + }; + let assertions = if build.config.llvm_assertions {"ON"} else {"OFF"}; cfg.target(target) @@ -94,6 +99,7 @@ pub fn llvm(build: &Build, target: &str) { .profile(profile) .define("LLVM_ENABLE_ASSERTIONS", assertions) .define("LLVM_TARGETS_TO_BUILD", llvm_targets) + .define("LLVM_EXPERIMENTAL_TARGETS_TO_BUILD", llvm_exp_targets) .define("LLVM_INCLUDE_EXAMPLES", "OFF") .define("LLVM_INCLUDE_TESTS", "OFF") .define("LLVM_INCLUDE_DOCS", "OFF") |
