[compiler-rt] acc22ae - [AIX][libatomic] Fix link flags after 30dfe016d4 for libatomic on AIX
Kai Luo via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 24 06:56:35 PDT 2022
Author: Kai Luo
Date: 2022-06-24T13:56:32Z
New Revision: acc22aeb0fe1e34fe7236e233d9a2852f75fa9d8
URL: https://github.com/llvm/llvm-project/commit/acc22aeb0fe1e34fe7236e233d9a2852f75fa9d8
DIFF: https://github.com/llvm/llvm-project/commit/acc22aeb0fe1e34fe7236e233d9a2852f75fa9d8.diff
LOG: [AIX][libatomic] Fix link flags after 30dfe016d4 for libatomic on AIX
After 30dfe016d4, we no longer use string as link flags.
Patch by @tingwang.
Reviewed By: tingwang
Differential Revision: https://reviews.llvm.org/D128524
Added:
Modified:
compiler-rt/cmake/Modules/CompilerRTAIXUtils.cmake
Removed:
################################################################################
diff --git a/compiler-rt/cmake/Modules/CompilerRTAIXUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTAIXUtils.cmake
index 0e131d0ba74c0..c7dc2b882d056 100644
--- a/compiler-rt/cmake/Modules/CompilerRTAIXUtils.cmake
+++ b/compiler-rt/cmake/Modules/CompilerRTAIXUtils.cmake
@@ -2,16 +2,16 @@ include(CMakeParseArguments)
include(CompilerRTUtils)
function(get_aix_libatomic_default_link_flags link_flags export_list)
- set(linkopts
- "-Wl,-H512 -Wl,-D0 \
- -Wl,-T512 -Wl,-bhalt:4 -Wl,-bernotok \
- -Wl,-bnoentry -Wl,-bexport:${export_list} \
- -Wl,-bmodtype:SRE -Wl,-lc")
+set(linkopts
+ -Wl,-H512 -Wl,-D0
+ -Wl,-T512 -Wl,-bhalt:4 -Wl,-bernotok
+ -Wl,-bnoentry -Wl,-bexport:${export_list}
+ -Wl,-bmodtype:SRE -Wl,-lc)
# Add `-Wl,-G`. Quoted from release notes of cmake-3.16.0
# > 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}")
+ set(linkopts -Wl,-G ${linkopts})
endif()
set(${link_flags} ${linkopts} PARENT_SCOPE)
endfunction()
More information about the llvm-commits
mailing list