diff options
author | Petr Hosek <phosek@chromium.org> | 2019-05-19 03:29:15 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2019-05-19 03:29:15 +0000 |
commit | fd09e554b554c4657d2d4ec69fb5c57eb4dde554 (patch) | |
tree | e0f3551d87466e42004163576c3a947bf68df049 /cmake | |
parent | 167c4e9847ab612a3b8b2bbe5bcc6f2b9697a913 (diff) | |
download | compiler-rt-fd09e554b554c4657d2d4ec69fb5c57eb4dde554.tar.gz |
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
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@361111 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Modules/AddCompilerRT.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake index 758911684..f7ee932f2 100644 --- a/cmake/Modules/AddCompilerRT.cmake +++ b/cmake/Modules/AddCompilerRT.cmake @@ -262,10 +262,11 @@ function(add_compiler_rt_runtime name type) 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}}" |