[PATCH] D143088: [CMake] Save and restore CMAKE_EXE_LINKER_FLAGS manually
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 1 10:05:15 PST 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9b94a67f8232: [CMake] Save and restore CMAKE_EXE_LINKER_FLAGS manually (authored by phosek).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143088/new/
https://reviews.llvm.org/D143088
Files:
llvm/cmake/modules/LLVMCheckLinkerFlag.cmake
Index: llvm/cmake/modules/LLVMCheckLinkerFlag.cmake
===================================================================
--- llvm/cmake/modules/LLVMCheckLinkerFlag.cmake
+++ llvm/cmake/modules/LLVMCheckLinkerFlag.cmake
@@ -8,13 +8,12 @@
# Until the minimum CMAKE version is 3.18
include(CheckCXXCompilerFlag)
- include(CMakePushCheckState)
# cmake builtin compatible, except we assume lang is C or CXX
function(llvm_check_linker_flag lang flag out_var)
cmake_policy(PUSH)
cmake_policy(SET CMP0056 NEW)
- cmake_push_check_state()
+ set(_CMAKE_EXE_LINKER_FLAGS_SAVE ${CMAKE_EXE_LINKER_FLAGS})
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${flag}")
if("${lang}" STREQUAL "C")
check_c_compiler_flag("" ${out_var})
@@ -23,7 +22,7 @@
else()
message(FATAL_ERROR "\"${lang}\" is not C or CXX")
endif()
- cmake_pop_check_state()
+ set(CMAKE_EXE_LINKER_FLAGS ${_CMAKE_EXE_LINKER_FLAGS_SAVE})
cmake_policy(POP)
endfunction()
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143088.493998.patch
Type: text/x-patch
Size: 1012 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230201/9b64ffa8/attachment.bin>
More information about the llvm-commits
mailing list