This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Allow c++ abi to be explictly disabled in cmake configuration
ClosedPublic

Authored by fjricci on Aug 10 2016, 2:48 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

fjricci updated this revision to Diff 67611.Aug 10 2016, 2:48 PM
fjricci retitled this revision from to [compiler-rt] Allow c++ abi to be explictly disabled in cmake configuration.
fjricci updated this object.
fjricci added reviewers: samsonov, beanz, rnk, pcc.
fjricci added subscribers: compnerd, llvm-commits.

Friendly ping. This patch will allow at least address sanitizer to be compiled and run without requiring c++ abi, which currently isn't possible.

rnk added inline comments.Aug 15 2016, 10:31 AM
CMakeLists.txt
217 ↗(On Diff #67611)

I think you should hoist this up to the end of the options and make this an option(). Use the existing logic to provide the default value.

fjricci updated this revision to Diff 68049.Aug 15 2016, 10:52 AM

Use option instead of define

rnk edited edge metadata.Aug 15 2016, 11:29 AM

Almost, sorry I wasn't clear

CMakeLists.txt
95 ↗(On Diff #68049)

I'd rather not duplicate option() with its text description. You can get the same effect with set(use_cxxabi_default ON/OFF) and feeding that into option()

fjricci updated this revision to Diff 68054.Aug 15 2016, 11:37 AM
fjricci edited edge metadata.

Refactor option parsing

rnk accepted this revision.Aug 15 2016, 11:45 AM
rnk edited edge metadata.

lgtm, thanks

This revision is now accepted and ready to land.Aug 15 2016, 11:45 AM
This revision was automatically updated to reflect the committed changes.

This somehow caused a clang buildbot failure. Reverted and investigating.

Fixed typo and re-committed as r278772

Still one failing buildbot, which I can't seem to repro locally. I'll revert and come up with a new patch once I figure out what's going on.

Looks like this is a problem with bad cmake caches on incremental builds (the typo in the original patch caused a bad default value to be inserted in the CMakeCache.txt, and default values don't get over-written unless you do a clean build). I'll re-commit next week when the incremental builds have all been reset.