Skip to content

Commit

Permalink
Makefile: fix compilation on linux for Swift 6.
Browse files Browse the repository at this point in the history
as specified in swiftlang/swift-package-manager@d1fdbbf
passing multiple archs is intended to allow compiling universal
binaries in macOS.
When compiling for Swift 6, passing these arguments in linux fails due
to the lack of xcode. For some reason this didn't prevent building prior
to Swift 6.
  • Loading branch information
AnessZurba committed Oct 10, 2024
1 parent 258bcb5 commit 3ee1e9c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ UNAME_S := $(shell uname -s)

ifeq ($(UNAME_S), Darwin)
BUILD_PATH_PREFIX := .build/apple/Products/Release
endif
ifeq ($(UNAME_S), Linux)
else ifeq ($(UNAME_S), Linux)
BUILD_PATH_PREFIX := .build/release
endif

Expand All @@ -25,7 +24,11 @@ install: build
cp -f $(BUILD_PATH) $(INSTALL_PATH)

build:
ifeq ($(UNAME_S), Darwin)
swift build --disable-sandbox -c release --arch arm64 --arch x86_64
else ifeq ($(UNAME_S), Linux)
swift build --disable-sandbox -c release
endif

uninstall:
rm -f $(INSTALL_PATH)
Expand Down

0 comments on commit 3ee1e9c

Please sign in to comment.