[flang-commits] [clang] [flang] [flang][driver] Make -stdlib= option visible to flang and silently ignored by it (PR #110598)

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Thu Oct 3 06:50:42 PDT 2024


tblah wrote:

We discussed this further offline and I am now convinced there could be a valid usecase for this. Some C++ code might use header-only parts of the C++ standard library. Setting `-stdlib=` will effect the include paths clang uses for stdlib when compiling.

When flang links the program it will not link to a C++ library by default so it is correct that this does nothing. But if cmake wants to include CXXFLAGS inside of LDFLAGS, it is more user friendly to allow this flag.

If the user uses something that would require linking to the C++ library they will get a linker error not silent linking to the wrong c++ library.

https://github.com/llvm/llvm-project/pull/110598


More information about the flang-commits mailing list