diff options
| author | Michael Wu <mwu.code@gmail.com> | 2017-04-09 02:03:31 -0400 |
|---|---|---|
| committer | Michael Wu <mwu.code@gmail.com> | 2017-04-25 01:56:44 -0400 |
| commit | c558a2ae37052dc1f12aa4e40578eb4ae9aca3b9 (patch) | |
| tree | 42f55627b12c2a6e08ef0e55441969634a8523f0 /src/librustc_llvm | |
| parent | 0777c757a6832dc5f8f218377f99960f5477311f (diff) | |
| download | rust-c558a2ae37052dc1f12aa4e40578eb4ae9aca3b9.tar.gz rust-c558a2ae37052dc1f12aa4e40578eb4ae9aca3b9.zip | |
Add Hexagon support
This requires an updated LLVM with D31999 and D32000 to build libcore. A basic hello world builds and runs successfully on the hexagon simulator.
Diffstat (limited to 'src/librustc_llvm')
| -rw-r--r-- | src/librustc_llvm/build.rs | 2 | ||||
| -rw-r--r-- | src/librustc_llvm/lib.rs | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/librustc_llvm/build.rs b/src/librustc_llvm/build.rs index 4871f60466d..3c88ae886d6 100644 --- a/src/librustc_llvm/build.rs +++ b/src/librustc_llvm/build.rs @@ -94,7 +94,7 @@ fn main() { let optional_components = ["x86", "arm", "aarch64", "mips", "powerpc", "pnacl", "systemz", "jsbackend", "msp430", - "sparc", "nvptx"]; + "sparc", "nvptx", "hexagon"]; // FIXME: surely we don't need all these components, right? Stuff like mcjit // or interpreter the compiler itself never uses. diff --git a/src/librustc_llvm/lib.rs b/src/librustc_llvm/lib.rs index 7c52ceae459..c9b3a7ff3f3 100644 --- a/src/librustc_llvm/lib.rs +++ b/src/librustc_llvm/lib.rs @@ -382,6 +382,12 @@ pub fn initialize_available_targets() { LLVMInitializeNVPTXTarget, LLVMInitializeNVPTXTargetMC, LLVMInitializeNVPTXAsmPrinter); + init_target!(llvm_component = "hexagon", + LLVMInitializeHexagonTargetInfo, + LLVMInitializeHexagonTarget, + LLVMInitializeHexagonTargetMC, + LLVMInitializeHexagonAsmPrinter, + LLVMInitializeHexagonAsmParser); } pub fn last_error() -> Option<String> { |
