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 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits