[llvm-branch-commits] [clang] [flang] [lld] [llvm] [Flang] LLVM_ENABLE_RUNTIMES=flang-rt (PR #110217)
Michael Kruse via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun Nov 10 08:58:03 PST 2024
Meinersbur wrote:
> Overall I think the patch is fine pending some naming nits, my one concern is the `-U__GLIBCXX` stuff, because undefining internal vars seems really sketchy. Do we use `-nostdlib++` to make sure we don't link the C++ library?
There is a [test](https://github.com/llvm/llvm-project/blob/main/flang/test/Runtime/no-cpp-dep.c) that uses a C-compiler to link the runtime. This more portable than `-nostdlib++`.
[`_GLIBCXX_ASSERTIONS`](https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_macros.html) and [`_LIBCPP_ENABLE_ASSERTIONS`](https://releases.llvm.org/17.0.1/projects/libcxx/docs/UsingLibcxx.html) are used as described by their respective libraries and how it is done before this PR. For libstdc++ defining `_GLIBCXX_NO_ASSERTIONS=1` might be better than undefining something. For libc++ `_LIBCPP_ENABLE_ASSERTIONS` has beed [deprecated](https://reviews.llvm.org/D154997) in favor of [`_LIBCPP_HARDENING_MODE`](https://libcxx.llvm.org/Hardening.html). Changing that would be a different concern than addressed by this PR.
https://github.com/llvm/llvm-project/pull/110217
More information about the llvm-branch-commits
mailing list