[PATCH] D152103: [LLVM] Removes CMake work-arounds.
Mark de Wever via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 4 08:46:41 PDT 2023
Mordante created this revision.
Herald added a project: All.
Mordante requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
CMake older than 3.20.0 is no longer supported.
This removes work-arounds for no longer supported versions.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D152103
Files:
llvm/CMakeLists.txt
Index: llvm/CMakeLists.txt
===================================================================
--- llvm/CMakeLists.txt
+++ llvm/CMakeLists.txt
@@ -1063,29 +1063,6 @@
add_compile_definitions(_XOPEN_SOURCE=700)
add_compile_definitions(_LARGE_FILE_API)
- # CMake versions less than 3.16 set default linker flags to include -brtl, as
- # well as setting -G when building libraries, so clear them out. Note we only
- # try to clear the form that CMake will set as part of its initial
- # configuration, it is still possible the user may force it as part of a
- # compound option.
- if(CMAKE_VERSION VERSION_LESS 3.16)
- string(REGEX REPLACE "(^|[ \t]+)-Wl,-brtl([ \t]+|$)" " " CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
- string(REGEX REPLACE "(^|[ \t]+)-Wl,-brtl([ \t]+|$)" " " CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
- string(REGEX REPLACE "(^|[ \t]+)-Wl,-brtl([ \t]+|$)" " " CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}")
- string(REGEX REPLACE "(^|[ \t]+)(-Wl,)?-G([ \t]+|$)" " " CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS
- "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}")
- string(REGEX REPLACE "(^|[ \t]+)(-Wl,)?-G([ \t]+|$)" " " CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS
- "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}")
- string(REGEX REPLACE "(^|[ \t]+)(-Wl,)?-G([ \t]+|$)" " " CMAKE_SHARED_LIBRARY_CREATE_ASM_FLAGS
- "${CMAKE_SHARED_LIBRARY_CREATE_ASM_FLAGS}")
- string(REGEX REPLACE "(^|[ \t]+)-Wl,-G," " -Wl," CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS
- "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}")
- string(REGEX REPLACE "(^|[ \t]+)-Wl,-G," " -Wl," CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS
- "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}")
- string(REGEX REPLACE "(^|[ \t]+)-Wl,-G," " -Wl," CMAKE_SHARED_LIBRARY_CREATE_ASM_FLAGS
- "${CMAKE_SHARED_LIBRARY_CREATE_ASM_FLAGS}")
- endif()
-
# Modules should be built with -shared -Wl,-G, so we can use runtime linking
# with plugins.
string(APPEND CMAKE_MODULE_LINKER_FLAGS " -shared -Wl,-G")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152103.528226.patch
Type: text/x-patch
Size: 2047 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230604/2a33d255/attachment.bin>
More information about the llvm-commits
mailing list