Skip to content

Commit

Permalink
Pass -enable-library-evolution for PackageDescription/Plugin in Linux (
Browse files Browse the repository at this point in the history
…#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.
  • Loading branch information
drodriguez authored Feb 21, 2023
1 parent 208b836 commit 7147d9f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ let package = Package(
exclude: ["CMakeLists.txt"],
swiftSettings: [
.unsafeFlags(["-package-description-version", "999.0"]),
.unsafeFlags(["-enable-library-evolution"], .when(platforms: [.macOS]))
.unsafeFlags(["-enable-library-evolution"]),
]
),

Expand All @@ -170,7 +170,7 @@ let package = Package(
exclude: ["CMakeLists.txt"],
swiftSettings: [
.unsafeFlags(["-package-description-version", "999.0"]),
.unsafeFlags(["-enable-library-evolution"], .when(platforms: [.macOS]))
.unsafeFlags(["-enable-library-evolution"]),
]
),

Expand Down
4 changes: 2 additions & 2 deletions Sources/PackageDescription/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ add_library(PackageDescription

target_compile_options(PackageDescription PUBLIC
$<$<COMPILE_LANGUAGE:Swift>:-package-description-version$<SEMICOLON>999.0>)
target_compile_options(PackageDescription PUBLIC
$<$<COMPILE_LANGUAGE:Swift>:-enable-library-evolution>)

if(CMAKE_HOST_SYSTEM_NAME STREQUAL Darwin)
target_compile_options(PackageDescription PUBLIC
$<$<COMPILE_LANGUAGE:Swift>:-enable-library-evolution>)
set(SWIFT_INTERFACE_PATH ${CMAKE_BINARY_DIR}/pm/ManifestAPI/PackageDescription.swiftinterface)
target_compile_options(PackageDescription PUBLIC
$<$<COMPILE_LANGUAGE:Swift>:-emit-module-interface-path$<SEMICOLON>${SWIFT_INTERFACE_PATH}>)
Expand Down
4 changes: 2 additions & 2 deletions Sources/PackagePlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ add_library(PackagePlugin SHARED

target_compile_options(PackagePlugin PUBLIC
$<$<COMPILE_LANGUAGE:Swift>:-package-description-version$<SEMICOLON>999.0>)
target_compile_options(PackagePlugin PUBLIC
$<$<COMPILE_LANGUAGE:Swift>:-enable-library-evolution>)

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

0 comments on commit 7147d9f

Please sign in to comment.