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
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()