Skip to content

Commit 4b69ec6

Browse files
committed
Disable unsupported sanitizers on Windows
1 parent 59877f1 commit 4b69ec6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Sources/SwiftDriver/Jobs/Toolchain+LinkerSupport.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,13 @@ extension Toolchain {
119119
parsedOptions: inout ParsedOptions,
120120
isShared: Bool
121121
) throws -> Bool {
122+
// Currently only ASAN is supported on Windows, but clang builds may
123+
// include runtime libraries for unsupported sanitizers. Manually
124+
// disable unsupported sanitizers.
125+
if targetTriple.isWindows && sanitizer != .address {
126+
return false
127+
}
128+
122129
let runtimeName = try runtimeLibraryName(
123130
for: sanitizer,
124131
targetTriple: targetTriple,

0 commit comments

Comments
 (0)