This is an archive of the discontinued LLVM Phabricator instance.

allow migrating away from cmake option for LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING
ClosedPublic

Authored by bob.wilson on Feb 13 2017, 5:39 PM.

Details

Reviewers
bruno
mehdi_amini
Summary

In r288754, Mehdi added a cmake option to disable enforcement of the ABI breaking checks in the "abi-breaking.h" header. We used that when building Swift and it works, but I think it will be better to control this with a preprocessor macro instead of a cmake option. That will let us opt out of the enforcement more selectively.

This change allows skipping the cmake setting if the existing preprocessor macro is already defined. My intention here is to make this change and get Swift to use it, and then after a few weeks, we can remove the cmake option. I want to stage it like that to be less disruptive. I'm not aware of anyone else using that cmake option.

Mehdi had some initial concern about the impact of using a preprocessor macro when building with modules enabled. I don't think that will be a problem if we set the macro on the command line with a -D option in those contexts where we need to disable the enforcement of the checks.

Diff Detail

Event Timeline

bob.wilson created this revision.Feb 13 2017, 5:39 PM
mehdi_amini edited edge metadata.

Adding @bruno to check on the module story here, I'm still not sure what is or isn't reasonable to do with modules!

Otherwise LGTM.

llvm/Config/abi-breaking.h.cmake
22

It took me some time to figure out the logic here. But as long as it's temporary.

bruno accepted this revision.Feb 14 2017, 8:13 AM

Shouldn't be a problem. LGTM

This revision is now accepted and ready to land.Feb 14 2017, 8:13 AM
bob.wilson closed this revision.Feb 14 2017, 11:18 AM

Committed in r295090