After listening to Chandlers presentation at Going native 2013,
I think "lld" should add a buildbot configuration to turn on building lld with -fsanitize options and have buildbot configurations to run on
* darwin
* linux (ubuntu).
I was not really sure on if llvm changes use a buildbot with the -fsanitize options turned on / how stable the llvm libraries are when compiled using those options.
Does it make sense to have
* llvm built in the normal way
* just build lld with the options -fsanitize=address,undefined,memory options ?
(or)
* build all the sources including lld with the options -fsanitize=address,undefined,memory
There are existing Darwin and Win7 builders, and a few Debian configs that also build lld. I'd support enabling the sanitizers on these builds as is. Also, tsan especially because lld uses threads.
If you'd like an Ubuntu bot, somebody is going to have to provide one.
FYI We have an upstream bootstrap bot (http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap) that does a number of things including running llvm/clang tests under ASan/MSan. Probably we can add a couple of steps that would checkout lld and run check-lld in ASan-ified/MSan-ified build trees.
Does it build with libstdc++? I've got this with fresh clang, -std=c++11:
In file included from ../projects/lld/lib/ReaderWriter/ELF/./SectionChunks.h:19:
In file included from ../projects/lld/include/lld/Core/Parallel.h:28:
In file included from
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/condition_variable:38:
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/chrono:535:6:
error: no matching constructor for initialization of 'duration' (aka
'std::chrono::duration<long, std::ratio<1, 1000000> >')
: __d(__t.time_since_epoch())
The bootstrap bot currently builds with libstdc++. AFAIU, lld does not
support that.
It would need to be switched to libc++. Also, MSan uses a precompiled,
instrumented libstdc++ binary, which should be replaced with libc++
built from source. We've got a script for it, which is not used at the
moment: