Skip to content

Commit

Permalink
Disable static linking to Swift standard libraries
Browse files Browse the repository at this point in the history
According to Apple: Swift compiler no longer supports statically linking the Swift libraries. They're included in the OS by default starting with macOS Mojave 10.14.4. For macOS Mojave 10.14.3 and earlier, there's an optional Swift library package that can be downloaded from "More Downloads" for Apple Developers at https://developer.apple.com/download/more/
  • Loading branch information
m13253 committed May 13, 2019
1 parent ebba9c8 commit 81f1cfb
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions darwin-wrapper/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,10 @@
SWIFTC = swiftc
PREFIX = /usr/local

SWIFTC_VERS = $(shell swiftc -version | grep -i swift | awk 'match($$0, /[0-9]/) {print substr($$0, RSTART, RLENGTH) }')

all: doh-logger
$(info SWIFTC_VERS="$(SWIFTC_VERS)")

doh-logger: doh-logger.swift
ifeq ($(SWIFTC_VERS), 5)
$(SWIFTC) -o $@ -O $<
else
$(SWIFTC) -o $@ -O -static-stdlib $<
endif
$(SWIFTC) -o $@ -O $<

clean:
rm -f doh-logger
Expand Down

0 comments on commit 81f1cfb

Please sign in to comment.