llvm@19 links against wrong libc++ library version #5849
-
Output of
|
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 1 reply
-
|
Seems to be an issue in your build scripts TBH. If I follow the We can see that we get linkage with the bundled libc++ and libunwind as desired. |
Beta Was this translation helpful? Give feedback.
-
|
From Probably I took the last hint ... Finally, using BTW, the include path is with Interestingly, my -I/opt/homebrew/opt/llvm/include
-L/opt/homebrew/opt/llvm/lib/c++
-L/opt/homebrew/opt/llvm/lib/unwind -lunwindIs this |
Beta Was this translation helpful? Give feedback.
-
|
How are you using |
Beta Was this translation helpful? Give feedback.
-
|
For my understanding, clang takes it as default without explicit CLI arguments like |
Beta Was this translation helpful? Give feedback.
-
|
Yes, as stated in the caveats, The configuration is equivalent to passing |
Beta Was this translation helpful? Give feedback.
-
|
Thank you @carlocab, using |
Beta Was this translation helpful? Give feedback.
-
|
Updated: I've set When I use clang++ directly, it works fine: But not for CMake, even when My test code: #include <execution>
#include <numeric>
#include <print>
#include <vector>
auto main() -> int {
auto vec = std::vector{ 1, 2, 3, 4, 5 };
auto sum = std::reduce(std::execution::par, vec.begin(), vec.end());
std::println("reduce: {}", sum);
return 0;
} |
Beta Was this translation helpful? Give feedback.
Yes, as stated in the caveats,
~/.config/clangis the configuredCLANG_CONFIG_FILE_USER_DIR, which is analogous to/opt/homebrew/etc/clangwhich is configured asCLANG_CONFIG_FILE_SYSTEM_DIR.The configuration is equivalent to passing
--config-user-dir="$HOME/.config/clang"directly in the command-line. In particular,~/.config/clangis a directory that contains your configuration files. You probably want to create a~/.config/clang/$TARGET_TRIPLE-clang++.cfgor~/.config/clang/clang++.cfginstead. See also the contents of/opt/homebrew/etc/clang.