Skip to content

Commit a1cf6d3

Browse files
committed
[swift_build_support] Add support for building benchmarks on linux-x86_64.
I put in a small little kludge to add support for this. The better solution is to refactor the supports_benchmark property from Platform to Target. We already have a similar abstraction problem with armv7 target on Darwin, where we explicitly turn off benchmarking. *NOTE* Building the benchmarks for linux still requires more cmake work. I am making some changes in a subsequent commit series to do this. If you try to compile the benchmarks, you will hit an error where ninja says that it doesn't know about the swift-benchmark-linux-x86_64 target.
1 parent 5dbc58c commit a1cf6d3

File tree

1 file changed

+5
-0
lines changed
  • utils/swift_build_support/swift_build_support

1 file changed

+5
-0
lines changed

utils/swift_build_support/swift_build_support/targets.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ class StdlibDeploymentTarget(object):
119119
"powerpc64",
120120
"powerpc64le",
121121
"s390x"])
122+
# We support build/test benchmarks only on Linux x86_64.
123+
#
124+
# TODO: If we support any more platforms, we should consider refactoring the
125+
# supports_benchmark property onto the target from the platform.
126+
Linux.x86_64.supports_benchmark = True
122127

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

0 commit comments

Comments
 (0)