File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1515# Build configuration variables
1616# The default version ID 0.0.0 indicates a local development build or PRB
1717BUILD_CONFIGURATION ?= debug
18+ WARNINGS_AS_ERRORS ?= true
19+ SWIFT_CONFIGURATION = $(if $(filter-out false,$(WARNINGS_AS_ERRORS ) ) ,-Xswiftc -warnings-as-errors)
1820
1921# Commonly used locations
2022SWIFT := "/usr/bin/swift"
@@ -42,7 +44,7 @@ release: all
4244.PHONY : containerization
4345containerization :
4446 @echo Building containerization binaries...
45- @$(SWIFT ) build -c $(BUILD_CONFIGURATION )
47+ @$(SWIFT ) build -c $(BUILD_CONFIGURATION ) $( SWIFT_CONFIGURATION )
4648
4749 @echo Copying containerization binaries...
4850 @mkdir -p bin
@@ -71,7 +73,7 @@ cross-prep:
7173.PHONY : vminitd
7274vminitd :
7375 @mkdir -p ./bin
74- @" $( MAKE) " -C vminitd BUILD_CONFIGURATION=$(BUILD_CONFIGURATION )
76+ @" $( MAKE) " -C vminitd BUILD_CONFIGURATION=$(BUILD_CONFIGURATION ) WARNINGS_AS_ERRORS= $( WARNINGS_AS_ERRORS )
7577
7678.PHONY : update-libarchive-source
7779update-libarchive-source :
@@ -85,7 +87,7 @@ update-libarchive-source:
8587.PHONY : test
8688test :
8789 @echo Testing all test targets...
88- @$(SWIFT ) test --enable-code-coverage
90+ @$(SWIFT ) test --enable-code-coverage $( SWIFT_CONFIGURATION )
8991
9092.PHONY : integration
9193integration :
Original file line number Diff line number Diff line change 1313# limitations under the License.
1414
1515BUILD_CONFIGURATION := debug
16- SWIFT_CONFIGURATION := --swift-sdk aarch64-swift-linux-musl
16+ WARNINGS_AS_ERRORS ?= true
17+ SWIFT_WARNING_CONFIG = $(if $(filter-out false,$(WARNINGS_AS_ERRORS ) ) ,-Xswiftc -warnings-as-errors)
18+ SWIFT_CONFIGURATION := --swift-sdk aarch64-swift-linux-musl $(SWIFT_WARNING_CONFIG )
1719
1820SWIFT_VERSION = 6.2-snapshot-2025-06-25
1921SWIFT_SDK_URL = https://download.swift.org/swift-6.2-branch/static-sdk/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-06-25-a/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-06-25-a_static-linux-0.0.1.artifactbundle.tar.gz
You can’t perform that action at this time.
0 commit comments