[flang-commits] [flang] Reland "[flang] Avoid undefined behaviour when parsing format expressions (#147539)" (PR #148169)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Fri Jul 11 03:28:07 PDT 2025
tblah wrote:
The intention of the rule is to allow people to run fortran programs on systems that do not have C++ standard libraries installed. A header-only dependency on these LLVM functions should be okay because they don't call anything else. Similarly, header-only dependencies on libc++ are okay (like the use of std::numeric_limits here) because that won't create a runtime dependency between flang-rt and the c++ library.
But now that you mention it, I agree this is a less brittle approach so that we don't accidentally end up with runtime dependencies on libc++ because of a change in an llvm header.
However, currently I am getting "multiple definitions of Fortran::common::AddOverflow" when linking flang-rt with your change. I am linking using /usr/bin/ld, building with gcc, and `-DBUILD_SHARED_LIBS=ON`. My build did succeed with clang, lld and no shared libs.
https://github.com/llvm/llvm-project/pull/148169
More information about the flang-commits
mailing list