Strip autolink custom section (#390)

This commit is contained in:
Yuta Saito 2023-03-31 01:10:19 +09:00 committed by GitHub
parent 9c2ac5f756
commit 8b73e3d4fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View File

@ -240,8 +240,8 @@
"repositoryURL": "https://github.com/swiftwasm/WasmTransformer", "repositoryURL": "https://github.com/swiftwasm/WasmTransformer",
"state": { "state": {
"branch": null, "branch": null,
"revision": "41548065647ba1b83ce8774a004763719458c2e6", "revision": "d04b31f61b6f528a9a96ebfe4fa4275e333eba82",
"version": "0.4.1" "version": "0.5.0"
} }
}, },
{ {

View File

@ -38,7 +38,7 @@ let package = Package(
.package(url: "https://github.com/JohnSundell/Splash.git", from: "0.16.0"), .package(url: "https://github.com/JohnSundell/Splash.git", from: "0.16.0"),
.package( .package(
url: "https://github.com/swiftwasm/WasmTransformer", url: "https://github.com/swiftwasm/WasmTransformer",
.upToNextMinor(from: "0.4.1") .upToNextMinor(from: "0.5.0")
), ),
], ],
targets: [ targets: [

View File

@ -70,6 +70,10 @@ public final class Builder {
}) })
transformers.append(transformer.transform) transformers.append(transformer.transform)
} }
// Strip unnecessary autolink sections, which is only used at link-time
transformers.append(CustomSectionStripper(stripIf: {
$0 == ".swift1_autolink_entries"
}).transform)
switch flavor.sanitize { switch flavor.sanitize {
case .stackOverflow: case .stackOverflow: