Skip to content

Commit

Permalink
Configure LLVM to use js backend
Browse files Browse the repository at this point in the history
Initialize the asmjs backend for LLVM
  • Loading branch information
badboy authored and brson committed Sep 30, 2016
1 parent 9548730 commit 939bd47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/bootstrap/native.rs
Expand Up @@ -65,7 +65,7 @@ pub fn llvm(build: &Build, target: &str) {
.out_dir(&dst)
.profile(if build.config.llvm_optimize {"Release"} else {"Debug"})
.define("LLVM_ENABLE_ASSERTIONS", assertions)
.define("LLVM_TARGETS_TO_BUILD", "X86;ARM;AArch64;Mips;PowerPC;SystemZ")
.define("LLVM_TARGETS_TO_BUILD", "X86;ARM;AArch64;Mips;PowerPC;SystemZ;JSBackend")
.define("LLVM_INCLUDE_EXAMPLES", "OFF")
.define("LLVM_INCLUDE_TESTS", "OFF")
.define("LLVM_INCLUDE_DOCS", "OFF")
Expand Down
4 changes: 4 additions & 0 deletions src/librustc_llvm/lib.rs
Expand Up @@ -434,6 +434,10 @@ pub fn initialize_available_targets() {
LLVMInitializeSystemZTargetMC,
LLVMInitializeSystemZAsmPrinter,
LLVMInitializeSystemZAsmParser);
init_target!(llvm_component = "jsbackend",
LLVMInitializeJSBackendTargetInfo,
LLVMInitializeJSBackendTarget,
LLVMInitializeJSBackendTargetMC);
}

pub fn last_error() -> Option<String> {
Expand Down

0 comments on commit 939bd47

Please sign in to comment.