From: Michael Gottesman Date: Tue, 20 Aug 2013 07:41:18 +0000 (+0000) Subject: [autotools->cmake] Added support for building clang with an order file. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f65456f3c0b07de9db5221c3883263026cfcc0a0;p=clang [autotools->cmake] Added support for building clang with an order file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188763 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index e6863b25dc..22b12f302b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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." "") diff --git a/tools/driver/CMakeLists.txt b/tools/driver/CMakeLists.txt index 89778d6fc3..0a45b58c44 100644 --- a/tools/driver/CMakeLists.txt +++ b/tools/driver/CMakeLists.txt @@ -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() +