]> granicus.if.org Git - clang/commit
[CMake] Improve the clang order-file generation workflow
authorChris Bieneman <beanz@apple.com>
Fri, 12 Feb 2016 21:36:55 +0000 (21:36 +0000)
committerChris Bieneman <beanz@apple.com>
Fri, 12 Feb 2016 21:36:55 +0000 (21:36 +0000)
commitcff69f62d5b5b6b7e94a8ce793452b8e193c2a53
tree75297393a28484bdfaa54d22f192a21e46c42f49
parent5c41d3a5f89280bc0825a054e4add6ab929d48fe
[CMake] Improve the clang order-file generation workflow

Summary:
This commit re-lands r259862. The underlying cause of the build breakage was an incorrectly written capabilities test. In tools/Driver/CMakeLists.txt I was attempting to check if a linker flag worked, the test was passing it to the compiler, not the linker. CMake doesn't have a linker test, so we have a hand-rolled one.

Original Patch Review: http://reviews.llvm.org/D16896

Original Summary:
With this change generating clang order files using dtrace uses the following workflow:

cmake <whatever options you want>

ninja generate-order-file

ninja clang

This patch works by setting a default path to the order file (which can be overridden by the user). If the order file doesn't exist during configuration CMake will create an empty one.

CMake then ties up the dependencies between the clang link job and the order file, and generate-order-file overwrites CLANG_ORDER_FILE with the new order file.

Reviewers: bogner

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D16999

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260742 91177308-0d34-0410-b5e6-96231b3b80d8
CMakeLists.txt
tools/driver/CMakeLists.txt
utils/perf-training/CMakeLists.txt