r259872 - Revert "[CMake] Improve the clang order-file generation workflow"
Chris Bieneman via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 4 19:40:38 PST 2016
Author: cbieneman
Date: Thu Feb 4 21:40:37 2016
New Revision: 259872
URL: http://llvm.org/viewvc/llvm-project?rev=259872&view=rev
Log:
Revert "[CMake] Improve the clang order-file generation workflow"
This reverts commit r259862, and attempts to fix builder CMakeCaches.
Will try this again some other time...
Conflicts:
CMakeLists.txt
tools/driver/CMakeLists.txt
Modified:
cfe/trunk/CMakeLists.txt
cfe/trunk/tools/driver/CMakeLists.txt
cfe/trunk/utils/perf-training/CMakeLists.txt
Modified: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=259872&r1=259871&r2=259872&view=diff
==============================================================================
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Thu Feb 4 21:40:37 2016
@@ -586,24 +586,14 @@ if( CLANG_INCLUDE_DOCS )
add_subdirectory(docs)
endif()
-# this line is needed as a cleanup to ensure that any CMakeCaches with the old
-# default value get updated to the new default.
-if(CLANG_ORDER_FILE STREQUAL "")
+if(CLANG_ORDER_FILE STREQUAL "${CMAKE_CURRENT_BINARY_DIR}/clang.order")
unset(CLANG_ORDER_FILE CACHE)
+ unset(CLANG_ORDER_FILE)
endif()
-set(CLANG_ORDER_FILE ${CMAKE_CURRENT_BINARY_DIR}/clang.order CACHE FILEPATH
+set(CLANG_ORDER_FILE "" 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()
-
if (CLANG_BUILT_STANDALONE OR CMAKE_VERSION VERSION_EQUAL 3 OR
CMAKE_VERSION VERSION_GREATER 3)
# Generate a list of CMake library targets so that other CMake projects can
Modified: cfe/trunk/tools/driver/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/CMakeLists.txt?rev=259872&r1=259871&r2=259872&view=diff
==============================================================================
--- cfe/trunk/tools/driver/CMakeLists.txt (original)
+++ cfe/trunk/tools/driver/CMakeLists.txt Thu Feb 4 21:40:37 2016
@@ -87,12 +87,8 @@ if (APPLE)
set(TOOL_INFO_BUILD_VERSION)
endif()
-check_cxx_compiler_flag("-Wl,-order_file,${CLANG_ORDER_FILE}"
- LINKER_HAS_ORDER_FILE_FLAG)
-
-if(LINKER_HAS_ORDER_FILE_FLAG AND CLANG_ORDER_FILE)
+if(CLANG_ORDER_FILE)
target_link_libraries(clang "-Wl,-order_file,${CLANG_ORDER_FILE}")
- set_target_properties(clang PROPERTIES LINK_DEPENDS ${CLANG_ORDER_FILE})
endif()
if(WITH_POLLY AND LINK_POLLY_INTO_TOOLS)
Modified: cfe/trunk/utils/perf-training/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/perf-training/CMakeLists.txt?rev=259872&r1=259871&r2=259872&view=diff
==============================================================================
--- cfe/trunk/utils/perf-training/CMakeLists.txt (original)
+++ cfe/trunk/utils/perf-training/CMakeLists.txt Thu Feb 4 21:40:37 2016
@@ -55,8 +55,9 @@ if(DTRACE)
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/perf-helper.py clean ${CMAKE_CURRENT_BINARY_DIR} dtrace
COMMENT "Clearing old dtrace data")
+
add_custom_target(generate-order-file
- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/perf-helper.py gen-order-file --binary $<TARGET_FILE:clang> --output ${CLANG_ORDER_FILE} ${CMAKE_CURRENT_BINARY_DIR}
+ COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/perf-helper.py gen-order-file --binary $<TARGET_FILE:clang> --output ${CMAKE_CURRENT_BINARY_DIR}/clang.order ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating order file"
DEPENDS generate-dtrace-logs)
endif()
More information about the cfe-commits
mailing list