Skip to content

Commit

Permalink
Only build swiftlint target in Makefile (realm#4327)
Browse files Browse the repository at this point in the history
Otherwise this tries to build the SwiftLintTestHelpers module in release
mode, which fails.

Also, to build the actual executable CLI, we can't just
`swift build --target=swiftlint` because that doesn't produce a CLI,
just the object file for the binary. So we have to `swift run`.
  • Loading branch information
jpsim authored Oct 7, 2022
1 parent 0c06b7f commit 3ac518c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ clean_xcode:
$(BUILD_TOOL) $(XCODEFLAGS) -configuration Test clean

build_x86_64:
swift build $(SWIFT_BUILD_FLAGS) --arch x86_64
swift run $(SWIFT_BUILD_FLAGS) --arch x86_64 swiftlint version

build_arm64:
swift build $(SWIFT_BUILD_FLAGS) --arch arm64
swift run $(SWIFT_BUILD_FLAGS) --arch arm64 swiftlint version

build: clean build_x86_64 build_arm64
# Need to build for each arch independently to work around https://bugs.swift.org/browse/SR-15802
Expand Down

0 comments on commit 3ac518c

Please sign in to comment.