Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Sources/SWBCore/SWBFeatureFlag.swift
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,6 @@ public enum SWBFeatureFlag {
/// Remove this feature flag after landing rdar://104894978 (Write "perform-ownership-analysis" = "yes" to build manifest by default)
public static let performOwnershipAnalysis = SWBFeatureFlagProperty("PerformOwnershipAnalysis", defaultValue: false)

/// Enable clang explicit modules by default.
public static let enableClangExplicitModulesByDefault = SWBFeatureFlagProperty("EnableClangExplicitModulesByDefault", defaultValue: false)

/// Enable Swift explicit modules by default.
public static let enableSwiftExplicitModulesByDefault = SWBFeatureFlagProperty("EnableSwiftExplicitModulesByDefault", defaultValue: false)

Expand Down
4 changes: 0 additions & 4 deletions Sources/SWBCore/Settings/Settings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -573,10 +573,6 @@ final class WorkspaceSettings: Sendable {
table.push(BuiltinMacros.EXPERIMENTAL_ALLOW_INSTALL_HEADERS_FILTERING, literal: true)
}

if SWBFeatureFlag.enableClangExplicitModulesByDefault.value {
table.push(BuiltinMacros.CLANG_ENABLE_EXPLICIT_MODULES, literal: true)
}

if SWBFeatureFlag.enableSwiftExplicitModulesByDefault.value {
table.push(BuiltinMacros.SWIFT_ENABLE_EXPLICIT_MODULES, literal: .enabled)
}
Expand Down
3 changes: 2 additions & 1 deletion Sources/SWBCore/SpecImplementations/Tools/CCompiler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,8 @@ public class ClangCompilerSpec : CompilerSpec, SpecIdentifierType, GCCCompatible
// Check that this is the same toolchain and version as the compiler. Mismatched clang/libclang is not supported with explicit modules.
let compilerAndLibraryAreInSameToolchain = toolchainPath.isAncestor(of: compiler)
let libclangVersion = cbc.producer.lookupLibclang(path: path).version
let compilerAndLibraryVersionsMatch = libclangVersion != nil && libclangVersion == clangInfo?.clangVersion
// On macOS we enforce a matching clang and libclang version, the versioning schemes on other host platforms currently make this difficult.
let compilerAndLibraryVersionsMatch = libclangVersion != nil && libclangVersion == clangInfo?.clangVersion || cbc.producer.hostOperatingSystem != .macOS
if compilerAndLibraryAreInSameToolchain && (compilerAndLibraryVersionsMatch || cbc.scope.evaluate(BuiltinMacros.CLANG_EXPLICIT_MODULES_IGNORE_LIBCLANG_VERSION_MISMATCH)) {
return path
}
Expand Down
Loading
Loading