You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a normal bootstrapping build the compiler is Clang, so it will always be added. It inherits to all runtimes libraries.
While it may make sense for libc++ to not depend on itself or another C++ standard library, the assumption breaks for any other LLVM runtime library that use C++, which included any GTest-based unittests. Tracking its history, it seems to have first been added in d3ebe71, but just temporarily. The temporary part was dropped at some point. The flags should only be added in those libraries that need it.
Adding those flags globally for all runtimes causes problems in system introspection. e.g.:
#108357 is solving a specific problem that C++ flag is also used for check_c_source_compiles which break with gcc. But I don't want -nostdlib++ at all in CMAKE_REQUIRED_FLAGS -- independent of whether it is accepted by the C and/or C++ compiler. The entire underlying assumption that none of the runtime libraries will not use the pre-installed standard library is conceptionally wrong.
The flags
-nostdlib++
and-nostdinc++
are added to CMAKE_REQUIRED_FLAGS whenever supported by the compiler:llvm-project/runtimes/CMakeLists.txt
Line 161 in dcd5e47
llvm-project/runtimes/CMakeLists.txt
Line 157 in dcd5e47
For a normal bootstrapping build the compiler is Clang, so it will always be added. It inherits to all runtimes libraries.
While it may make sense for libc++ to not depend on itself or another C++ standard library, the assumption breaks for any other LLVM runtime library that use C++, which included any GTest-based unittests. Tracking its history, it seems to have first been added in d3ebe71, but just temporarily. The temporary part was dropped at some point. The flags should only be added in those libraries that need it.
Adding those flags globally for all runtimes causes problems in system introspection. e.g.:
-nostdlib++
added toCMAKE_REQUIRED_FLAGS
breaks hwloc detection for OMPT #90332The text was updated successfully, but these errors were encountered: