[PATCH] D75065: [cmake] Strip quotes in compiler-rt/lib/crt and explicitly throw error if check executable fails
George Burgess IV via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 9 16:13:27 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGcfc3e7f458f8: [cmake] Strip quotes in compiler-rt/lib/crt; error if checks fail (authored by george.burgess.iv).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75065/new/
https://reviews.llvm.org/D75065
Files:
compiler-rt/lib/crt/CMakeLists.txt
Index: compiler-rt/lib/crt/CMakeLists.txt
===================================================================
--- compiler-rt/lib/crt/CMakeLists.txt
+++ compiler-rt/lib/crt/CMakeLists.txt
@@ -53,6 +53,10 @@
endif()
endforeach()
+ # Strip quotes from the compile command, as the compiler is not expecting
+ # quoted arguments (potential quotes added from D62063).
+ string(REPLACE "\"" "" test_compile_command "${test_compile_command}")
+
string(REPLACE " " ";" test_compile_command "${test_compile_command}")
execute_process(
@@ -62,6 +66,12 @@
ERROR_VARIABLE TEST_ERROR
)
+ # Explicitly throw a fatal error message if test_compile_command fails.
+ if(TEST_RESULT)
+ message(FATAL_ERROR "${TEST_ERROR}")
+ return()
+ endif()
+
execute_process(
COMMAND ${CMAKE_OBJDUMP} -h "${TARGET_NAME}/CheckSectionExists.o"
RESULT_VARIABLE CHECK_RESULT
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75065.249243.patch
Type: text/x-patch
Size: 892 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200309/d854665b/attachment.bin>
More information about the llvm-commits
mailing list