Skip to content

Expose LD_WARN_DUPLICATE_LIBRARIES setting to SwiftPM with correct cross-platform behavior #429

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 23, 2025
Merged
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
6 changes: 6 additions & 0 deletions Sources/SWBGenericUnixPlatform/Specs/UnixLd.xcspec
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@
Type = Path;
Condition = "NO";
},
{
// Unsupported
Name = "LD_WARN_DUPLICATE_LIBRARIES";
Type = Boolean;
Condition = "NO";
},
{
// Don't deduplicate is broken in gold
Name = "LD_DONT_RUN_DEDUPLICATION";
Expand Down
1 change: 1 addition & 0 deletions Sources/SWBProjectModel/PIFGenerationModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,7 @@ public enum PIF {
public var IS_ZIPPERED: String?
public var KEEP_PRIVATE_EXTERNS: String?
public var LD_RUNPATH_SEARCH_PATHS: [String]?
public var LD_WARN_DUPLICATE_LIBRARIES: String?
public var LIBRARY_SEARCH_PATHS: [String]?
public var LINKER_DRIVER: String?
public var CLANG_COVERAGE_MAPPING_LINKER_ARGS: String?
Expand Down
6 changes: 6 additions & 0 deletions Sources/SWBQNXPlatform/Specs/QNXLd.xcspec
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@
Type = Path;
Condition = "NO";
},
{
// Unsupported
Name = "LD_WARN_DUPLICATE_LIBRARIES";
Type = Boolean;
Condition = "NO";
},
{
// Don't deduplicate is broken in gold
Name = "LD_DONT_RUN_DEDUPLICATION";
Expand Down
6 changes: 6 additions & 0 deletions Sources/SWBWebAssemblyPlatform/Specs/WasmLd.xcspec
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@
DefaultValue = YES;
Condition = "NO";
},
{
// Unsupported
Name = "LD_WARN_DUPLICATE_LIBRARIES";
Type = Boolean;
Condition = "NO";
},
{
// wasm-ld doesn't support dependency info
Name = "LD_DEPENDENCY_INFO_FILE";
Expand Down
6 changes: 6 additions & 0 deletions Sources/SWBWindowsPlatform/Specs/WindowsLd.xcspec
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@
Type = Path;
Condition = "NO";
},
{
// Unsupported
Name = "LD_WARN_DUPLICATE_LIBRARIES";
Type = Boolean;
Condition = "NO";
},
{
// Don't deduplicate is broken in gold
Name = "LD_DONT_RUN_DEDUPLICATION";
Expand Down
1 change: 1 addition & 0 deletions Sources/SwiftBuild/ProjectModel/BuildSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ extension ProjectModel {
case TAPI_DYLIB_INSTALL_NAME
case TARGETED_DEVICE_FAMILY
case LINKER_DRIVER
case LD_WARN_DUPLICATE_LIBRARIES
}

public enum MultipleValueSetting: String, CaseIterable, Sendable, Hashable, Codable {
Expand Down