@@ -2132,7 +2132,6 @@ public final class SwiftCompilerSpec : CompilerSpec, SpecIdentifierType, SwiftDi
2132
2132
2133
2133
// Compute the inputs and object output dependency paths.
2134
2134
// Note that we compute the object file output paths here even if the compilation mode won't produce any, because these paths are used to compute the paths to other generated files.
2135
- // FIXME: If we want to match what Xcode did, then when using non-parallel WMO, we should include $(TARGET_NAME)-master.o as an output file, but not include the per-input-file object files as output files.
2136
2135
let outputObjectExtension : String
2137
2136
switch cbc. scope. evaluate ( BuiltinMacros . SWIFT_LTO) {
2138
2137
case . yes, . yesThin:
@@ -2161,11 +2160,11 @@ public final class SwiftCompilerSpec : CompilerSpec, SpecIdentifierType, SwiftDi
2161
2160
2162
2161
// Add const metadata outputs to extra compilation outputs
2163
2162
if await supportConstSupplementaryMetadata ( cbc, delegate, compilationMode: compilationMode) {
2164
- // If using whole module optimization then we use the -master .swiftconstvalues file from the sole compilation task.
2163
+ // If using whole module optimization then we use the -primary .swiftconstvalues file from the sole compilation task.
2165
2164
if isUsingWholeModuleOptimization {
2166
2165
if let outputPath = objectOutputPaths. first {
2167
- let masterSwiftBaseName = cbc. scope. evaluate ( BuiltinMacros . TARGET_NAME) + compilationMode. moduleBaseNameSuffix + " -master "
2168
- let supplementaryConstMetadataOutputPath = outputPath. dirname. join ( masterSwiftBaseName + " .swiftconstvalues " )
2166
+ let primarySwiftBaseName = cbc. scope. evaluate ( BuiltinMacros . TARGET_NAME) + compilationMode. moduleBaseNameSuffix + " -primary "
2167
+ let supplementaryConstMetadataOutputPath = outputPath. dirname. join ( primarySwiftBaseName + " .swiftconstvalues " )
2169
2168
extraOutputPaths. append ( supplementaryConstMetadataOutputPath)
2170
2169
delegate. declareGeneratedSwiftConstMetadataFile ( supplementaryConstMetadataOutputPath, architecture: arch)
2171
2170
}
@@ -2232,11 +2231,11 @@ public final class SwiftCompilerSpec : CompilerSpec, SpecIdentifierType, SwiftDi
2232
2231
//
2233
2232
// FIXME: Can we simplify this to not require the full macro scope?
2234
2233
//
2235
- // If using whole module optimization then we use the -master .d file as the dependency file.
2234
+ // If using whole module optimization then we use the -primary .d file as the dependency file.
2236
2235
if let outputPath = objectOutputPaths. first {
2237
2236
if Self . shouldUseWholeModuleOptimization ( for: cbc. scope) . result {
2238
- let masterSwiftBaseName = cbc. scope. evaluate ( BuiltinMacros . TARGET_NAME) + compilationMode. moduleBaseNameSuffix + " -master "
2239
- let dependenciesFilePath = outputPath. dirname. join ( masterSwiftBaseName + " .d " )
2237
+ let primarySwiftBaseName = cbc. scope. evaluate ( BuiltinMacros . TARGET_NAME) + compilationMode. moduleBaseNameSuffix + " -primary "
2238
+ let dependenciesFilePath = outputPath. dirname. join ( primarySwiftBaseName + " .d " )
2240
2239
return dependenciesFilePath
2241
2240
} else {
2242
2241
// if not using WMO, we use the first .d file as all are the same
@@ -2348,8 +2347,8 @@ public final class SwiftCompilerSpec : CompilerSpec, SpecIdentifierType, SwiftDi
2348
2347
let dependencyData : DependencyDataStyle ?
2349
2348
if await shouldEmitMakeStyleDependencies ( cbc. producer, cbc. scope, delegate: delegate) {
2350
2349
// FIXME: Duplication with `SwiftCompilerSpec.computeOutputFileMapContents`
2351
- let masterSwiftBaseName = cbc. scope. evaluate ( BuiltinMacros . TARGET_NAME) + compilationMode. moduleBaseNameSuffix + " -master "
2352
- let emitModuleDependenciesFilePath = objectFileDir. join ( masterSwiftBaseName + " -emit-module.d " )
2350
+ let primarySwiftBaseName = cbc. scope. evaluate ( BuiltinMacros . TARGET_NAME) + compilationMode. moduleBaseNameSuffix + " -primary "
2351
+ let emitModuleDependenciesFilePath = objectFileDir. join ( primarySwiftBaseName + " -emit-module.d " )
2353
2352
dependencyData = eagerCompilationEnabled ? . makefileIgnoringSubsequentOutputs( emitModuleDependenciesFilePath) : dependencyInfoPath. map ( DependencyDataStyle . makefileIgnoringSubsequentOutputs)
2354
2353
} else {
2355
2354
dependencyData = nil
@@ -2755,7 +2754,7 @@ public final class SwiftCompilerSpec : CompilerSpec, SpecIdentifierType, SwiftDi
2755
2754
moduleDirPath = scope. evaluate ( BuiltinMacros . BUILT_PRODUCTS_DIR) . join ( moduleName + " .swiftmodule " )
2756
2755
}
2757
2756
if isProject {
2758
- // Copy this content to the Project subdir so we could master them out when installing.
2757
+ // Copy this content to the Project subdir so we can exclude them by filename pattern when installing.
2759
2758
return moduleDirPath. join ( " Project " )
2760
2759
}
2761
2760
return moduleDirPath
@@ -3047,7 +3046,7 @@ public final class SwiftCompilerSpec : CompilerSpec, SpecIdentifierType, SwiftDi
3047
3046
3048
3047
// Compute strings that will be used at various points when building the map.
3049
3048
let moduleBaseNameSuffix = compilationMode. moduleBaseNameSuffix
3050
- let masterSwiftBaseName = cbc. scope. evaluate ( BuiltinMacros . TARGET_NAME) + moduleBaseNameSuffix + " -master "
3049
+ let primarySwiftBaseName = cbc. scope. evaluate ( BuiltinMacros . TARGET_NAME) + moduleBaseNameSuffix + " -primary "
3051
3050
let emitConstSideCarValues = await supportConstSupplementaryMetadata ( cbc, delegate, compilationMode: compilationMode)
3052
3051
3053
3052
func createCommonFileEntry( input: FileToBuild ) -> ( objectFilePath: Path , fileMapEntry: SwiftOutputFileMap . Entry ) {
@@ -3110,25 +3109,25 @@ public final class SwiftCompilerSpec : CompilerSpec, SpecIdentifierType, SwiftDi
3110
3109
var fileMapEntry = SwiftOutputFileMap . Entry ( )
3111
3110
3112
3111
// The file used by Swift to manage intermodule dependencies.
3113
- let globalSwiftDependenciesFilePath = objectFileDir. join ( masterSwiftBaseName + " .swiftdeps " )
3112
+ let globalSwiftDependenciesFilePath = objectFileDir. join ( primarySwiftBaseName + " .swiftdeps " )
3114
3113
fileMapEntry. swiftDependencies = globalSwiftDependenciesFilePath. str
3115
3114
3116
3115
// The diagnostics file.
3117
- let diagnosticsFilePath = objectFileDir. join ( masterSwiftBaseName + " .dia " )
3116
+ let diagnosticsFilePath = objectFileDir. join ( primarySwiftBaseName + " .dia " )
3118
3117
fileMapEntry. diagnostics = diagnosticsFilePath. str
3119
3118
3120
3119
// The diagnostics file for emit-module jobs.
3121
- let emitModuleDiagnosticsFilePath = objectFileDir. join ( masterSwiftBaseName + " -emit-module.dia " )
3120
+ let emitModuleDiagnosticsFilePath = objectFileDir. join ( primarySwiftBaseName + " -emit-module.dia " )
3122
3121
fileMapEntry. emitModuleDiagnostics = emitModuleDiagnosticsFilePath. str
3123
3122
3124
3123
if await shouldEmitMakeStyleDependencies ( cbc. producer, cbc. scope, delegate: delegate) {
3125
3124
// The dependency file for emit-module jobs.
3126
- let emitModuleDependenciesFilePath = objectFileDir. join ( masterSwiftBaseName + " -emit-module.d " )
3125
+ let emitModuleDependenciesFilePath = objectFileDir. join ( primarySwiftBaseName + " -emit-module.d " )
3127
3126
fileMapEntry. emitModuleDependencies = emitModuleDependenciesFilePath. str
3128
3127
}
3129
3128
3130
3129
// The PCH file path for generatePCH job.
3131
- let bridgingHeaderPCHPath = objectFileDir. join ( masterSwiftBaseName + " -Bridging-header.pch " )
3130
+ let bridgingHeaderPCHPath = objectFileDir. join ( primarySwiftBaseName + " -Bridging-header.pch " )
3132
3131
fileMapEntry. pch = bridgingHeaderPCHPath. str
3133
3132
3134
3133
// Add the global entry to the map.
@@ -3146,35 +3145,35 @@ public final class SwiftCompilerSpec : CompilerSpec, SpecIdentifierType, SwiftDi
3146
3145
var fileMapEntry = SwiftOutputFileMap . Entry ( )
3147
3146
3148
3147
// The diagnostics file.
3149
- let diagnosticsFilePath = objectFileDir. join ( masterSwiftBaseName + " .dia " )
3148
+ let diagnosticsFilePath = objectFileDir. join ( primarySwiftBaseName + " .dia " )
3150
3149
fileMapEntry. diagnostics = diagnosticsFilePath. str
3151
3150
3152
3151
// The diagnostics file for emit-module jobs.
3153
- let emitModuleDiagnosticsFilePath = objectFileDir. join ( masterSwiftBaseName + " -emit-module.dia " )
3152
+ let emitModuleDiagnosticsFilePath = objectFileDir. join ( primarySwiftBaseName + " -emit-module.dia " )
3154
3153
fileMapEntry. emitModuleDiagnostics = emitModuleDiagnosticsFilePath. str
3155
3154
3156
3155
if await shouldEmitMakeStyleDependencies ( cbc. producer, cbc. scope, delegate: delegate) {
3157
3156
// The dependency file for emit-module jobs.
3158
- let emitModuleDependenciesFilePath = objectFileDir. join ( masterSwiftBaseName + " -emit-module.d " )
3157
+ let emitModuleDependenciesFilePath = objectFileDir. join ( primarySwiftBaseName + " -emit-module.d " )
3159
3158
fileMapEntry. emitModuleDependencies = emitModuleDependenciesFilePath. str
3160
3159
3161
3160
3162
3161
// The dependencies file, used to discover implicit dependencies. This file will be in Makefile format.
3163
- let dependenciesFilePath = objectFileDir. join ( masterSwiftBaseName + " .d " )
3162
+ let dependenciesFilePath = objectFileDir. join ( primarySwiftBaseName + " .d " )
3164
3163
fileMapEntry. dependencies = dependenciesFilePath. str
3165
3164
}
3166
3165
3167
3166
// The file used by Swift to manage intermodule dependencies.
3168
- let swiftDependenciesFilePath = objectFileDir. join ( masterSwiftBaseName + " .swiftdeps " )
3167
+ let swiftDependenciesFilePath = objectFileDir. join ( primarySwiftBaseName + " .swiftdeps " )
3169
3168
fileMapEntry. swiftDependencies = swiftDependenciesFilePath. str
3170
3169
3171
3170
// The requested compile-time values
3172
3171
if emitConstSideCarValues && compilationMode. compileSources {
3173
- fileMapEntry. constValues = objectFileDir. join ( masterSwiftBaseName + " .swiftconstvalues " ) . str
3172
+ fileMapEntry. constValues = objectFileDir. join ( primarySwiftBaseName + " .swiftconstvalues " ) . str
3174
3173
}
3175
3174
3176
3175
// The PCH file path for generatePCH job.
3177
- let bridgingHeaderPCHPath = objectFileDir. join ( masterSwiftBaseName + " -Bridging-header.pch " )
3176
+ let bridgingHeaderPCHPath = objectFileDir. join ( primarySwiftBaseName + " -Bridging-header.pch " )
3178
3177
fileMapEntry. pch = bridgingHeaderPCHPath. str
3179
3178
3180
3179
// Add the global entry to the map.
0 commit comments