[PATCH] D62104: [crt] Use CMAKE_C_COMPILER_ARG1 in compiler invocation
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat May 18 20:27:19 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL361111: Use CMAKE_C_COMPILER_ARG1 in compiler invocation (authored by phosek, committed by ).
Herald added a subscriber: delcypher.
Changed prior to commit:
https://reviews.llvm.org/D62104?vs=200165&id=200166#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62104/new/
https://reviews.llvm.org/D62104
Files:
compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
compiler-rt/trunk/lib/crt/CMakeLists.txt
Index: compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
===================================================================
--- compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
+++ compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
@@ -262,10 +262,11 @@
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}}"
Index: compiler-rt/trunk/lib/crt/CMakeLists.txt
===================================================================
--- compiler-rt/trunk/lib/crt/CMakeLists.txt
+++ compiler-rt/trunk/lib/crt/CMakeLists.txt
@@ -25,8 +25,8 @@
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})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62104.200166.patch
Type: text/x-patch
Size: 1828 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190519/7ea2689d/attachment.bin>
More information about the llvm-commits
mailing list