Skip to content

Commit 020bc8d

Browse files
committed
Remove vendored dlmalloc as unused
WASI-libc from which `dlmalloc` was vendored is already included in latest Swift SDKs for Wasm.
1 parent 0a34e54 commit 020bc8d

File tree

2 files changed

+4
-63
lines changed

2 files changed

+4
-63
lines changed

Guest/Package.swift

Lines changed: 3 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -15,63 +15,25 @@
1515

1616
import PackageDescription
1717

18-
let embeddedSwiftSettings: [SwiftSetting] = [
19-
.enableExperimentalFeature("Embedded"),
20-
.enableExperimentalFeature("Extern"),
21-
.interoperabilityMode(.Cxx),
22-
.unsafeFlags(["-wmo", "-disable-cmo", "-Xfrontend", "-gnone", "-Xfrontend", "-disable-stack-protector"]),
23-
]
24-
25-
let embeddedCSettings: [CSetting] = [
26-
.unsafeFlags(["-fdeclspec"]),
27-
]
28-
29-
let linkerSettings: [LinkerSetting] = [
30-
.unsafeFlags([
31-
"-Xclang-linker", "-nostdlib",
32-
"-Xlinker", "--no-entry",
33-
]),
34-
]
35-
36-
let libcSettings: [CSetting] = [
37-
.define("LACKS_TIME_H"),
38-
.define("LACKS_SYS_TYPES_H"),
39-
.define("LACKS_STDLIB_H"),
40-
.define("LACKS_STRING_H"),
41-
.define("LACKS_SYS_MMAN_H"),
42-
.define("LACKS_FCNTL_H"),
43-
.define("NO_MALLOC_STATS", to: "1"),
44-
.define("__wasilibc_unmodified_upstream"),
45-
]
46-
4718
let package = Package(
4819
name: "Guest",
4920
targets: [
5021
// Targets are the basic building blocks of a package, defining a module or a test suite.
5122
// Targets can depend on other targets in this package and products from dependencies.
5223
.executableTarget(
5324
name: "Plotter",
54-
dependencies: ["dlmalloc"],
55-
cSettings: embeddedCSettings,
56-
swiftSettings: embeddedSwiftSettings,
57-
linkerSettings: linkerSettings
25+
swiftSettings: [.enableExperimentalFeature("Extern")]
5826
),
5927
.target(name: "VultDSP"),
60-
.target(
61-
name: "dlmalloc",
62-
cSettings: libcSettings
63-
),
6428
]
6529
)
6630

6731
for module in ["Kick", "HiHat", "Bass", "Mix"] {
6832
package.targets.append(
6933
.executableTarget(
7034
name: module,
71-
dependencies: ["VultDSP", "dlmalloc"],
72-
cSettings: embeddedCSettings,
73-
swiftSettings: embeddedSwiftSettings,
74-
linkerSettings: linkerSettings
35+
dependencies: ["VultDSP"],
36+
swiftSettings: [.interoperabilityMode(.Cxx), .enableExperimentalFeature("Extern")]
7537
)
7638
)
7739
}

LICENSE-vendored.md

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,3 @@
1-
# WASI libc
2-
3-
Code in `Sources/dlmalloc` directory is derived from WASI libc: https://github.com/WebAssembly/wasi-libc
4-
5-
wasi-libc as a whole is multi-licensed under the
6-
Apache License v2.0 with LLVM Exceptions, the Apache License v2.0, and
7-
the MIT License. See the LICENSE-APACHE-LLVM, LICENSE-APACHE and LICENSE-MIT
8-
files, respectively, for details.
9-
10-
Portions of this software are derived from third-party works covered by
11-
their own licenses:
12-
13-
dlmalloc/ - CC0; see the notice in malloc.c for details
14-
emmalloc/ - MIT; see the notice in emmalloc.c for details
15-
libc-bottom-half/cloudlibc/ - BSD-2-Clause; see the LICENSE file for details
16-
libc-top-half/musl/ - MIT; see the COPYRIGHT file for details
17-
18-
wasi-libc's changes to these files are multi-licensed under the
19-
Apache License v2.0 with LLVM Exceptions, the Apache License v2.0,
20-
the MIT License, and the original licenses of the third-party works.
21-
221
# WavAudioEncoder.js
232

243
`.wav` format encoding implementation is derived from WavAudioEncoder.js library https://github.com/higuma/wav-audio-encoder-js and is licensed as following:
@@ -69,4 +48,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
6948
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
7049
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
7150
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
72-
SOFTWARE.
51+
SOFTWARE.

0 commit comments

Comments
 (0)