Skip to content

[build-script-impl] Add support for building benchmarks on linux but disable it in all currently defined presets for linux. #7860

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
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
69 changes: 69 additions & 0 deletions utils/build-presets.ini
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,53 @@ swift-primary-variant-arch=x86_64
# Don't build the benchmarks
skip-build-benchmarks

[preset: buildbot_incremental,tools=RA,stdlib=RD,smoketest=macosx,benchmarks]
mixin-preset=buildbot_incremental_base
build-subdir=buildbot_incremental

# We build release+asserts.
release
assertions

# We run the OS X tests and validation tests.
test
validation-test

llvm-targets-to-build=X86

# Set the vendor to apple
compiler-vendor=apple

dash-dash

# Always reconfigure cmake
reconfigure

# We want to always perform a verbose build
verbose-build

# Build ninja while we are at it
build-ninja

# We need to build the unittest extras so we can test
build-swift-stdlib-unittest-extra

# Make sure our stdlib is RA.
swift-stdlib-build-type=RelWithDebInfo
swift-stdlib-enable-assertions=true

# Disable non-x86 building/testing.
skip-build-ios
skip-test-ios
skip-build-tvos
skip-test-tvos
skip-build-watchos
skip-test-watchos
stdlib-deployment-targets=macosx-x86_64
swift-primary-variant-sdk=OSX
swift-primary-variant-arch=x86_64


[preset: buildbot_incremental,tools=RA,stdlib=RD,smoketest=macosx,flto]
mixin-preset=buildbot_incremental,tools=RA,stdlib=RD,smoketest=macosx
build-subdir=buildbot_incremental
Expand Down Expand Up @@ -737,6 +784,25 @@ lit-args=-v

dash-dash

install-foundation
install-libdispatch
reconfigure
skip-build-benchmarks

[preset: buildbot_linux,build_benchmark]
mixin-preset=mixin_linux_installation
build-subdir=buildbot_linux
lldb
release
test
validation-test
long-test
foundation
libdispatch
lit-args=-v

dash-dash

install-foundation
install-libdispatch
reconfigure
Expand Down Expand Up @@ -774,6 +840,8 @@ install-foundation
install-libdispatch
reconfigure
skip-test-lldb
skip-build-benchmarks



[preset: buildbot_linux_1404_no_lldb]
Expand Down Expand Up @@ -835,6 +903,7 @@ dash-dash

build-ninja
reconfigure
skip-build-benchmarks

[preset: buildbot_incremental_linux]
mixin-preset=buildbot_incremental_linux_base
Expand Down
2 changes: 2 additions & 0 deletions utils/build-script-impl
Original file line number Diff line number Diff line change
Expand Up @@ -1327,6 +1327,8 @@ function calculate_targets_for_host() {
swift_sdk="LINUX"
build_for_this_target=$(not ${SKIP_BUILD_LINUX})
test_this_target=$(not ${SKIP_TEST_LINUX})
build_benchmark_this_target=$(not ${SKIP_BUILD_LINUX})
test_benchmark_this_target=$(not ${SKIP_BUILD_LINUX})
;;
freebsd-*)
swift_sdk="FREEBSD"
Expand Down
5 changes: 5 additions & 0 deletions utils/swift_build_support/swift_build_support/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ class StdlibDeploymentTarget(object):
"powerpc64",
"powerpc64le",
"s390x"])
# We support build/test benchmarks only on Linux x86_64.
#
# TODO: If we support any more platforms, we should consider refactoring the
# supports_benchmark property onto the target from the platform.
Linux.x86_64.supports_benchmark = True

FreeBSD = Platform("freebsd", archs=["x86_64"])

Expand Down