Pass architecture into Benchmark_Driver to fix build-script -B (#33100)

* Pass architecture into Benchmark_Driver to fix `build-script -B`

* "Benchmark_Driver compare" does not need the architecture
This commit is contained in:
tbkka
2020-07-25 11:15:49 -07:00
committed by GitHub
parent c3595ad7f0
commit ab861d5890
2 changed files with 8 additions and 0 deletions

View File

@@ -742,11 +742,13 @@ function(swift_benchmark_compile)
add_custom_target("check-${executable_target}"
COMMAND "${swift-bin-dir}/Benchmark_Driver" "run"
"-o" "O" "--output-dir" "${CMAKE_CURRENT_BINARY_DIR}/logs"
"--architecture" "${arch}"
"--swift-repo" "${SWIFT_SOURCE_DIR}"
"--independent-samples" "${SWIFT_BENCHMARK_NUM_O_ITERATIONS}"
COMMAND "${swift-bin-dir}/Benchmark_Driver" "run"
"-o" "Onone" "--output-dir" "${CMAKE_CURRENT_BINARY_DIR}/logs"
"--swift-repo" "${SWIFT_SOURCE_DIR}"
"--architecture" "${arch}"
"--independent-samples" "${SWIFT_BENCHMARK_NUM_ONONE_ITERATIONS}"
COMMAND "${swift-bin-dir}/Benchmark_Driver" "compare"
"--log-dir" "${CMAKE_CURRENT_BINARY_DIR}/logs"

View File

@@ -919,6 +919,12 @@ def parse_args(args):
help="optimization level to use: {O,Onone,Osize}, (default: O)",
default="O",
)
shared_benchmarks_parser.add_argument(
"--architecture",
metavar="architecture",
help="current architecture (e.g., x86_64, arm64, etc)",
default=None,
)
run_parser = subparsers.add_parser(
"run",