You're right that ASAN+gold in our build system is wonky. It works but clang actually calls out to ld rather than gold. I think this is purely because we pass -Wl,-fuse-ld=gold instead of -fuse-ld=gold.
I confirmed that clang can call out to gold correctly if you give it the right option: $IMPALA_TOOLCHAIN/llvm-3.8.0-p1/bin/clang -v -B $IMPALA_TOOLCHAIN/binutils-2.26-p1/bin/ -Wall -fuse-ld=gold -fsanitize=address helloworld.c -o helloworld && ./helloworld The last lines of output are: "/opt/Impala-Toolchain/binutils-2.26-p1/bin/ld.gold" -z relro --hash-style=gnu --build-id --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o helloworld /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5.4.0/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/5.4.0 -L/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../.. -L/opt/Impala-Toolchain/llvm-3.8.0-p1/bin/../lib -L/lib -L/usr/lib -whole-archive /opt/Impala-Toolchain/llvm-3.8.0-p1/bin/../lib/clang/3.8.0/lib/linux/libclang_rt.asan-x86_64.a -no-whole-archive --dynamic-list=/opt/Impala-Toolchain/llvm-3.8.0-p1/bin/../lib/clang/3.8.0/lib/linux/libclang_rt.asan-x86_64.a.syms /tmp/helloworld-eb4915.o --no-as-needed -lpthread -lrt -lm -ldl -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/5.4.0/crtend.o /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/crtn.o Hello world On Thu, Oct 13, 2016 at 8:28 AM, Jim Apple <jbap...@cloudera.com> wrote: > I think clang doesn't have a CLI option to use gold. Does buildall.sh -asan > interact well with gold? > > On Thu, Oct 13, 2016 at 8:25 AM, Tim Armstrong <tarmstr...@cloudera.com> > wrote: > > > The gold linker is much faster for building static binaries so will be > much > > friendlier for new developers. > > > > I don't think I've seen a problem attributable to gold since it was > added ~ > > 6 months ago. I've been using it since then and we've been using it for > > some Impala test jobs as well for at least a couple of months. I feel > > confident that any major problems have been shaken out. > > > > Does anyone have any objections? > > > > - Tim > > >