[compiler-rt] r361111 - Use CMAKE_C_COMPILER_ARG1 in compiler invocation
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Sat May 18 20:29:15 PDT 2019
Author: phosek
Date: Sat May 18 20:29:15 2019
New Revision: 361111
URL: http://llvm.org/viewvc/llvm-project?rev=361111&view=rev
Log:
Use CMAKE_C_COMPILER_ARG1 in compiler invocation
This is needed when using compiler wrappers such as ccache or distcc
and should address the failure on clang-x86_64-debian-fast bot.
Differential Revision: https://reviews.llvm.org/D62104
Modified:
compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
compiler-rt/trunk/lib/crt/CMakeLists.txt
Modified: compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake?rev=361111&r1=361110&r2=361111&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake (original)
+++ compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake Sat May 18 20:29:15 2019
@@ -262,10 +262,11 @@ function(add_compiler_rt_runtime name ty
string(REGEX MATCHALL "<[A-Za-z0-9_]*>" substitutions
${CMAKE_C_COMPILE_OBJECT})
set(compile_command_${libname} "${CMAKE_C_COMPILE_OBJECT}")
+
set(output_file_${libname} ${output_name_${libname}}${CMAKE_C_OUTPUT_EXTENSION})
foreach(substitution ${substitutions})
if(substitution STREQUAL "<CMAKE_C_COMPILER>")
- string(REPLACE "<CMAKE_C_COMPILER>" "${CMAKE_C_COMPILER}"
+ string(REPLACE "<CMAKE_C_COMPILER>" "${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1}"
compile_command_${libname} ${compile_command_${libname}})
elseif(substitution STREQUAL "<OBJECT>")
string(REPLACE "<OBJECT>" "${output_dir_${libname}}/${output_file_${libname}}"
Modified: compiler-rt/trunk/lib/crt/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/crt/CMakeLists.txt?rev=361111&r1=361110&r2=361111&view=diff
==============================================================================
--- compiler-rt/trunk/lib/crt/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/crt/CMakeLists.txt Sat May 18 20:29:15 2019
@@ -25,8 +25,8 @@ function(check_cxx_section_exists sectio
set(test_compile_command "${CMAKE_C_COMPILE_OBJECT}")
foreach(substitution ${substitutions})
if(substitution STREQUAL "<CMAKE_C_COMPILER>")
- string(REPLACE "<CMAKE_C_COMPILER>"
- "${CMAKE_C_COMPILER}" test_compile_command ${test_compile_command})
+ string(REPLACE "<CMAKE_C_COMPILER>" "${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1}"
+ test_compile_command ${test_compile_command})
elseif(substitution STREQUAL "<OBJECT>")
string(REPLACE "<OBJECT>" "${TARGET_NAME}/CheckSectionExists.o"
test_compile_command ${test_compile_command})
More information about the llvm-commits
mailing list