Fix build

This commit is contained in:
Isaac
2024-09-19 00:37:24 +08:00
parent 3cc76b3e40
commit 21d5fe177b
5 changed files with 16 additions and 3 deletions

View File

@@ -100,13 +100,14 @@ class BazelCommandLine:
# https://github.com/bazelbuild/rules_swift
# Use -Osize instead of -O when building swift modules.
#'--features=swift.opt_uses_osize',
'--features=swift.opt_uses_osize',
# --num-threads 0 forces swiftc to generate one object file per module; it:
# 1. resolves issues with the linker caused by the swift-objc mixing.
# 2. makes the resulting binaries significantly smaller (up to 9% for this project).
'--swiftcopt=-num-threads', '--swiftcopt=1',
#'--swiftcopt=-num-threads', '--swiftcopt=1',
'--swiftcopt=-j1',
'--features=swift._num_threads_0_in_swiftcopts',
# Strip unsused code.
'--features=dead_strip',