[compiler-rt] 0571af0 - Revert "[CMake][compiler-rt] Use COMPILE_OPTIONS and LINK_OPTIONS"
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 26 23:26:06 PDT 2022
Author: Petr Hosek
Date: 2022-04-26T23:25:38-07:00
New Revision: 0571af01df2044b976cbd0b0c72163f6090940e6
URL: https://github.com/llvm/llvm-project/commit/0571af01df2044b976cbd0b0c72163f6090940e6
DIFF: https://github.com/llvm/llvm-project/commit/0571af01df2044b976cbd0b0c72163f6090940e6.diff
LOG: Revert "[CMake][compiler-rt] Use COMPILE_OPTIONS and LINK_OPTIONS"
This reverts commit d47565ed62a383175ebb5cb5733f169d72715253.
Added:
Modified:
compiler-rt/cmake/Modules/CompilerRTUtils.cmake
Removed:
################################################################################
diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
index fcad227ad8f82..b7bf2ba8632bc 100644
--- a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+++ b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
@@ -5,11 +5,19 @@ include(CheckSymbolExists)
# define a handy helper function for it. The compile flags setting in CMake
# has serious issues that make its syntax challenging at best.
function(set_target_compile_flags target)
- set_property(TARGET ${target} PROPERTY COMPILE_OPTIONS ${ARGN})
+ set(argstring "")
+ foreach(arg ${ARGN})
+ set(argstring "${argstring} ${arg}")
+ endforeach()
+ set_property(TARGET ${target} PROPERTY COMPILE_FLAGS "${argstring}")
endfunction()
function(set_target_link_flags target)
- set_property(TARGET ${target} PROPERTY LINK_OPTIONS ${ARGN})
+ set(argstring "")
+ foreach(arg ${ARGN})
+ set(argstring "${argstring} ${arg}")
+ endforeach()
+ set_property(TARGET ${target} PROPERTY LINK_FLAGS "${argstring}")
endfunction()
# Set the variable var_PYBOOL to True if var holds a true-ish string,
More information about the llvm-commits
mailing list