Skip to content

Commit b3f53c2

Browse files
committed
Remove JSC for now
1 parent c4efcee commit b3f53c2

File tree

5 files changed

+3
-301
lines changed

5 files changed

+3
-301
lines changed

tools/swift-plugin-server/CMakeLists.txt

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,8 @@ if (SWIFT_BUILD_SWIFT_SYNTAX)
66
FetchContent_Declare(WasmKit SOURCE_DIR "${PROJECT_SOURCE_DIR}/../wasmkit")
77
FetchContent_MakeAvailable(WasmKit)
88

9-
set(SWIFT_WASM_ALLOW_JSC ON CACHE BOOL "Use JavaScriptCore Wasm runtime if possible" FORCE)
10-
11-
if(SWIFT_HOST_VARIANT_SDK IN_LIST SWIFT_DARWIN_PLATFORMS)
12-
set(swift_wasm_use_jsc ${SWIFT_WASM_ALLOW_JSC})
13-
else()
14-
set(swift_wasm_use_jsc OFF)
15-
endif()
16-
17-
if (swift_wasm_use_jsc)
18-
set(wasi_dep WASI)
19-
set(jsc_defines SWIFT_WASM_USE_JSC)
20-
else()
21-
set(wasi_dep WasmKitWASI)
22-
set(jsc_defines)
23-
endif()
24-
259
add_pure_swift_host_tool(swift-plugin-server
2610
Sources/swift-plugin-server/swift-plugin-server.swift
27-
Sources/swift-plugin-server/JSCWasmEngine.swift
2811
Sources/swift-plugin-server/WasmEngine.swift
2912
Sources/swift-plugin-server/WasmKitEngine.swift
3013
Sources/swift-plugin-server/WasmMessageHandler.swift
@@ -33,14 +16,7 @@ if (SWIFT_BUILD_SWIFT_SYNTAX)
3316
SWIFT_DEPENDENCIES
3417
SwiftCompilerPluginMessageHandling
3518
SwiftLibraryPluginProvider
19+
SystemPackage
3620
${wasi_dep}
3721
)
38-
39-
target_compile_definitions(swift-plugin-server PRIVATE ${jsc_defines})
40-
41-
if (swift_wasm_use_jsc)
42-
add_custom_command(TARGET swift-plugin-server POST_BUILD COMMAND
43-
codesign -fs - $<TARGET_FILE:swift-plugin-server> --entitlements ${CMAKE_CURRENT_SOURCE_DIR}/allow-jit.plist
44-
)
45-
endif()
4622
endif()

tools/swift-plugin-server/Package.swift

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
import PackageDescription
44

5-
let allowJSC = true
6-
75
let package = Package(
86
name: "swift-plugin-server",
97
platforms: [
@@ -20,11 +18,8 @@ let package = Package(
2018
.product(name: "SwiftCompilerPluginMessageHandling", package: "swift-syntax"),
2119
.product(name: "SwiftLibraryPluginProvider", package: "swift-syntax"),
2220
.product(name: "WASI", package: "WasmKit"),
23-
.product(name: "WasmKitWASI", package: "WasmKit", condition: .when(
24-
platforms: [.linux, .windows] + (allowJSC ? [] : [.macOS])
25-
)),
26-
],
27-
swiftSettings: allowJSC ? [.define("SWIFT_WASM_USE_JSC", .when(platforms: [.macOS]))] : []
21+
.product(name: "WasmKitWASI", package: "WasmKit"),
22+
]
2823
),
2924
],
3025
cxxLanguageStandard: .cxx17

tools/swift-plugin-server/Sources/swift-plugin-server/JSCWasmEngine.swift

Lines changed: 0 additions & 257 deletions
This file was deleted.

tools/swift-plugin-server/Sources/swift-plugin-server/WasmKitEngine.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#if !SWIFT_WASM_USE_JSC
14-
1513
import WASI
1614
import WasmKit
1715
import WasmKitWASI
@@ -39,5 +37,3 @@ struct WasmKitEngine: WasmEngine {
3937
return { args in try function.invoke(args.map(Value.i32), runtime: runtime).map(\.i32) }
4038
}
4139
}
42-
43-
#endif

tools/swift-plugin-server/allow-jit.plist

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)