Open kkwli opened 11 months ago
If I build flang with -DFLANG_DEFAULT_LINKER=lld, the system ld is used.
-DFLANG_DEFAULT_LINKER=lld
ld
$ bin/flang-new -### t0.f90 flang-new version 18.0.0 (git@github.com:kkwli/llvm-project.git d2d29288bd4f64e0966db42b821d84587501669b) Target: powerpc64le-unknown-linux-gnu Thread model: posix InstalledDir: /scratch/kli/wrk/f/build-temp/bin "/scratch/kli/wrk/f/build-temp/bin/flang-new" "-fc1" "-triple" "powerpc64le-unknown-linux-gnu" "-emit-obj" "-fcolor-diagnostics" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-target-cpu" "ppc64le" "-o" "/tmp/t0-7dd6ee.o" "-x" "f95-cpp-input" "t0.f90" "/usr/lib/gcc/ppc64le-redhat-linux/12/../../../../bin/ld" "--hash-style=gnu" "--eh-frame-hdr" "-m" "elf64lppc" "-pie" "-dynamic-linker" "/lib64/ld64.so.2" "-o" "a.out" "/lib/../lib64/Scrt1.o" "/lib/../lib64/crti.o" "/usr/lib/gcc/ppc64le-redhat-linux/12/crtbeginS.o" "-L/usr/lib/gcc/ppc64le-redhat-linux/12" "-L/usr/lib/gcc/ppc64le-redhat-linux/12/../../../../lib64" "-L/lib/../lib64" "-L/usr/lib/../lib64" "-L/lib" "-L/usr/lib" "/tmp/t0-7dd6ee.o" "-L/scratch/kli/wrk/f/build-temp/lib" "-lFortran_main" "-lFortranRuntime" "-lFortranDecimal" "-lm" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "/usr/lib/gcc/ppc64le-redhat-linux/12/crtendS.o" "/lib/../lib64/crtn.o"
However, if I use -DCLANG_DEFAULT_LINKER=lld, ld.lld is used.
-DCLANG_DEFAULT_LINKER=lld
ld.lld
$ bin/flang-new -### t0.f90 flang-new version 18.0.0 (git@github.com:kkwli/llvm-project.git d2d29288bd4f64e0966db42b821d84587501669b) Target: powerpc64le-unknown-linux-gnu Thread model: posix InstalledDir: /scratch/kli/wrk/f/build-temp/bin "/scratch/kli/wrk/f/build-temp/bin/flang-new" "-fc1" "-triple" "powerpc64le-unknown-linux-gnu" "-emit-obj" "-fcolor-diagnostics" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-target-cpu" "ppc64le" "-o" "/tmp/end-434412.o" "-x" "f95-cpp-input" "t0.f90" "/scratch/kli/wrk/f/build-temp/bin/ld.lld" "--hash-style=gnu" "--eh-frame-hdr" "-m" "elf64lppc" "-pie" "-dynamic-linker" "/lib64/ld64.so.2" "-o" "a.out" "/lib/../lib64/Scrt1.o" "/lib/../lib64/crti.o" "/usr/lib/gcc/ppc64le-redhat-linux/12/crtbeginS.o" "-L/usr/lib/gcc/ppc64le-redhat-linux/12" "-L/usr/lib/gcc/ppc64le-redhat-linux/12/../../../../lib64" "-L/lib/../lib64" "-L/usr/lib/../lib64" "-L/lib" "-L/usr/lib" "/tmp/end-434412.o" "-L/scratch/kli/wrk/f/build-temp/lib" "-lFortran_main" "-lFortranRuntime" "-lFortranDecimal" "-lm" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "/usr/lib/gcc/ppc64le-redhat-linux/12/crtendS.o" "/lib/../lib64/crtn.o"
@llvm/issue-subscribers-flang-driver
Author: None (kkwli)
@llvm/issue-subscribers-flang-build
If I build flang with
-DFLANG_DEFAULT_LINKER=lld
, the systemld
is used.However, if I use
-DCLANG_DEFAULT_LINKER=lld
,ld.lld
is used.