Skip to content

Commit 1024599

Browse files
authored
Merge pull request #25108 from gottesmm/add_preset
[build-script] Add a presets for building/testing the stdlib standalo…
2 parents f8ad395 + 5f15385 commit 1024599

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

utils/build-presets.ini

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2026,3 +2026,34 @@ debug-foundation
20262026

20272027
[preset: buildbot_linux,foundation=release]
20282028
mixin-preset=buildbot_linux
2029+
2030+
#===------------------------------------------------------------------------===#
2031+
# Standalone Stdlib
2032+
#===------------------------------------------------------------------------===#
2033+
2034+
[preset: stdlib_RA,standalone,notest]
2035+
release
2036+
assertions
2037+
2038+
# We do not want to build llvm, cmark, or benchmarks. We will still build a
2039+
# small part of llvm and configure both llvm/cmark.
2040+
skip-build-llvm
2041+
skip-build-cmark
2042+
skip-build-benchmarks
2043+
2044+
# Then we inject two cmake arguments that cause us not to build tools and to
2045+
# assume we are working with the host compiler.
2046+
extra-cmake-options=-DSWIFT_INCLUDE_TOOLS=NO -DSWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER=YES
2047+
2048+
# Then set the paths to our native tools. If compiling against a toolchain,
2049+
# these should all be the ./usr/bin directory.
2050+
native-swift-tools-path=%(toolchain_path)s
2051+
native-llvm-tools-path=%(toolchain_path)s
2052+
native-clang-tools-path=%(toolchain_path)s
2053+
2054+
[preset: stdlib_RA,standalone]
2055+
mixin-preset=stdlib_RA,standalone,notest
2056+
2057+
test
2058+
validation-test
2059+
only-executable-test

utils/build_swift/tests/test_presets.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
'symbols_package': '/path/to/symbols/package',
4343
'ndk_path': '/path/to/ndk',
4444
'arm_dir': '/path/to/arm',
45+
'toolchain_path': '/tmp/toolchain',
4546
}
4647

4748
SAMPLE_PRESET = """

0 commit comments

Comments
 (0)