diff options
| author | Thomas Lively <tlively@google.com> | 2017-06-16 15:43:43 -0700 |
|---|---|---|
| committer | Thomas Lively <tlively@google.com> | 2017-06-16 15:43:43 -0700 |
| commit | a1981a64a22024bbda98cf1b76b7c751fb1dcddb (patch) | |
| tree | 922379caaab0ff3e96392f4197f42e0c2746043f /src/bootstrap/native.rs | |
| parent | fe7227f6c8704f0186091085a14fd1027920e4bb (diff) | |
| download | rust-a1981a64a22024bbda98cf1b76b7c751fb1dcddb.tar.gz rust-a1981a64a22024bbda98cf1b76b7c751fb1dcddb.zip | |
Add target to use LLVM wasm backend
The new target is wasm32-experimental-emscripten. Adds a new configuration option to opt in to building experimental LLVM backends such as the WebAssembly backend. The target name was chosen to be similar to the existing wasm32-unknown-emscripten target so that the build and tests would work with minimal other code changes. When/if the new target replaces the old target, simply renaming it should just work.
Diffstat (limited to 'src/bootstrap/native.rs')
| -rw-r--r-- | src/bootstrap/native.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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") |
