]> granicus.if.org Git - clang/commitdiff
[autotools->cmake] Added support for building clang with an order file.
authorMichael Gottesman <mgottesman@apple.com>
Tue, 20 Aug 2013 07:41:18 +0000 (07:41 +0000)
committerMichael Gottesman <mgottesman@apple.com>
Tue, 20 Aug 2013 07:41:18 +0000 (07:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188763 91177308-0d34-0410-b5e6-96231b3b80d8

CMakeLists.txt
tools/driver/CMakeLists.txt

index e6863b25dc5d2cb0889452cb2cc26e4ba23117d4..22b12f302b02c3f3a0e4322a8feec30858f380af 100644 (file)
@@ -337,3 +337,6 @@ endif()
 
 set(BUG_REPORT_URL "http://llvm.org/bugs/" CACHE STRING
   "Default URL where bug reports are to be submitted.")
+
+option(CLANG_ORDER_FILE
+  "Order file to use when compiling clang in order to improve startup time." "")
index 89778d6fc34dc825ec8290d9b3d6e6324d375a66..0a45b58c442eac486e67dab53d3a9208f99273ad 100644 (file)
@@ -116,3 +116,8 @@ if (APPLE)
   set(TOOL_INFO_VERSION)
   set(TOOL_INFO_BUILD_VERSION)
 endif()
+
+if(CLANG_ORDER_FILE)
+  target_link_libraries(clang "-Wl,-order_file,${CLANG_ORDER_FILE}")
+endif()
+