Build libcxx and libcxxabi from llvm-project#42730
Conversation
|
❤️ Can the other 2 submodules be removed now then? |
|
Actually removing them will break the build of older versions but they can surely be archived (made read-only). |
e7c57db to
b459bd5
Compare
|
I mean removed from the repo, so they are not cloned. Not removed from Github |
|
Ah, of course yes ... forgot that, thanks! |
b459bd5 to
a942788
Compare
|
Link error Declarations of C11 functions What is interesting is that in current master (without this PR), The alternative is to force-compile BoringSSL w/o atomics by commenting out the stuff after |
|
@azat @alexey-milovidov Just wondering, perhaps you have an idea or explanation for the link failure libcxx and libcxxabi are build directly from the llvm-project submodule? |
|
We are using old glibc without support for C11 (and we have to use the old glibc for compatibility). Let's check why BoringSSL decided to use C11. It should not, and also we should not have any checks in CMakeLists (all the configuration has to be predefined). |
This should be fixed by #43166
TL;DR; It started to fail because of
And because of this it does not include non-c++ version of a header, the fix is obvious, CXX library should not be linked for C (headers and so on). Also note that there is some trickery in the previous P.S. once this will be solved there will be some issues with the problem that |
If you will have the same header in both libraries you may have some tricky failures. And there is at least one header that exists in both: stdatomic.h Right now there is a workaround for this header, that allows to use C++ version of this header for C - the workaround is called "set _LIBCPP_COMPILER_CLANG_BASED not only for CXX" [1] and use include_next [2]. [1]: https://github.com/ClickHouse/libcxx/blob/9a457ab3c64a533a06922b386b284215c17ce627/include/__config#L39 [2]: https://github.com/ClickHouse/libcxx/blob/9a457ab3c64a533a06922b386b284215c17ce627/include/stdatomic.h#L223-L231 However ClickHouse#42730 changes this, and now it fails to compile because of this. Signed-off-by: Azat Khuzhin <[email protected]>
|
@azat Thanks a lot for checking + the fix. @kitaisreal This PR is ready, approve? Thanks. |
Resolves #42245
Changelog category (leave one):