We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f01760 commit d7d0ebbCopy full SHA for d7d0ebb
driver/main.cpp
@@ -636,6 +636,21 @@ static void registerPredefinedVersions() {
636
637
registerPredefinedTargetVersions();
638
639
+#if LDC_LLVM_VER >= 303
640
+ // Pass sanitizer arguments to linker. Requires clang.
641
+ if (opts::sanitize == opts::AddressSanitizer) {
642
+ VersionCondition::addPredefinedGlobalIdent("LDC_AddressSanitizer");
643
+ }
644
+
645
+ if (opts::sanitize == opts::MemorySanitizer) {
646
+ VersionCondition::addPredefinedGlobalIdent("LDC_MemorySanitizer");
647
648
649
+ if (opts::sanitize == opts::ThreadSanitizer) {
650
+ VersionCondition::addPredefinedGlobalIdent("LDC_ThreadSanitizer");
651
652
+#endif
653
654
// Expose LLVM version to runtime
655
#define STR(x) #x
656
#define XSTR(x) STR(x)
0 commit comments