Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions utils/build-presets.ini
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ build-swift-stdlib-unittest-extra
skip-test-swift
skip-test-libdispatch
skip-test-foundation
skip-test-system

# This preset may be used by swift-corelibs-xctest contributors when building
# locally. It takes less time than the CI preset, but is less reliable at
Expand All @@ -450,6 +451,7 @@ test
skip-test-cmark
skip-test-swift
skip-test-foundation
skip-test-system
skip-build-benchmarks

[preset: buildbot_incremental_asan,tools=RDA,stdlib=RDA]
Expand Down Expand Up @@ -917,17 +919,20 @@ validation-test
long-test
stress-test
test-optimized
swift-system
foundation
libdispatch
indexstore-db
sourcekit-lsp
swiftdocc
lit-args=-v --time-tests
foundation-tests-build-type=Debug
swift-system-tests-build-type=Debug

# rdar://problem/31454823
lldb-test-swift-only

install-swift-system
install-foundation
install-libdispatch
install-swiftformat
Expand All @@ -950,6 +955,7 @@ skip-test-swiftdocc
mixin-preset=buildbot_linux

foundation-tests-build-type=Release
system-tests-build-type=Release

[preset: buildbot_linux_crosscompile_wasm]
mixin-preset=buildbot_linux
Expand Down Expand Up @@ -984,6 +990,7 @@ skip-test-swiftpm
skip-test-swift-driver
skip-test-xctest
skip-test-foundation
skip-test-system
skip-test-libdispatch
skip-test-playgroundsupport
skip-test-indexstore-db
Expand Down Expand Up @@ -1107,11 +1114,13 @@ release
test
validation-test
foundation
system
libdispatch
indexstore-db
sourcekit-lsp
lit-args=-v

install-swift-system
install-foundation
install-libdispatch
install-swiftformat
Expand All @@ -1120,6 +1129,7 @@ test-optimized
skip-test-swiftdocc
lldb-test-swift-only
foundation-tests-build-type=Debug
system-tests-build-type=Debug

# gcc version on amazon linux 2 is too old to configure and build tablegen.
# Use the clang that we install in the path for macros
Expand All @@ -1135,6 +1145,7 @@ test
validation-test
long-test
stress-test
system
foundation
lit-args=-v
indexstore-db=0
Expand All @@ -1146,6 +1157,7 @@ llbuild
lldb
# Not all tests pass, currently
#test
system
foundation
swiftpm
swift-driver
Expand All @@ -1160,6 +1172,7 @@ install-static-linux-config
install-swift
install-lldb
install-llbuild
install-swift-system
install-foundation
install-swiftpm
install-swift-driver
Expand Down Expand Up @@ -1226,12 +1239,14 @@ swift-driver
xctest
swift-testing
swift-testing-macros
system
foundation
libdispatch
swiftsyntax
swiftformat
indexstore-db
sourcekit-lsp
system-tests-build-type=Debug
foundation-tests-build-type=Debug

install-llvm
Expand All @@ -1241,6 +1256,7 @@ install-llbuild
install-swiftpm
install-swift-driver
install-swiftsyntax
install-swift-system
install-foundation
install-libdispatch
install-xctest
Expand Down Expand Up @@ -1357,6 +1373,7 @@ llvm-targets-to-build=X86;ARM;AArch64;WebAssembly
#===------------------------------------------------------------------------===#
[preset: mixin_freebsd_package_products]

system
foundation
indexstore-db
libdispatch
Expand All @@ -1374,6 +1391,7 @@ xctest
swift-install-components=autolink-driver;compiler;clang-resource-dir-symlink;libexec;stdlib;swift-remote-mirror;sdk-overlay;static-mirror-lib;toolchain-tools;license;sourcekit-inproc
llvm-install-components=llvm-ar;llvm-ranlib;llvm-cov;llvm-profdata;llvm-objdump;llvm-objcopy;llvm-symbolizer;IndexStore;clang;clang-resource-headers;builtins;runtimes;clangd;libclang;lld;LTO;clang-features-file

install-swift-system
install-foundation
install-libdispatch
install-llbuild
Expand Down Expand Up @@ -1923,6 +1941,7 @@ skip-test-osx

llvm-cmake-options=-DCLANG_DEFAULT_LINKER=gold

system
foundation
libdispatch
test
Expand All @@ -1934,6 +1953,7 @@ lldb-test-swift-only

skip-test-cmark
skip-test-swift
skip-test-system
skip-test-foundation

#===------------------------------------------------------------------------===#
Expand Down Expand Up @@ -1974,14 +1994,17 @@ infer-cross-compile-hosts-on-darwin
mixin-preset=mixin_swiftpm_base

libdispatch
system
foundation
xctest
libcxx=false

install-swift-system
install-foundation
install-libdispatch
install-xctest

skip-test-system
skip-test-foundation
skip-test-libdispatch
skip-test-xctest
Expand Down Expand Up @@ -2009,14 +2032,17 @@ skip-test-swiftpm
mixin-preset=mixin_swiftpm_base

libdispatch
system
foundation
xctest
libcxx=false

install-swift-system
install-foundation
install-libdispatch
install-xctest

skip-test-system
skip-test-foundation
skip-test-libdispatch
skip-test-xctest
Expand Down Expand Up @@ -2265,6 +2291,7 @@ swiftpm
xctest
swift-testing
swift-testing-macros
system
foundation
libdispatch
indexstore-db
Expand All @@ -2275,6 +2302,7 @@ release
validation-test
reconfigure

install-swift-system
install-foundation
install-libdispatch
install-libcxx
Expand All @@ -2293,6 +2321,7 @@ install-swiftformat
skip-test-cmark
skip-test-swift
skip-test-libdispatch
skip-test-system
skip-test-foundation

