Skip to content

Commit e716565

Browse files
committed
updates
1 parent fe70b3a commit e716565

File tree

5 files changed

+4
-55
lines changed

5 files changed

+4
-55
lines changed

Sources/SWBCore/SpecImplementations/Tools/SwiftCompiler.swift

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2961,10 +2961,8 @@ public final class SwiftCompilerSpec : CompilerSpec, SpecIdentifierType, SwiftDi
29612961
// NOTE: With Swift in the OS, static libs aren't being supplied by the toolchains
29622962
// so users of this flag will need to provide their own.
29632963
if scope.evaluate(BuiltinMacros.SWIFT_FORCE_STATIC_LINK_STDLIB, lookup: lookup) {
2964-
print("staticallyLinkSwiftStdlib: true")
29652964
return true
29662965
}
2967-
print("staticallyLinkSwiftStdlib: false")
29682966
return false
29692967
}
29702968

@@ -3003,24 +3001,19 @@ public final class SwiftCompilerSpec : CompilerSpec, SpecIdentifierType, SwiftDi
30033001
if swiftLibraryPath.isEmpty {
30043002
// Look next to the compiler and in the toolchains for one.
30053003
if shouldStaticLinkStdlib {
3006-
print("Finding static lib search paths")
30073004
swiftLibraryPath = findSearchPathForLibrary(executablePath: swiftc, possibleNames: [
30083005
"swift_static/\(platformName)/lib\(swiftStdlibName).a",
30093006
"swift_static/lib\(swiftStdlibName).a",
30103007
"lib\(swiftStdlibName).a",
30113008
], toolchains: producer.toolchains) ?? Path("")
30123009
} else {
3013-
print("Finding dynamiclib search paths")
30143010
swiftLibraryPath = findSearchPathForLibrary(executablePath: swiftc, possibleNames: [
30153011
"swift/\(platformName)/lib\(swiftStdlibName).\(dynamicLibraryExtension)",
30163012
"swift/lib\(swiftStdlibName).\(dynamicLibraryExtension)",
30173013
"lib\(swiftStdlibName).\(dynamicLibraryExtension)",
30183014
], toolchains: producer.toolchains) ?? Path("")
30193015
}
3020-
} else {
3021-
print("swiftLibraryPath is not empty.")
30223016
}
3023-
print("********** swiftLibraryPath are: \(swiftLibraryPath)")
30243017

30253018
let isMacCatalystUnzippered = producer.sdkVariant?.isMacCatalyst == true && !scope.evaluate(BuiltinMacros.IS_ZIPPERED, lookup: lookup)
30263019

@@ -3030,12 +3023,12 @@ public final class SwiftCompilerSpec : CompilerSpec, SpecIdentifierType, SwiftDi
30303023
// TAPI requires absolute paths.
30313024
let sdkroot = scope.evaluate(BuiltinMacros.SDKROOT, lookup: lookup)
30323025
if !sdkroot.isEmpty {
3033-
sdkPathArgument = ["-L" + sdkroot.join("usr/lib/swift_static").str]
3026+
sdkPathArgument = ["-L" + sdkroot.join("usr/lib/swift").str]
30343027
unzipperedSDKPathArgument = ["-L" + sdkroot.join("System/iOSSupport/usr/lib/swift").str]
30353028
}
30363029
} else {
30373030
// ld prefers SDK relative paths.
3038-
sdkPathArgument = ["-L/usr/lib/swift_static"]
3031+
sdkPathArgument = ["-L/usr/lib/swift"]
30393032
unzipperedSDKPathArgument = ["-L/System/iOSSupport/usr/lib/swift"]
30403033
}
30413034

@@ -3046,7 +3039,6 @@ public final class SwiftCompilerSpec : CompilerSpec, SpecIdentifierType, SwiftDi
30463039
}
30473040

30483041
args += [sdkPathArgument]
3049-
print("**** SDK Parth arguments: \(sdkPathArgument)")
30503042
}
30513043

30523044
// Add the -L to the standard library path. This is used primarily for the OSS toolchain now as each of the libs have been moved into the Swift SDK.

Sources/SWBTaskExecution/TaskActions/EmbedSwiftStdLibTaskAction.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ fileprivate extension MachO {
2727
.flatMap { try $0.linkedLibraryPaths() }
2828
.compactMap { (lib: String) -> String? in
2929
let pcs = Path(lib)
30-
if (pcs.dirname.str == "@rpath" || pcs.dirname == Path("/usr/lib/swift_static")) && executableFileNameMatchesSwiftRuntimeLibPattern(pcs.basename) {
30+
if (pcs.dirname.str == "@rpath" || pcs.dirname == Path("/usr/lib/swift")) && executableFileNameMatchesSwiftRuntimeLibPattern(pcs.basename) {
3131
return pcs.basename
3232
}
3333
else {

Sources/SWBUniversalPlatform/Specs/Clang.xcspec

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -323,22 +323,6 @@
323323
);
324324
Category = LanguageObjC;
325325
},
326-
{
327-
Name = "CLANG_FORCE_STATIC_LINK_STDLIB";
328-
Type = Boolean;
329-
DefaultValue = "$(SWIFT_FORCE_STATIC_LINK_STDLIB)";
330-
CommandLineArgs = {
331-
YES = ();
332-
NO = ();
333-
};
334-
// This option is passed for linking to inform the compiler
335-
// that the ObjC runtime must be linked in (with possible
336-
// backwards compatibility libraries linked in).
337-
AdditionalLinkerArgs = {
338-
YES = ( "$(LD_FORCE_STATIC_LINK_STDLIB)" );
339-
NO = ();
340-
};
341-
},
342326
{
343327
Name = "CLANG_USE_RESPONSE_FILE";
344328
Type = Boolean;

Sources/SWBUniversalPlatform/Specs/Ld.xcspec

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -157,18 +157,6 @@
157157
Name = LD_OBJC_RUNTIME_ARGS_swiftc;
158158
DefaultValue = "-link-objc-runtime";
159159
},
160-
{
161-
Name = LD_FORCE_STATIC_LINK_STDLIB;
162-
DefaultValue = "$(LD_STATIC_LINK_ARGS$(LINKER_DRIVER))";
163-
},
164-
{
165-
Name = LD_FORCE_STATIC_LINK_STDLIB_clang;
166-
DefaultValue = "-static";
167-
},
168-
{
169-
Name = LD_FORCE_STATIC_LINK_STDLIB_swiftc;
170-
DefaultValue = "-force_load_swift_libs";
171-
},
172160
{
173161
Name = CLANG_SDKROOT_LINKER_INPUT;
174162
Type = Path;

Sources/SWBUniversalPlatform/Specs/Swift.xcspec

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,22 +1119,7 @@
11191119
NO = ();
11201120
};
11211121
},
1122-
{
1123-
Name = "SWIFT_FORCE_STATIC_LINK_STDLIB";
1124-
Type = Boolean;
1125-
DefaultValue = "$(SWIFT_FORCE_STATIC_LINK_STDLIB)";
1126-
CommandLineArgs = {
1127-
YES = ();
1128-
NO = ();
1129-
};
1130-
// This option is passed for linking to inform the compiler
1131-
// that the ObjC runtime must be linked in (with possible
1132-
// backwards compatibility libraries linked in).
1133-
AdditionalLinkerArgs = {
1134-
YES = ( "$(LD_FORCE_STATIC_LINK_STDLIB)" );
1135-
NO = ();
1136-
};
1137-
},
1122+
11381123
{
11391124
Name = "CLANG_COVERAGE_MAPPING";
11401125
Type = Boolean;

0 commit comments

Comments
 (0)