Skip to content

Commit ab861d5

Browse files
authored
Pass architecture into Benchmark_Driver to fix build-script -B (swiftlang#33100)
* Pass architecture into Benchmark_Driver to fix `build-script -B` * "Benchmark_Driver compare" does not need the architecture
1 parent c3595ad commit ab861d5

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,11 +742,13 @@ function(swift_benchmark_compile)
742742
add_custom_target("check-${executable_target}"
743743
COMMAND "${swift-bin-dir}/Benchmark_Driver" "run"
744744
"-o" "O" "--output-dir" "${CMAKE_CURRENT_BINARY_DIR}/logs"
745+
"--architecture" "${arch}"
745746
"--swift-repo" "${SWIFT_SOURCE_DIR}"
746747
"--independent-samples" "${SWIFT_BENCHMARK_NUM_O_ITERATIONS}"
747748
COMMAND "${swift-bin-dir}/Benchmark_Driver" "run"
748749
"-o" "Onone" "--output-dir" "${CMAKE_CURRENT_BINARY_DIR}/logs"
749750
"--swift-repo" "${SWIFT_SOURCE_DIR}"
751+
"--architecture" "${arch}"
750752
"--independent-samples" "${SWIFT_BENCHMARK_NUM_ONONE_ITERATIONS}"
751753
COMMAND "${swift-bin-dir}/Benchmark_Driver" "compare"
752754
"--log-dir" "${CMAKE_CURRENT_BINARY_DIR}/logs"

benchmark/scripts/Benchmark_Driver

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,6 +919,12 @@ def parse_args(args):
919919
help="optimization level to use: {O,Onone,Osize}, (default: O)",
920920
default="O",
921921
)
922+
shared_benchmarks_parser.add_argument(
923+
"--architecture",
924+
metavar="architecture",
925+
help="current architecture (e.g., x86_64, arm64, etc)",
926+
default=None,
927+
)
922928

923929
run_parser = subparsers.add_parser(
924930
"run",

0 commit comments

Comments
 (0)