@@ -877,7 +877,11 @@ public final class PackageBuilder {
877
877
}
878
878
879
879
// Create the build setting assignment table for this target.
880
- let buildSettings = try self . buildSettings ( for: manifestTarget, targetRoot: potentialModule. path, cxxLanguageStandard: self . manifest. cxxLanguageStandard)
880
+ let buildSettings = try self . buildSettings (
881
+ for: manifestTarget,
882
+ targetRoot: potentialModule. path,
883
+ cxxLanguageStandard: self . manifest. cxxLanguageStandard
884
+ )
881
885
882
886
// Compute the path to public headers directory.
883
887
let publicHeaderComponent = manifestTarget. publicHeadersPath ?? ClangTarget . defaultPublicHeadersComponent
@@ -969,6 +973,7 @@ public final class PackageBuilder {
969
973
packageAccess: potentialModule. packageAccess,
970
974
swiftVersion: try self . swiftVersion ( ) ,
971
975
buildSettings: buildSettings,
976
+ buildSettingsDescription: manifestTarget. settings,
972
977
usesUnsafeFlags: manifestTarget. usesUnsafeFlags
973
978
)
974
979
} else {
@@ -1011,14 +1016,18 @@ public final class PackageBuilder {
1011
1016
ignored: ignored,
1012
1017
dependencies: dependencies,
1013
1018
buildSettings: buildSettings,
1019
+ buildSettingsDescription: manifestTarget. settings,
1014
1020
usesUnsafeFlags: manifestTarget. usesUnsafeFlags
1015
1021
)
1016
1022
}
1017
1023
}
1018
1024
1019
1025
/// Creates build setting assignment table for the given target.
1020
- func buildSettings( for target: TargetDescription ? , targetRoot: AbsolutePath , cxxLanguageStandard: String ? = nil ) throws -> BuildSettings
1021
- . AssignmentTable
1026
+ func buildSettings(
1027
+ for target: TargetDescription ? ,
1028
+ targetRoot: AbsolutePath ,
1029
+ cxxLanguageStandard: String ? = nil
1030
+ ) throws -> BuildSettings . AssignmentTable
1022
1031
{
1023
1032
var table = BuildSettings . AssignmentTable ( )
1024
1033
guard let target else { return table }
@@ -1653,23 +1662,21 @@ extension PackageBuilder {
1653
1662
let sources = Sources ( paths: [ sourceFile] , root: sourceFile. parentDirectory)
1654
1663
let buildSettings : BuildSettings . AssignmentTable
1655
1664
1656
- do {
1657
- let targetDescription = try TargetDescription (
1658
- name: name,
1659
- dependencies: dependencies
1660
- . map {
1661
- TargetDescription . Dependency. target ( name: $0. name)
1662
- } ,
1663
- path: sourceFile. parentDirectory. pathString,
1664
- sources: [ sourceFile. pathString] ,
1665
- type: . executable,
1666
- packageAccess: false
1667
- )
1668
- buildSettings = try self . buildSettings (
1669
- for: targetDescription,
1670
- targetRoot: sourceFile. parentDirectory
1671
- )
1672
- }
1665
+ let targetDescription = try TargetDescription (
1666
+ name: name,
1667
+ dependencies: dependencies
1668
+ . map {
1669
+ TargetDescription . Dependency. target ( name: $0. name)
1670
+ } ,
1671
+ path: sourceFile. parentDirectory. pathString,
1672
+ sources: [ sourceFile. pathString] ,
1673
+ type: . executable,
1674
+ packageAccess: false
1675
+ )
1676
+ buildSettings = try self . buildSettings (
1677
+ for: targetDescription,
1678
+ targetRoot: sourceFile. parentDirectory
1679
+ )
1673
1680
1674
1681
return SwiftTarget (
1675
1682
name: name,
@@ -1680,6 +1687,7 @@ extension PackageBuilder {
1680
1687
packageAccess: false ,
1681
1688
swiftVersion: try swiftVersion ( ) ,
1682
1689
buildSettings: buildSettings,
1690
+ buildSettingsDescription: targetDescription. settings,
1683
1691
usesUnsafeFlags: false
1684
1692
)
1685
1693
}
0 commit comments