Skip to content

Commit 7147d9f

Browse files
authored
Pass -enable-library-evolution for PackageDescription/Plugin in Linux (#6157)
Reverts 1998284 / #3526 Related to SR-14718 (#4416). Since #3526 was merged, #5874 tried to apply the original idea of using `@_implementationOnly Foundation` in PackageDescription/Plugin to avoid leaking `Foundation` into the manifests.
1 parent 208b836 commit 7147d9f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ let package = Package(
158158
exclude: ["CMakeLists.txt"],
159159
swiftSettings: [
160160
.unsafeFlags(["-package-description-version", "999.0"]),
161-
.unsafeFlags(["-enable-library-evolution"], .when(platforms: [.macOS]))
161+
.unsafeFlags(["-enable-library-evolution"]),
162162
]
163163
),
164164

@@ -170,7 +170,7 @@ let package = Package(
170170
exclude: ["CMakeLists.txt"],
171171
swiftSettings: [
172172
.unsafeFlags(["-package-description-version", "999.0"]),
173-
.unsafeFlags(["-enable-library-evolution"], .when(platforms: [.macOS]))
173+
.unsafeFlags(["-enable-library-evolution"]),
174174
]
175175
),
176176

Sources/PackageDescription/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ add_library(PackageDescription
2525

2626
target_compile_options(PackageDescription PUBLIC
2727
$<$<COMPILE_LANGUAGE:Swift>:-package-description-version$<SEMICOLON>999.0>)
28+
target_compile_options(PackageDescription PUBLIC
29+
$<$<COMPILE_LANGUAGE:Swift>:-enable-library-evolution>)
2830

2931
if(CMAKE_HOST_SYSTEM_NAME STREQUAL Darwin)
30-
target_compile_options(PackageDescription PUBLIC
31-
$<$<COMPILE_LANGUAGE:Swift>:-enable-library-evolution>)
3232
set(SWIFT_INTERFACE_PATH ${CMAKE_BINARY_DIR}/pm/ManifestAPI/PackageDescription.swiftinterface)
3333
target_compile_options(PackageDescription PUBLIC
3434
$<$<COMPILE_LANGUAGE:Swift>:-emit-module-interface-path$<SEMICOLON>${SWIFT_INTERFACE_PATH}>)

Sources/PackagePlugin/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ add_library(PackagePlugin SHARED
2323

2424
target_compile_options(PackagePlugin PUBLIC
2525
$<$<COMPILE_LANGUAGE:Swift>:-package-description-version$<SEMICOLON>999.0>)
26+
target_compile_options(PackagePlugin PUBLIC
27+
$<$<COMPILE_LANGUAGE:Swift>:-enable-library-evolution>)
2628

2729
if(CMAKE_HOST_SYSTEM_NAME STREQUAL Darwin)
28-
target_compile_options(PackagePlugin PUBLIC
29-
$<$<COMPILE_LANGUAGE:Swift>:-enable-library-evolution>)
3030
set(SWIFT_INTERFACE_PATH ${CMAKE_BINARY_DIR}/pm/PluginAPI/PackagePlugin.swiftinterface)
3131
target_compile_options(PackagePlugin PUBLIC
3232
$<$<COMPILE_LANGUAGE:Swift>:-emit-module-interface-path$<SEMICOLON>${SWIFT_INTERFACE_PATH}>)

0 commit comments

Comments
 (0)