Skip to content

Commit db2620b

Browse files
authored
Expose LD_DONT_RUN_DEDUPLICATION setting to SwiftPM with correct cross-platform behavior (#429)
1 parent ac358da commit db2620b

File tree

6 files changed

+26
-0
lines changed

6 files changed

+26
-0
lines changed

Sources/SWBGenericUnixPlatform/Specs/UnixLd.xcspec

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,12 @@
138138
Type = Path;
139139
Condition = "NO";
140140
},
141+
{
142+
// Unsupported
143+
Name = "LD_WARN_DUPLICATE_LIBRARIES";
144+
Type = Boolean;
145+
Condition = "NO";
146+
},
141147
{
142148
// Don't deduplicate is broken in gold
143149
Name = "LD_DONT_RUN_DEDUPLICATION";

Sources/SWBProjectModel/PIFGenerationModel.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,7 @@ public enum PIF {
980980
public var IS_ZIPPERED: String?
981981
public var KEEP_PRIVATE_EXTERNS: String?
982982
public var LD_RUNPATH_SEARCH_PATHS: [String]?
983+
public var LD_WARN_DUPLICATE_LIBRARIES: String?
983984
public var LIBRARY_SEARCH_PATHS: [String]?
984985
public var LINKER_DRIVER: String?
985986
public var CLANG_COVERAGE_MAPPING_LINKER_ARGS: String?

Sources/SWBQNXPlatform/Specs/QNXLd.xcspec

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,12 @@
132132
Type = Path;
133133
Condition = "NO";
134134
},
135+
{
136+
// Unsupported
137+
Name = "LD_WARN_DUPLICATE_LIBRARIES";
138+
Type = Boolean;
139+
Condition = "NO";
140+
},
135141
{
136142
// Don't deduplicate is broken in gold
137143
Name = "LD_DONT_RUN_DEDUPLICATION";

Sources/SWBWebAssemblyPlatform/Specs/WasmLd.xcspec

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@
107107
DefaultValue = YES;
108108
Condition = "NO";
109109
},
110+
{
111+
// Unsupported
112+
Name = "LD_WARN_DUPLICATE_LIBRARIES";
113+
Type = Boolean;
114+
Condition = "NO";
115+
},
110116
{
111117
// wasm-ld doesn't support dependency info
112118
Name = "LD_DEPENDENCY_INFO_FILE";

Sources/SWBWindowsPlatform/Specs/WindowsLd.xcspec

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,12 @@
153153
Type = Path;
154154
Condition = "NO";
155155
},
156+
{
157+
// Unsupported
158+
Name = "LD_WARN_DUPLICATE_LIBRARIES";
159+
Type = Boolean;
160+
Condition = "NO";
161+
},
156162
{
157163
// Don't deduplicate is broken in gold
158164
Name = "LD_DONT_RUN_DEDUPLICATION";

Sources/SwiftBuild/ProjectModel/BuildSettings.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ extension ProjectModel {
105105
case TAPI_DYLIB_INSTALL_NAME
106106
case TARGETED_DEVICE_FAMILY
107107
case LINKER_DRIVER
108+
case LD_WARN_DUPLICATE_LIBRARIES
108109
}
109110

110111
public enum MultipleValueSetting: String, CaseIterable, Sendable, Hashable, Codable {

0 commit comments

Comments
 (0)