This is an archive of the discontinued LLVM Phabricator instance.

[CMake] Finish off the clang-cl self host build
ClosedPublic

Authored by zturner on Feb 24 2015, 5:19 PM.

Details

Reviewers
rnk
Summary

This allows clang-cl to self-host cleanly with no magic setup
steps required.

After this patch, all you have to do is set CC=CXX=clang-cl and
run cmake -G Ninja.

These changes only exist to support C++ features which are
unsupported in clang-cl, so regardless of whether the user
specifies they want to use them, we still have to disable them.

Diff Detail

Event Timeline

zturner updated this revision to Diff 20649.Feb 24 2015, 5:19 PM
zturner retitled this revision from to [CMake] Finish off the clang-cl self host build.
zturner updated this object.
zturner edited the test plan for this revision. (Show Details)
zturner added a reviewer: rnk.
zturner added a subscriber: Unknown Object (MLST).
rnk added inline comments.Feb 24 2015, 6:43 PM
cmake/modules/AddLLVM.cmake
13

Won't 'NOT LLVM_EH_UNSUPPORTED' always be true? Normally it's undefined, but you set it to 0 in HandleLLVMOptions.

23

This should be under if(CLANG_CL) right? Otherwise gtest binaries can't recover from crashes and run the rest of the tests, which is semi-useful functionality.

cmake/modules/HandleLLVMOptions.cmake
31–32

I'm starting to feel like clang-cl should just silently ignore /Fd. Mind sending that patch instead? Otherwise, this needs a comment about /Fd.

zturner updated this revision to Diff 20689.Feb 25 2015, 10:55 AM

Updated with suggestions. Also removed the unused arguments warning. I will make clang-cl ignore that argument silently in a separate patch.

rnk accepted this revision.Feb 25 2015, 11:27 AM
rnk edited edge metadata.

lgtm

woot!`

cmake/modules/AddLLVM.cmake
25

Can you put something like # FIXME: Remove this when LLVM's SEH support is finished.?

This revision is now accepted and ready to land.Feb 25 2015, 11:27 AM
zturner closed this revision.Mar 2 2015, 8:38 PM