summaryrefslogtreecommitdiffstats
path: root/tools/driver
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2016-02-17 02:13:35 +0000
committerChandler Carruth <chandlerc@gmail.com>2016-02-17 02:13:35 +0000
commita11816e2582b793e0d1fc926efba7e432fb2ba7f (patch)
tree03e700d6cbd8f64449ebedc171d27da5c469c2a3 /tools/driver
parent6ac287f135bcbeaa89368b0e31ba6732dd194e13 (diff)
[cmake] Revert r260742 (and r260744) to improve order file support.
This appears to be passing '-Wl,-order_file' to Linux link commands, which then causes the linker to silently, behind the scenes, write the output to 'rder_file' instead of somewhere else. Will work with Chris to figure out the proper support for this, but so far there are numerous people who can't get Clang to update when they build because of this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261054 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/driver')
-rw-r--r--tools/driver/CMakeLists.txt20
1 files changed, 2 insertions, 18 deletions
diff --git a/tools/driver/CMakeLists.txt b/tools/driver/CMakeLists.txt
index d8bdd70248..bb631db79c 100644
--- a/tools/driver/CMakeLists.txt
+++ b/tools/driver/CMakeLists.txt
@@ -87,24 +87,8 @@ if (APPLE)
set(TOOL_INFO_BUILD_VERSION)
endif()
-if(CLANG_ORDER_FILE)
- 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()
-
- # This is a test to ensure the actual order file works with the linker.
- check_linker_flag("-Wl,-order_file,${CLANG_ORDER_FILE}"
- LINKER_ORDER_FILE_WORKS)
-
- if(LINKER_ORDER_FILE_WORKS)
- target_link_libraries(clang "-Wl,-order_file,${CLANG_ORDER_FILE}")
- set_target_properties(clang PROPERTIES LINK_DEPENDS ${CLANG_ORDER_FILE})
- endif()
+if(CLANG_ORDER_FILE AND EXISTS CLANG_ORDER_FILE)
+ target_link_libraries(clang "-Wl,-order_file,${CLANG_ORDER_FILE}")
endif()
if(WITH_POLLY AND LINK_POLLY_INTO_TOOLS)