diff options
| author | bors <bors@rust-lang.org> | 2013-03-15 14:15:50 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-03-15 14:15:50 -0700 |
| commit | 2b059c6e5638de7b241ffddb38cef906813de245 (patch) | |
| tree | d58c015ae59b54340dba7c535115a4d7914628d7 /src/rustllvm/RustWrapper.cpp | |
| parent | c724dae7def417cd9aea8710d479b28155ed0f4f (diff) | |
| parent | 10df2ea9db79d7ce69f9c48fbf03565e2581f28c (diff) | |
| download | rust-2b059c6e5638de7b241ffddb38cef906813de245.tar.gz rust-2b059c6e5638de7b241ffddb38cef906813de245.zip | |
auto merge of #5354 : ILyoan/rust/normalize_triple, r=graydon
LLVM could not recognize target-os when target-triple was given as like 'arm-linux-androideabi'. Normalizing target-triple fill the missing elements. In the case of 'arm-linux-androideabi', nomalized target-triple will be "arm-unknown-linux-androideabi" and this let llvm recognize the triple correctly. (arch: arm, vendor: unknown, os: linux, environment: android)
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
| -rw-r--r-- | src/rustllvm/RustWrapper.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp index 12b305720cc..1b3c1f6e581 100644 --- a/src/rustllvm/RustWrapper.cpp +++ b/src/rustllvm/RustWrapper.cpp @@ -433,10 +433,10 @@ LLVMRustWriteOutputFile(LLVMPassManagerRef PMR, Options.EnableSegmentedStacks = EnableSegmentedStacks; std::string Err; - const Target *TheTarget = TargetRegistry::lookupTarget(triple, Err); + std::string Trip(Triple::normalize(triple)); std::string FeaturesStr; - std::string Trip(triple); std::string CPUStr("generic"); + const Target *TheTarget = TargetRegistry::lookupTarget(Trip, Err); TargetMachine *Target = TheTarget->createTargetMachine(Trip, CPUStr, FeaturesStr, Options, Reloc::PIC_, |
