about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2020-08-18 12:55:54 -0700
committerJubilee Young <workingjubilee@gmail.com>2020-08-18 12:58:19 -0700
commit8c40426051a667673cdac9975f84cb6acd4e245f (patch)
treeaf03b37e57b91d1c319c8dfa27669325c8a2b664
parent25441fb60a626d8dba1b19c9775e55387f414200 (diff)
downloadrust-8c40426051a667673cdac9975f84cb6acd4e245f.tar.gz
rust-8c40426051a667673cdac9975f84cb6acd4e245f.zip
Fix asm compiler flags change from cmake 0.1.44
cmake-rs@8141f0e changed the logic for handling asm compiler flags.
This change was pulled in with the cmake 0.1.42 -> 0.1.44 update.

This introduced two new flags to the LLVM build, breaking it:
"-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64"
"-DCMAKE_ASM_COMPILER=/usr/bin/cc"

This patch should resolve the breakage by handling it in bootstrap.
-rw-r--r--src/bootstrap/native.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
index f1bc3d11d8b..eca9ddceae1 100644
--- a/src/bootstrap/native.rs
+++ b/src/bootstrap/native.rs
@@ -454,7 +454,8 @@ fn configure_cmake(
             }
         }
         cfg.define("CMAKE_C_COMPILER", sanitize_cc(cc))
-            .define("CMAKE_CXX_COMPILER", sanitize_cc(cxx));
+            .define("CMAKE_CXX_COMPILER", sanitize_cc(cxx))
+            .define("CMAKE_ASM_COMPILER", sanitize_cc(cc));
     }
 
     cfg.build_arg("-j").build_arg(builder.jobs().to_string());