diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2022-01-18 23:34:54 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2022-01-20 21:18:42 +0000 |
commit | 4af11272f57a4a6fed2932e9e0857b2c1a707c51 (patch) | |
tree | c50b4cef24904dd73eecae5dd9b364f40ab37257 /cmake | |
parent | 8c9f62ea90c70d538766a81ef5980c9223b8566b (diff) | |
download | llvm-4af11272f57a4a6fed2932e9e0857b2c1a707c51.tar.gz |
[cmake] Duplicate `{llvm,compiler_rt}_check_linker_flag` for runtime libs and llvm
We previously had a few varied definitions of this floating around. I made the one installed with LLVM handle all the cases, and then made the others use it.
This issue was reported to me in https://reviews.llvm.org/D116521#3248117 as
D116521 made clang and llvm use the common cmake utils.
Reviewed By: sebastian-ne, phosek, #libunwind, #libc, #libc_abi, ldionne
Differential Revision: https://reviews.llvm.org/D117537
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Modules/CheckLinkerFlag.cmake | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/cmake/Modules/CheckLinkerFlag.cmake b/cmake/Modules/CheckLinkerFlag.cmake deleted file mode 100644 index 722fe5b1b8ea..000000000000 --- a/cmake/Modules/CheckLinkerFlag.cmake +++ /dev/null @@ -1,17 +0,0 @@ -include(CMakePushCheckState) -include(CheckCCompilerFlag) - -function(llvm_check_linker_flag flag dest) - # If testing a flag with check_c_compiler_flag, it gets added to the compile - # command only, but not to the linker command in that test. If the flag - # is vital for linking to succeed, the test would fail even if it would - # have succeeded if it was included on both commands. - # - # Therefore, try adding the flag to CMAKE_REQUIRED_FLAGS, which gets - # added to both compiling and linking commands in the tests. - - cmake_push_check_state() - set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${flag}") - check_c_compiler_flag("" ${dest}) - cmake_pop_check_state() -endfunction() |