[all-commits] [llvm/llvm-project] 75d028: [runtimes] Probe for -nostdlib++ and -nostdinc++ w...
Martin Storsjö via All-commits
all-commits at lists.llvm.org
Thu Oct 24 13:46:25 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 75d0281bc81f0040c24d15bdf9c5cc46e9237224
https://github.com/llvm/llvm-project/commit/75d0281bc81f0040c24d15bdf9c5cc46e9237224
Author: Martin Storsjö <martin at martin.st>
Date: 2024-10-24 (Thu, 24 Oct 2024)
Changed paths:
M libcxx/cmake/config-ix.cmake
M libcxxabi/cmake/config-ix.cmake
M libcxxabi/src/CMakeLists.txt
M libunwind/cmake/config-ix.cmake
M libunwind/src/CMakeLists.txt
M runtimes/CMakeLists.txt
Log Message:
-----------
[runtimes] Probe for -nostdlib++ and -nostdinc++ with the C compiler (#108357)
While these flags semantically are relevant only for C++, we do add them
to CMAKE_REQUIRED_FLAGS if they are detected. All flags in that variable
are used both when testing compilation of C and C++ (and for detecting
libraries, which uses the C compiler driver).
Therefore, to be sure we safely can add the flags to
CMAKE_REQUIRED_FLAGS, test for the option with the C language.
This should fix compilation with GCC; newer versions of GCC do support
the -nostdlib++ option, but it's only supported by the C++ compiler
driver, not the C driver. (However, many builds of GCC also do accept
the option with the C driver, if GCC was compiled with Ada support
enabled, see [1]. That's why this issue isn't noticed in all
configurations with GCC.)
Clang does support these options in both C and C++ driver modes.
This should fix #90332.
[1]
https://github.com/llvm/llvm-project/issues/90332#issuecomment-2325099254
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list