Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-72324

Toolchain v4 GCC uses system lld when building with -fuse-ld=lld

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • 135

      $ strace -f -o trace /opt/mongodbtoolchain/v4/bin/g++ -gno-record-gcc-switches -g2 -gdwarf-5 -gdwarf32 ./hello_world.cpp -o a.out.32 -fuse-ld=lld
      
      $ grep execve trace | grep /ld.lld
      62763 execve("/usr/bin/ld.lld", ["/usr/bin/ld.lld", "-plugin", "/opt/mongodbtoolchain/revisions/"..., "-plugin-opt=/opt/mongodbtoolchai"..., "-plugin-opt=-fresolution=/tmp/cc"..., "-plugin-opt=-pass-through=-lgcc_"..., "-plugin-opt=-pass-through=-lgcc", "-plugin-opt=-pass-through=-lc", "-plugin-opt=-pass-through=-lgcc_"..., "-plugin-opt=-pass-through=-lgcc", "--build-id", "--eh-frame-hdr", "--hash-style=gnu", "-m", "elf_x86_64", "-dynamic-linker", "/lib64/ld-linux-x86-64.so.2", "-o", "a.out.32", "/lib/x86_64-linux-gnu/crt1.o", "/lib/x86_64-linux-gnu/crti.o", "/opt/mongodbtoolchain/revisions/"..., "-L/opt/mongodbtoolchain/revision"..., "-L/opt/mongodbtoolchain/revision"..., "-L/lib/x86_64-linux-gnu", "-L/lib/../lib64", "-L/usr/lib/x86_64-linux-gnu", "-L/usr/lib/../lib64", "-L/opt/mongodbtoolchain/revision"..., "-L/opt/mongodbtoolchain/revision"..., "/tmp/cc2riUHv.o", "-lstdc++", ...], 0x7fff3374d448 /* 31 vars */ <unfinished ...>
      

      If there is no system ld.lld, the build fails.

            Assignee:
            daniel.moody@mongodb.com Daniel Moody
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: