[libc-commits] [clang] [compiler-rt] [flang] [libc] [libcxx] [libcxxabi] [libunwind] [llvm] [openmp] [Flang] Move builtin .mod generation into runtimes (Reapply #137828) (PR #171515)
Petr Hosek via libc-commits
libc-commits at lists.llvm.org
Mon Apr 27 01:10:02 PDT 2026
================
@@ -6762,6 +6762,17 @@ std::string Driver::GetFilePath(StringRef Name, const ToolChain &TC) const {
if (llvm::sys::fs::exists(Twine(P)))
return std::string(P);
+ // With Flang, also look for intrinsic modules
+ if (IsFlangMode()) {
+ if (std::optional<std::string> IntrPath =
+ TC.getDefaultIntrinsicModuleDir()) {
+ SmallString<128> P(*IntrPath);
+ llvm::sys::path::append(P, Name);
+ if (llvm::sys::fs::exists(P))
+ return std::string(P);
+ }
+ }
----------------
petrhosek wrote:
Is there a test for this?
https://github.com/llvm/llvm-project/pull/171515
More information about the libc-commits
mailing list