Skip to content

Commit 9bee9f7

Browse files
committed
Fix Examples/Embedded not building with Swift 6.2.3
The package should build with the Embedded Swift SDK triple and should no longer provide its own allocator or other shim functions,
1 parent 7704862 commit 9bee9f7

File tree

3 files changed

+2
-53
lines changed

3 files changed

+2
-53
lines changed

Examples/Embedded/Package.swift

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,17 @@ let package = Package(
66
name: "Embedded",
77
dependencies: [
88
.package(name: "JavaScriptKit", path: "../../"),
9-
.package(url: "https://github.com/swiftwasm/swift-dlmalloc", branch: "0.1.0"),
109
],
1110
targets: [
1211
.executableTarget(
1312
name: "EmbeddedApp",
1413
dependencies: [
1514
"JavaScriptKit",
16-
.product(name: "dlmalloc", package: "swift-dlmalloc"),
1715
],
18-
cSettings: [.unsafeFlags(["-fdeclspec"])],
1916
swiftSettings: [
2017
.enableExperimentalFeature("Embedded"),
2118
.enableExperimentalFeature("Extern"),
22-
.unsafeFlags([
23-
"-Xfrontend", "-gnone",
24-
"-Xfrontend", "-disable-stack-protector",
25-
]),
2619
],
27-
linkerSettings: [
28-
.unsafeFlags([
29-
"-Xclang-linker", "-nostdlib",
30-
"-Xlinker", "--no-entry",
31-
"-Xlinker", "--export-if-defined=__main_argc_argv",
32-
])
33-
]
3420
)
3521
],
3622
swiftLanguageModes: [.v5]

Examples/Embedded/Sources/EmbeddedApp/_thingsThatShouldNotBeNeeded.swift

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

Examples/Embedded/build.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/bin/bash
22
set -euxo pipefail
33
package_dir="$(cd "$(dirname "$0")" && pwd)"
4-
JAVASCRIPTKIT_EXPERIMENTAL_EMBEDDED_WASM=true \
5-
swift package --package-path "$package_dir" \
6-
-c release --triple wasm32-unknown-none-wasm js
4+
swift package --package-path "$package_dir" \
5+
-c release --swift-sdk "$(swiftc -print-target-info | jq -r '.swiftCompilerTag')_wasm-embedded" js

0 commit comments

Comments
 (0)