@@ -1533,6 +1533,7 @@ public final class MixedTargetBuildDescription {
1533
1533
self . moduleMap = customModuleMapPath
1534
1534
self . allProductHeadersOverlay = productDirectory. appending ( component: allProductHeadersFilename)
1535
1535
1536
+ #if swift(>=5.4)
1536
1537
try VFSOverlay ( roots: [
1537
1538
VFSOverlay . Directory ( name: customModuleMapPath. parentDirectory. pathString) {
1538
1539
VFSOverlay . File (
@@ -1550,6 +1551,7 @@ public final class MixedTargetBuildDescription {
1550
1551
}
1551
1552
}
1552
1553
] ) . write ( to: self . allProductHeadersOverlay!, fileSystem: fileSystem)
1554
+ #endif
1553
1555
1554
1556
// When the mixed target does not have a custom module map, one will be
1555
1557
// generated as a product for use by clients.
@@ -1572,6 +1574,7 @@ public final class MixedTargetBuildDescription {
1572
1574
// If an umbrella header was generated, it needs to be
1573
1575
// overlayed within the public headers directory.
1574
1576
self . allProductHeadersOverlay = productDirectory. appending ( component: allProductHeadersFilename)
1577
+ #if swift(>=5.4)
1575
1578
try VFSOverlay ( roots: [
1576
1579
VFSOverlay . Directory ( name: mixedTarget. clangTarget. includeDir. pathString) {
1577
1580
VFSOverlay . Directory ( name: mixedTarget. c99name) {
@@ -1582,6 +1585,7 @@ public final class MixedTargetBuildDescription {
1582
1585
}
1583
1586
}
1584
1587
] ) . write ( to: self . allProductHeadersOverlay!, fileSystem: fileSystem)
1588
+ #endif
1585
1589
} else {
1586
1590
// Else, no product overlay is needed.
1587
1591
self . allProductHeadersOverlay = nil
@@ -1638,6 +1642,7 @@ public final class MixedTargetBuildDescription {
1638
1642
}
1639
1643
1640
1644
let allProductHeadersPath = intermediatesDirectory. appending ( component: allProductHeadersFilename)
1645
+ #if swift(>=5.4)
1641
1646
try VFSOverlay ( roots: [
1642
1647
VFSOverlay . Directory ( name: rootOverlayResourceDirectory. pathString) {
1643
1648
// Redirect the `module.modulemap` to the modified
@@ -1663,8 +1668,10 @@ public final class MixedTargetBuildDescription {
1663
1668
}
1664
1669
}
1665
1670
] ) . write ( to: allProductHeadersPath, fileSystem: fileSystem)
1671
+ #endif
1666
1672
1667
1673
let unextendedModuleMapOverlayPath = intermediatesDirectory. appending ( component: unextendedModuleOverlayFilename)
1674
+ #if swift(>=5.4)
1668
1675
try VFSOverlay ( roots: [
1669
1676
VFSOverlay . Directory ( name: rootOverlayResourceDirectory. pathString) {
1670
1677
// Redirect the `module.modulemap` to the *unextended*
@@ -1675,6 +1682,7 @@ public final class MixedTargetBuildDescription {
1675
1682
)
1676
1683
}
1677
1684
] ) . write ( to: unextendedModuleMapOverlayPath, fileSystem: fileSystem)
1685
+ #endif
1678
1686
1679
1687
// 4. Tie everything together by passing build flags.
1680
1688
0 commit comments