File tree Expand file tree Collapse file tree 3 files changed +42
-2
lines changed
Sources/SWBUniversalPlatform/Specs Expand file tree Collapse file tree 3 files changed +42
-2
lines changed Original file line number Diff line number Diff line change 29022902 };
29032903 AdditionalLinkerArgs = {
29042904 YES = (
2905- "-fsanitize=address ",
2905+ "$(LD_ADDRESS_SANITIZER) ",
29062906 );
29072907 NO = ();
29082908 };
Original file line number Diff line number Diff line change 582582 DefaultValue = YES;
583583 },
584584
585+ // Address Sanitizer options
586+ {
587+ Name = LD_ADDRESS_SANITIZER;
588+ DefaultValue = "$(LD_OBJC_RUNTIME_ARGS_$(LINKER_DRIVER))";
589+ },
590+ {
591+ Name = LD_ADDRESS_SANITIZER_clang;
592+ DefaultValue = "--fsanitize=address";
593+ },
594+ {
595+ Name = LD_ADDRESS_SANITIZER_swiftc;
596+ DefaultValue = "-sanitize=address";
597+ },
598+
599+
585600 // Thread Sanitizer options
586601 {
587602 Name = "LD_THREAD_SANITIZER";
588603 Type = Boolean;
589604 DefaultValue = "$(ENABLE_THREAD_SANITIZER)";
605+ },
606+ {
607+ Name = "CLANG_LD_THREAD_SANITIZER";
608+ Type = Boolean;
609+ DefaultValue = "$(LD_THREAD_SANITIZER)";
590610 Architectures = (
591611 x86_64,
592612 x86_64h,
593613 arm64,
594614 arm64e,
595615 );
616+ Condition = "$(LINKER_DRIVER) == clang";
596617 CommandLineArgs = {
597618 YES = (
598619 "-fsanitize=thread",
601622 };
602623 // Not visible in the build settings editor
603624 },
625+ {
626+ Name = "SWIFTC_LD_THREAD_SANITIZER";
627+ Type = Boolean;
628+ DefaultValue = "$(LD_THREAD_SANITIZER)";
629+ Architectures = (
630+ x86_64,
631+ x86_64h,
632+ arm64,
633+ arm64e,
634+ );
635+ Condition = "$(LINKER_DRIVER) == swiftc";
636+ CommandLineArgs = {
637+ YES = (
638+ "-sanitize=thread",
639+ );
640+ NO = ();
641+ };
642+ // Not visible in the build settings editor
643+ },
604644
605645 {
606646 Name = "LD_DEBUG_VARIANT";
Original file line number Diff line number Diff line change 12251225 };
12261226 AdditionalLinkerArgs = {
12271227 YES = (
1228- "-fsanitize=address ",
1228+ "$(LD_ADDRESS_SANITIZER) ",
12291229 );
12301230 NO = ();
12311231 };
You can’t perform that action at this time.
0 commit comments