[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)
Paul H. Hargrove via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 5 13:07:02 PDT 2025
PHHargrove wrote:
Testing with the two new commits _still_ fails to locate `libflang_rt.runtime.a` and *adds* a warning about a non-existent directory in the library search path.
```
$ /opt/llvm/bin/flang ~/Hello/hello.f
ld: warning: search path '/opt/llvm/lib/clang/22/lib/darwin' not found
ld: library 'flang_rt.runtime' not found
flang-22: error: linker command failed with exit code 1 (use -v to see invocation)
```
Again with `-v` to show the link command and confirm the hash of the commit tested:
```
$ /opt/llvm/bin/flang -v ~/Hello/hello.f
flang version 22.0.0git (git at github.com:llvm/llvm-project 3a61f7935c5331d1dbcb64cac1e06b3062012bfe)
Target: arm64-apple-darwin23.6.0
Thread model: posix
InstalledDir: /opt/llvm/bin
"/opt/llvm/bin/flang" -fc1 -triple arm64-apple-macosx14.0.0 -emit-obj -fcolor-diagnostics -mrelocation-model pic -pic-level 2 -target-cpu apple-m1 -target-feature +v8.4a -target-feature +aes -target-feature +altnzcv -target-feature +ccdp -target-feature +ccpp -target-feature +complxnum -target-feature +crc -target-feature +dotprod -target-feature +flagm -target-feature +fp-armv8 -target-feature +fp16fml -target-feature +fptoint -target-feature +fullfp16 -target-feature +jsconv -target-feature +lse -target-feature +neon -target-feature +pauth -target-feature +perfmon -target-feature +predres -target-feature +ras -target-feature +rcpc -target-feature +rdm -target-feature +sb -target-feature +sha2 -target-feature +sha3 -target-feature +specrestrict -target-feature +ssbs -resource-dir /opt/llvm/lib/clang/22 -mframe-pointer=non-leaf -o /var/folders/dt/tfds1s310vgbwph7tvcvqwlm0000gp/T/hello-c1467d.o -x f95 /Users/phhargrove/Hello/hello.f
"/usr/bin/ld" -demangle -lto_library /opt/llvm/lib/libLTO.dylib -no_deduplicate -dynamic -arch arm64 -platform_version macos 14.0.0 14.0.0 -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mllvm -enable-linkonceodr-outlining -o a.out /var/folders/dt/tfds1s310vgbwph7tvcvqwlm0000gp/T/hello-c1467d.o -L/opt/llvm/lib/clang/22/lib/darwin -L/opt/llvm/lib -lflang_rt.runtime -lSystem
ld: warning: search path '/opt/llvm/lib/clang/22/lib/darwin' not found
ld: library 'flang_rt.runtime' not found
flang-22: error: linker command failed with exit code 1 (use -v to see invocation)
```
FWIW:
```
$ ls -R /opt/llvm/lib/clang/22/lib
arm64-apple-darwin23.6.0
/opt/llvm/lib/clang/22/lib/arm64-apple-darwin23.6.0:
libflang_rt.runtime.a
```
https://github.com/llvm/llvm-project/pull/151954
More information about the llvm-commits
mailing list