diff options
author | Petr Hosek <phosek@google.com> | 2022-06-24 18:52:35 +0000 |
---|---|---|
committer | Petr Hosek <phosek@google.com> | 2022-06-24 22:37:00 +0000 |
commit | 048e6bb46bc2b800def49373fba75419b39d3249 (patch) | |
tree | 070b59fa9b2b7a2aa5f0c718cada07b9d7e871d0 | |
parent | 0f65a3e610051fc319372eea647fb50f60b2b21c (diff) | |
download | llvm-048e6bb46bc2b800def49373fba75419b39d3249.zip llvm-048e6bb46bc2b800def49373fba75419b39d3249.tar.gz llvm-048e6bb46bc2b800def49373fba75419b39d3249.tar.bz2 |
[CMake][compiler-rt] Treat target cflags as list rather than string
This is need after 30dfe016d4259398689dc1be163e0ecc804b5feb.
Differential Revision: https://reviews.llvm.org/D128548
-rw-r--r-- | compiler-rt/cmake/Modules/CompilerRTAIXUtils.cmake | 2 | ||||
-rw-r--r-- | compiler-rt/lib/fuzzer/CMakeLists.txt | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler-rt/cmake/Modules/CompilerRTAIXUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTAIXUtils.cmake index c7dc2b8..8374b50 100644 --- a/compiler-rt/cmake/Modules/CompilerRTAIXUtils.cmake +++ b/compiler-rt/cmake/Modules/CompilerRTAIXUtils.cmake @@ -11,7 +11,7 @@ set(linkopts # > On AIX, runtime linking is no longer enabled by default. # See https://cmake.org/cmake/help/latest/release/3.16.html if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16.0") - set(linkopts -Wl,-G ${linkopts}) + list(PREPEND linkopts -Wl,-G) endif() set(${link_flags} ${linkopts} PARENT_SCOPE) endfunction() diff --git a/compiler-rt/lib/fuzzer/CMakeLists.txt b/compiler-rt/lib/fuzzer/CMakeLists.txt index 856cd73..f829c79 100644 --- a/compiler-rt/lib/fuzzer/CMakeLists.txt +++ b/compiler-rt/lib/fuzzer/CMakeLists.txt @@ -141,7 +141,7 @@ if(OS_NAME MATCHES "Linux|Fuchsia" AND get_target_flags_for_arch(${arch} target_cflags) if(CMAKE_CXX_COMPILER_ID MATCHES Clang) get_compiler_rt_target(${arch} target) - set(target_cflags "--target=${target} ${target_cflags}") + list(PREPEND target_cflags --target=${target}) endif() set(cxx_${arch}_merge_dir "${CMAKE_CURRENT_BINARY_DIR}/cxx_${arch}_merge.dir") file(MAKE_DIRECTORY ${cxx_${arch}_merge_dir}) |