llvm-cmake-options=
Expand Down Expand Up @@ -3123,11 +3152,13 @@ install-symroot=%(install_symroot)s
[preset: source_compat_suite_linux_base]
mixin-preset=source_compat_suite_base
build-subdir=compat_linux
system
foundation
libdispatch
xctest
swift-testing
swift-testing-macros
install-swift-system
install-foundation
install-libdispatch
install-swift-testing
Expand Down Expand Up @@ -3209,6 +3240,7 @@ mixin-preset=

[preset: linux_lldb]
lldb
system
foundation
libdispatch
build-ninja
Expand All @@ -3221,6 +3253,7 @@ test
skip-test-cmark
skip-test-swift
skip-build-benchmarks
skip-test-system
skip-test-foundation

llvm-cmake-options=
Expand Down Expand Up @@ -3292,6 +3325,7 @@ mixin-preset=mixin_buildbot_linux,no_test
bootstrapping=hosttools

release
system
foundation
libdispatch

Expand All @@ -3311,6 +3345,7 @@ install-destdir=%(install_destdir)s

install-llvm
install-swift
install-swift-system
install-foundation
install-libdispatch

Expand All @@ -3332,6 +3367,7 @@ swift-include-tests=0
llvm-include-tests=0


system
foundation
libdispatch

Expand All @@ -3346,6 +3382,7 @@ llvm-install-components=llvm-ar;llvm-ranlib;clang;clang-resource-headers;builtin

install-llvm
install-swift
install-swift-system
install-foundation
install-libdispatch
install-llbuild
Expand Down Expand Up @@ -3431,6 +3468,7 @@ skip-test-llbuild
skip-test-swiftpm
skip-test-swift-driver
skip-test-xctest
skip-test-system
skip-test-foundation
skip-test-libdispatch
skip-test-playgroundsupport
Expand Down
3 changes: 2 additions & 1 deletion utils/build-script
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,12 @@ def apply_default_arguments(toolchain, args):
platform.system() != "Darwin"):
args.build_foundation = True

# Foundation has a dependency on libdispatch.
# Foundation has a dependency on libdispatch and System.
# On OS X, libdispatch is provided by the OS.
# On Linux, we must ensure that it is built manually.
if (args.build_foundation and
platform.system() != "Darwin"):
args.build_swift_system = True
args.build_libdispatch = True

if args.build_subdir is None:
Expand Down
2 changes: 1 addition & 1 deletion utils/build-windows-toolchain.bat
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ set TMPDIR=%BuildRoot%\tmp
set NINJA_STATUS=[%%f/%%t][%%p][%%es]

:: Build the -Test argument, if any, by subtracting skipped tests
set TestArg=-Test lld,lldb,swift,dispatch,foundation,xctest,swift-format,sourcekit-lsp,
set TestArg=-Test lld,lldb,swift,dispatch,system,foundation,xctest,swift-format,sourcekit-lsp,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a quick peek at build.ps1, it looks we may need to change the Build-Foundation function to add the SwiftSystem dependency.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we will need to re-organise the build a bit. We will need to add a new Build-System invocations in the SDK phases (should measure with static and dynamic linking) and pass that to the Foundation build.

for %%I in (%SKIP_TESTS%) do (call set TestArg=%%TestArg:%%I,=%%)
if "%TestArg:~-1%"=="," (set TestArg=%TestArg:~0,-1%) else (set TestArg= )

Expand Down
6 changes: 4 additions & 2 deletions utils/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Skip building the MSI installers and packaging. Useful for development builds.

.PARAMETER Test
An array of names of projects to run tests for. Use '*' to run all tests.
Available tests: lld, lldb, swift, dispatch, foundation, xctest, swift-format, sourcekit-lsp
Available tests: lld, lldb, swift, dispatch, system, foundation, xctest, swift-format, sourcekit-lsp

.PARAMETER IncludeDS2
Include the ds2 remote debug server in the SDK.
Expand Down Expand Up @@ -216,6 +216,7 @@ param
[switch] $IncludeNoAsserts = $false,
[ValidateSet("debug", "release")]
[string] $FoundationTestConfiguration = "debug",
[string] $SystemTestConfiguration = "debug",

[switch] $Summary,
[switch] $ToBatch
Expand Down Expand Up @@ -258,7 +259,7 @@ if ($Test.Length -eq 1) { $Test = $Test[0].Split(",") }

if ($Test -contains "*") {
# Explicitly don't include llbuild yet since tests are known to fail on Windows
$Test = @("lld", "lldb", "swift", "dispatch", "foundation", "xctest", "swift-format", "sourcekit-lsp")
$Test = @("lld", "lldb", "swift", "dispatch", "system", "foundation", "xctest", "swift-format", "sourcekit-lsp")
}

if ($UseHostToolchain -is [string]) {
Expand Down Expand Up @@ -4280,6 +4281,7 @@ if (-not $IsCrossCompiling) {
# functions hardcode their platform needs.
if ($Test -contains "dispatch") { Invoke-BuildStep Test-Dispatch $BuildPlatform }
if ($Test -contains "foundation") { Invoke-BuildStep Test-Foundation $BuildPlatform }
if ($Test -contains "system") { Invoke-BuildStep Test-System $BuildPlatform }
if ($Test -contains "xctest") { Invoke-BuildStep Test-XCTest $BuildPlatform }
if ($Test -contains "testing") { Invoke-BuildStep Test-Testing $BuildPlatform }
if ($Test -contains "llbuild") { Invoke-BuildStep Test-LLBuild $BuildPlatform }
Expand Down
Loading