summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2016-02-05 03:02:40 +0000
committerChris Bieneman <beanz@apple.com>2016-02-05 03:02:40 +0000
commite46b2e5b14fab7f6f165598db5b944e67101ab00 (patch)
treecdf43a6c7eca5bea27454926efbdb27d60290048 /CMakeLists.txt
parent72487b20c571dd70ee3fa19e15c155243ada0689 (diff)
[CMake] One more try to fix this.
This change will catch any bots that generated the order file that GNU ld doesn't like and delete it before trying to generate one that I think GNU ld will deal with. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259871 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 514cea16ff..bdd0ec9124 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -595,6 +595,11 @@ endif()
set(CLANG_ORDER_FILE ${CMAKE_CURRENT_BINARY_DIR}/clang.order CACHE FILEPATH
"Order file to use when compiling clang in order to improve startup time.")
+file(READ ${CLANG_ORDER_FILE} order_file 20)
+if(order_file STREQUAL "")
+ file(REMOVE ${CLANG_ORDER_FILE})
+endif()
+
if(CLANG_ORDER_FILE AND NOT EXISTS ${CLANG_ORDER_FILE})
file(WRITE ${CLANG_ORDER_FILE} "\n")
endif()