This is an archive of the discontinued LLVM Phabricator instance.

libc++: add `-include` or `/FI` to the interface compile definitions
Needs RevisionPublic

Authored by compnerd on Aug 6 2019, 3:06 PM.

Details

Summary

This ensures that when libcxx_shared or libcxx_static the site configuration is always included as appropriate.

Diff Detail

Repository
rCXX libc++

Event Timeline

compnerd created this revision.Aug 6 2019, 3:06 PM
smeenai requested changes to this revision.Aug 6 2019, 7:26 PM

When libc++ is installed, the __config_site and __config are concatenated to make a single __config. I'm imagining this is specific to using libc++ from the build tree? If so, you should use INTERFACE_INCLUDE_DIRECTORIES and $<BUILD_INTERFACE:...> to limit it to builds.

This revision now requires changes to proceed.Aug 6 2019, 7:26 PM

Hmm, yes, it is for use from the build tree. I don't see how INTERFACE_INCLUDE_DIRECTORIES can do a -include though. It has to be INTERFACE_COMPILE_OPTIONS or INTERFACE_COMPILE_DEFINITIONS.

Hmm, yes, it is for use from the build tree. I don't see how INTERFACE_INCLUDE_DIRECTORIES can do a -include though. It has to be INTERFACE_COMPILE_OPTIONS or INTERFACE_COMPILE_DEFINITIONS.

Sorry, that was me not thinking properly :D The comment about BUILD_INTERFACE stills stands though.