Commit graph

12 commits

Author SHA1 Message Date
Johan Engelen
fffeb85b5c Add search logic for AddressSanitizer library on Linuxes. (#2214)
* Make exe_path API a little more flexible.

* Add search logic for AddressSanitizer library on Linuxes.
2017-07-21 19:51:30 +02:00
Martin
1fb269f940 Drop support for LLVM < 3.7 2017-07-16 02:18:00 +02:00
Johan Engelen
f4949f957a AddressSanitizer, Darwin: add support for linking with correct library when found in LDC's lib dir. (#2188)
This PR is only meant to change Darwin link line with -fsanitize=address. With this PR, I can use addresssanitizer successfully (and easily) on my Mac.
The PR finds a libldc_rt.asan_osx_dynamic.dylib or libclang_rt.asan_osx_dynamic.dylib in LDC's lib dir, and falls back to the old behavior (passing -fsanitize=address to the linker driver) if nothing is found. So now the user can copy his self-built library to LDC's lib dir and be happy :-)
(the cmake script could copy+rename the library to the lib dir when the library is found in the LLVM binaries)
2017-07-14 16:07:32 +02:00
Johan Engelen
4d10b9a64e Use ASCII hyphen character in linker-gcc.cpp. 2017-06-25 23:09:41 +02:00
Johan Engelen
22b1accb59 Replace -sanitize with -fsanitize and add -fsanitize-coverage. (#2149)
This reworks the sanitizer interface to be identical with Clang's.
What's left to do is pass the correct runtime libraries to the linker.
2017-06-15 17:19:21 +02:00
Martin
383c2d3a59 Range-ify usages of front-end Arrays 2017-06-04 00:29:44 +02:00
Martin
9fd7fa2d90 Add experimental -link-internally switch to enable LLD opt-in
And infer CMake LDC_WITH_LLD automatically based on availability of LLVM
3.9+ with LLD headers & libs.
2017-05-29 22:45:32 +02:00
Martin
ede23642ef Add first version of ld linker driver as ArgsBuilder specialization 2017-05-27 03:30:25 +02:00
Martin
9416d334c6 Introduce ArgsBuilder::addLdFlag() 2017-05-27 03:02:31 +02:00
Martin
1339c02598 Incorporate LTO stuff in GCC ArgsBuilder 2017-05-27 02:42:07 +02:00
Martin
9c86ae9ad0 Refactor generation of GCC linker command line 2017-05-27 02:27:17 +02:00
Martin
ecbfa0e52a Move GCC driver to dedicated driver/linker-gcc.cpp 2017-05-27 02:23:49 +02:00