Skip to content

Commit ad76067

Browse files
committed
Update notes about building for the Swift static linking changes.
Fixes apple#857.
1 parent 5451b6d commit ad76067

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Documentation/PLUGIN.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,17 @@ Building the plugin should be simple on any supported Swift platform:
3434
```
3535
$ git clone https://github.com/apple/swift-protobuf
3636
$ cd swift-protobuf
37-
$ swift build -c release -Xswiftc -static-stdlib
37+
$ swift build -c release
3838
```
3939

4040
This will create a binary called `protoc-gen-swift` in the
4141
`.build/release` directory. To install, just copy this one executable
4242
anywhere in your PATH.
4343

44+
NOTE: The Swift runtime support is now included with macOS. If you are
45+
using old Xcode versions or are on older system versions, you might need
46+
to use also use `--static-swift-stdlib` with `swift build`.
47+
4448
### Converting .proto files into Swift
4549

4650
To generate Swift output for your .proto files, you run the `protoc`

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,19 @@ build the protoc plugin:
127127

128128
```
129129
$ git checkout tags/[tag_name]
130-
$ swift build --static-swift-stdlib -c release
130+
$ swift build -c release
131131
```
132132

133133
This will create a binary called `protoc-gen-swift` in the `.build/release`
134134
directory.
135+
135136
To install, just copy this one executable into a directory that is
136137
part of your `PATH` environment variable.
137138

139+
NOTE: The Swift runtime support is now included with macOS. If you are
140+
using old Xcode versions or are on older system versions, you might need
141+
to use also use `--static-swift-stdlib` with `swift build`.
142+
138143
### Alternatively install via Homebrew
139144

140145
If you prefer using [Homebrew](https://brew.sh):

0 commit comments

Comments
 (0)