[PATCH] D11963: Create a __config_site file to capture configuration decisions.

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 31 13:57:06 PDT 2015


EricWF added a comment.

In http://reviews.llvm.org/D11963#236376, @jroelofs wrote:

> In http://reviews.llvm.org/D11963#236045, @EricWF wrote:
>
> > So that's not what happens but that's because libc++ builds using the headers in the source directory. During the build all of the macros in the __config_site file are manually defined on the command line so that we don't need to use the generated headers. NOTE: The tests still use the generated headers though.
>
>
> Oh, I didn't catch that you were setting this up to build from the headers in the source directory.


Yeah, I worry this patch is very unclear. To sum the steps CMake takes:

Configuration time:

1. Configure CMake and detect if the configuration requires any "__config_site" defines.
2. Add each "__config_site" definition to the command line manually. These are used during the build.
3. Generate a `build/__config_site` file containing each required definition.
4. If any "__config_site" definitions are required setup the tests to use `build/include/c++/v1`. Otherwise the tests will use `src/include` as they currently do.

Build time:

1. Copy `src/include` to `build/include/c++/v1`.
2. If any "__config_site" defines are needed prepend `build/__config_site` to `build/include/c++/v1/__config`.
3. Build libc++ using the headers in `src/include` and the "__config_site" definitions added in Configuration step #2. Note that the actual build ignores the generated headers.

Install Time:

1. Do build steps including regenerating build headers.
2. Install headers in `build/include/c++/v1`.


http://reviews.llvm.org/D11963





More information about the cfe-commits mailing list