forked from OSchip/llvm-project
[cmake] Use LLVM's check_linker_flag
LLVM already defines this function, so make use of it instead of rolling our own. llvm-svn: 333808
This commit is contained in:
parent
4a2798c934
commit
9c0d10ab6b
|
@ -99,14 +99,7 @@ if (APPLE)
|
|||
endif()
|
||||
|
||||
if(CLANG_ORDER_FILE AND (LD64_EXECUTABLE OR GOLD_EXECUTABLE))
|
||||
include(CMakePushCheckState)
|
||||
|
||||
function(check_linker_flag flag out_var)
|
||||
cmake_push_check_state()
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${flag}")
|
||||
check_cxx_compiler_flag("" ${out_var})
|
||||
cmake_pop_check_state()
|
||||
endfunction()
|
||||
include(CheckLinkerFlag)
|
||||
|
||||
if (LD64_EXECUTABLE)
|
||||
set(LINKER_ORDER_FILE_OPTION "-Wl,-order_file,${CLANG_ORDER_FILE}")
|
||||
|
|
Loading…
Reference in New Issue