diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2016-02-24 14:31:18 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2016-02-28 10:50:13 -0800 |
| commit | a707a61caed22687b0a2ea9a4eea855109eafb26 (patch) | |
| tree | b3b0da15bd91f35d2ed19a64b6c9846ea0230ac6 /src/bootstrap | |
| parent | 52ec682776cbf66fee16609405eb03d672eb52c2 (diff) | |
| download | rust-a707a61caed22687b0a2ea9a4eea855109eafb26.tar.gz rust-a707a61caed22687b0a2ea9a4eea855109eafb26.zip | |
rustbuild: Fix compiler-rt build on gnueabihf
Needs a different target to get built and also we apparently need to appease the C++ compiler somehow.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/build/native.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bootstrap/build/native.rs b/src/bootstrap/build/native.rs index 6ad5f404123..a9d84b60fbf 100644 --- a/src/bootstrap/build/native.rs +++ b/src/bootstrap/build/native.rs @@ -115,6 +115,11 @@ pub fn compiler_rt(build: &Build, target: &str) { let mode = if build.config.rust_optimize {"Release"} else {"Debug"}; let (dir, build_target, libname) = if target.contains("linux") { let os = if target.contains("android") {"-android"} else {""}; + let arch = if arch.starts_with("arm") && target.contains("eabihf") { + "armhf" + } else { + arch + }; let target = format!("clang_rt.builtins-{}{}", arch, os); ("linux".to_string(), target.clone(), target) } else if target.contains("darwin") { @@ -151,7 +156,10 @@ pub fn compiler_rt(build: &Build, target: &str) { .define("COMPILER_RT_DEFAULT_TARGET_TRIPLE", target) .define("COMPILER_RT_BUILD_SANITIZERS", "OFF") .define("COMPILER_RT_BUILD_EMUTLS", "OFF") + // inform about c/c++ compilers, the c++ compiler isn't actually used but + // it's needed to get the initial configure to work on all platforms. .define("CMAKE_C_COMPILER", build.cc(target)) + .define("CMAKE_CXX_COMPILER", build.cc(target)) .build_target(&build_target); cfg.build(); } |
