Skip to content

Commit

Permalink
[Makefile] Avoid using -Xswiftc -static-stdlib if toolchain does no…
Browse files Browse the repository at this point in the history
…t have `usr/lib/swift_static` directory

This is required on building with Xcode 10.2, because Xcode 10.2’s toolchain does not have `usr/lib/swift_static` directory.
  • Loading branch information
norio-nomura committed Mar 20, 2019
1 parent ddab4a4 commit 398733a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ XCODEFLAGS=-workspace 'SwiftLint.xcworkspace' \
SWIFT_BUILD_FLAGS=--configuration release
UNAME=$(shell uname)
ifeq ($(UNAME), Darwin)
USE_SWIFT_STATIC_STDLIB:=$(shell test -d $$(dirname $$(xcrun --find swift))/../lib/swift_static/macosx && echo yes)
ifeq ($(USE_SWIFT_STATIC_STDLIB), yes)
SWIFT_BUILD_FLAGS+= -Xswiftc -static-stdlib
endif
endif

SWIFTLINT_EXECUTABLE=$(shell swift build $(SWIFT_BUILD_FLAGS) --show-bin-path)/swiftlint

Expand Down

0 comments on commit 398733a

Please sign in to comment.