Skip to content

Commit bea6ab2

Browse files
author
Jorge Aparicio
committed
enable LLVM's SPARC backend
1 parent 10271ea commit bea6ab2

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/bootstrap/native.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ pub fn llvm(build: &Build, target: &str) {
8181
.profile(profile)
8282
.define("LLVM_ENABLE_ASSERTIONS", assertions)
8383
.define("LLVM_TARGETS_TO_BUILD",
84-
"X86;ARM;AArch64;Mips;PowerPC;SystemZ;JSBackend;MSP430")
84+
"X86;ARM;AArch64;Mips;PowerPC;SystemZ;JSBackend;MSP430;Sparc")
8585
.define("LLVM_INCLUDE_EXAMPLES", "OFF")
8686
.define("LLVM_INCLUDE_TESTS", "OFF")
8787
.define("LLVM_INCLUDE_DOCS", "OFF")

src/librustc_llvm/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ fn main() {
9595
let is_crossed = target != host;
9696

9797
let optional_components =
98-
["x86", "arm", "aarch64", "mips", "powerpc", "pnacl", "systemz", "jsbackend", "msp430"];
98+
["x86", "arm", "aarch64", "mips", "powerpc", "pnacl", "systemz", "jsbackend", "msp430", "sparc"];
9999

100100
// FIXME: surely we don't need all these components, right? Stuff like mcjit
101101
// or interpreter the compiler itself never uses.

src/librustc_llvm/lib.rs

+6
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,12 @@ pub fn initialize_available_targets() {
370370
LLVMInitializeMSP430Target,
371371
LLVMInitializeMSP430TargetMC,
372372
LLVMInitializeMSP430AsmPrinter);
373+
init_target!(llvm_component = "sparc",
374+
LLVMInitializeSparcTargetInfo,
375+
LLVMInitializeSparcTarget,
376+
LLVMInitializeSparcTargetMC,
377+
LLVMInitializeSparcAsmPrinter,
378+
LLVMInitializeSparcAsmParser);
373379
}
374380

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

0 commit comments

Comments
 (0)