Skip to content

Commit 93bd2c1

Browse files
committed
Merge remote-tracking branch 'origin/master' into master-next
2 parents 1eb846d + cfc03f8 commit 93bd2c1

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

benchmark/scripts/build_script_helper.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010

1111
def perform_build(args, swiftbuild_path, config, binary_name, opt_flag):
1212
assert(config in ['debug', 'release'])
13-
assert(binary_name in ['Benchmark_O', 'Benchmark_Onone'])
14-
assert(opt_flag in ['-O', '-Onone'])
13+
assert(binary_name in ['Benchmark_O', 'Benchmark_Osize',
14+
'Benchmark_Onone'])
15+
assert(opt_flag in ['-O', '-Osize', '-Onone'])
1516

1617
inner_build_dir = os.path.join(args.build_path, binary_name)
1718
swiftbuild_args = [
@@ -49,6 +50,8 @@ def main():
4950

5051
swiftbuild_path = os.path.join(args.toolchain, 'usr', 'bin', 'swift-build')
5152
perform_build(args, swiftbuild_path, 'debug', 'Benchmark_Onone', '-Onone')
53+
perform_build(args, swiftbuild_path, 'release', 'Benchmark_Osize',
54+
'-Osize')
5255
perform_build(args, swiftbuild_path, 'release', 'Benchmark_O', '-O')
5356

5457

utils/build-script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ class BuildScriptInvocation(object):
895895
if self.args.build_sourcekitlsp:
896896
product_classes.append(products.SourceKitLSP)
897897
if self.args.build_toolchainbenchmarks:
898-
product_classes.append(products.ToolchainBenchmarks)
898+
product_classes.append(products.Benchmarks)
899899
return product_classes
900900

901901
def execute(self):

utils/swift_build_support/swift_build_support/products/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# ----------------------------------------------------------------------------
1212

13-
from .benchmarks import ToolchainBenchmarks
13+
from .benchmarks import Benchmarks
1414
from .cmark import CMark
1515
from .foundation import Foundation
1616
from .indexstoredb import IndexStoreDB
@@ -48,5 +48,5 @@
4848
'SwiftEvolve',
4949
'IndexStoreDB',
5050
'SourceKitLSP',
51-
'ToolchainBenchmarks',
51+
'Benchmarks',
5252
]

utils/swift_build_support/swift_build_support/products/benchmarks.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020

2121
# Build against the current installed toolchain.
22-
class ToolchainBenchmarks(product.Product):
22+
class Benchmarks(product.Product):
2323
@classmethod
2424
def product_source_name(cls):
2525
return "benchmarks"
@@ -42,6 +42,9 @@ def test(self, host_target):
4242
bench_O = os.path.join(self.build_dir, 'bin', 'Benchmark_O')
4343
shell.call([bench_O] + cmdline)
4444

45+
bench_Osize = os.path.join(self.build_dir, 'bin', 'Benchmark_Osize')
46+
shell.call([bench_Osize] + cmdline)
47+
4548

4649
def run_build_script_helper(host_target, product, args):
4750
toolchain_path = args.install_destdir

0 commit comments

Comments
 (0)