Skip to content

Commit 939bd47

Browse files
badboybrson
authored andcommitted
Configure LLVM to use js backend
Initialize the asmjs backend for LLVM
1 parent 9548730 commit 939bd47

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/bootstrap/native.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pub fn llvm(build: &Build, target: &str) {
6565
.out_dir(&dst)
6666
.profile(if build.config.llvm_optimize {"Release"} else {"Debug"})
6767
.define("LLVM_ENABLE_ASSERTIONS", assertions)
68-
.define("LLVM_TARGETS_TO_BUILD", "X86;ARM;AArch64;Mips;PowerPC;SystemZ")
68+
.define("LLVM_TARGETS_TO_BUILD", "X86;ARM;AArch64;Mips;PowerPC;SystemZ;JSBackend")
6969
.define("LLVM_INCLUDE_EXAMPLES", "OFF")
7070
.define("LLVM_INCLUDE_TESTS", "OFF")
7171
.define("LLVM_INCLUDE_DOCS", "OFF")

src/librustc_llvm/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,10 @@ pub fn initialize_available_targets() {
434434
LLVMInitializeSystemZTargetMC,
435435
LLVMInitializeSystemZAsmPrinter,
436436
LLVMInitializeSystemZAsmParser);
437+
init_target!(llvm_component = "jsbackend",
438+
LLVMInitializeJSBackendTargetInfo,
439+
LLVMInitializeJSBackendTarget,
440+
LLVMInitializeJSBackendTargetMC);
437441
}
438442

439443
pub fn last_error() -> Option<String> {

0 commit comments

Comments
 (0)