]> granicus.if.org Git - clang/commitdiff
[CMake] One more try to fix this.
authorChris Bieneman <beanz@apple.com>
Fri, 5 Feb 2016 03:02:40 +0000 (03:02 +0000)
committerChris Bieneman <beanz@apple.com>
Fri, 5 Feb 2016 03:02:40 +0000 (03:02 +0000)
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

CMakeLists.txt

index 514cea16ff9eb8d92ab4b76603a22327dfa2b8e3..bdd0ec9124014c68f847daec55d8374797ea5be1 100644 (file)
@@ -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()