Remove outdated destination file documentation
Destination files are no longer needed for linking with Foundation.
This commit is contained in:
parent
d70133a568
commit
3d57f175f6
39
README.md
39
README.md
|
@ -68,45 +68,6 @@ thanks to everyone supporting and maintaining those projects!)
|
|||
### Running `carton dev` with the `release` configuration
|
||||
By default `carton dev` will compile in the `debug` configuration. Add the `--release` flag to compile in the `release` configuration.
|
||||
|
||||
### Providing a destination file to `carton dev`
|
||||
The `carton dev` command can be passed an optional `destination.json` file to the `swift build` command it
|
||||
calls. Currently, this is required to be able to use `Foundation` in your code.
|
||||
|
||||
The specification of the `destination.json` can be found [here](https://github.com/apple/swift-package-manager/blob/master/Sources/Workspace/Destination.swift):
|
||||
|
||||
Below is a template allowing you to link to the right Foundation:
|
||||
```json
|
||||
{
|
||||
"version": 1,
|
||||
"sdk": "${PATH_TO_TOOLCHAIN}/usr/share/wasi-sysroot",
|
||||
"toolchain-bin-dir": "${PATH_TO_TOOLCHAIN}/usr/bin",
|
||||
"target": "wasm32-unknown-wasi",
|
||||
"extra-cc-flags": [
|
||||
""
|
||||
],
|
||||
"extra-cpp-flags": [
|
||||
""
|
||||
],
|
||||
"extra-swiftc-flags": [
|
||||
"-I", "${PATH_TO_TOOLCHAIN}/usr/lib/swift/wasi/wasm32",
|
||||
"-Xlinker", "-lCoreFoundation",
|
||||
"-Xlinker", "-lBlocksRuntime",
|
||||
"-Xlinker", "-licui18n",
|
||||
"-Xlinker", "-luuid"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
When using `carton` on MacOS, `${PATH_TO_TOOLCHAIN}` will usually be of the following
|
||||
format: `/Users/me/.carton/sdk/wasm-DEVELOPMENT-SNAPSHOT-2020-06-12-a/` or
|
||||
`/Users/me/.swiftenv/versions/wasm-DEVELOPMENT-SNAPSHOT-2020-06-12-a/` if you installed
|
||||
the SDK with [`swiftenv`](https://github.com/kylef/swiftenv).
|
||||
|
||||
Note that this path should really be consistent with the toolchain used by `carton`. So when you
|
||||
do not use a `swiftenv` based toolchain, you need to take care of specifying the correct one.
|
||||
|
||||
In the future, we'll make sure that this is taken care of by `carton` itself.
|
||||
|
||||
## Roadmap
|
||||
|
||||
Since a subset of Foundation and XCTest already work and are supplied in the latest snapshots of
|
||||
|
|
Loading…
Reference in New Issue