Skip to content

Commit 7e9d341

Browse files
committed
Filter out unsupported sanitizers on Windows.
1 parent 64084a1 commit 7e9d341

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. Workaround
124+
// to filter out 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)