This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Prevent stale site configuration headers
ClosedPublic

Authored by smeenai on Aug 14 2017, 4:17 PM.

Details

Summary

If we define cmake macros that require a site config, and then undefine
all such macros, a stale site config header will be left behind.
Explicitly delete any generate site config if we don't need one to avoid
this.

Event Timeline

smeenai created this revision.Aug 14 2017, 4:17 PM
mclow.lists edited edge metadata.Aug 31 2017, 7:32 AM

This looks reasonable to me.

EricWF accepted this revision.Sep 12 2017, 3:24 PM
EricWF added inline comments.
CMakeLists.txt
633

Maybe print a warning or a message here? While it seems useful to re-configure and remove the stale header without requiring the user delete the build directory, it does seem like an odd thing to do, at least silently.

Since this shouldn't be happening very often, I don't think it would be too noisy to explicitly warn the user what is going on.

This revision is now accepted and ready to land.Sep 12 2017, 3:24 PM
smeenai added inline comments.Sep 14 2017, 11:17 AM
CMakeLists.txt
633

Sounds good.

This revision was automatically updated to reflect the committed changes.