Skip to content

Commit 33bc25b

Browse files
committed
Fix remaining hardcoded references to x86_64
1 parent 0b86753 commit 33bc25b

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

benchmark/README.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ The following build options are available:
7474
The following build targets are available:
7575

7676
* `swift-benchmark-macosx-x86_64`
77+
* `swift-benchmark-macosx-arm64`
7778
* `swift-benchmark-iphoneos-arm64e`
7879
* `swift-benchmark-iphoneos-arm64`
7980
* `swift-benchmark-iphoneos-armv7`
@@ -84,7 +85,7 @@ Build steps (with example options):
8485

8586
1. `$ mkdir build; cd build`
8687
2. `$ cmake [path to swift src]/benchmark -G Ninja -DSWIFT_EXEC=[path to built swiftc]`
87-
3. `$ ninja swift-benchmark-macosx-x86_64`
88+
3. `$ ninja swift-benchmark-macosx-$(uname -m)`
8889

8990
Benchmark binaries are placed in `bin`.
9091

@@ -98,7 +99,7 @@ relative to the benchmark binary at the time it was executed
9899
For example, to benchmark against a locally built `swiftc`, including
99100
any standard library changes in that build, you might configure using:
100101

101-
cmake <src>/benchmark -G Ninja -DSWIFT_EXEC=<build>/swift-macosx-x86_64/bin/swiftc
102+
cmake <src>/benchmark -G Ninja -DSWIFT_EXEC=<build>/swift-macosx-$(uname -m)/bin/swiftc
102103
ninja swift-benchmark-iphoneos-arm64
103104

104105
To build against the installed Xcode, simply omit SWIFT_EXEC:
@@ -319,12 +320,12 @@ swift-source$ ./swift/utils/build-script -R -B
319320
````
320321
you can rebuild just the benchmarks:
321322
````
322-
swift-source$ export SWIFT_BUILD_DIR=`pwd`/build/Ninja-ReleaseAssert/swift-macosx-x86_64
323-
swift-source$ ninja -C ${SWIFT_BUILD_DIR} swift-benchmark-macosx-x86_64
323+
swift-source$ export SWIFT_BUILD_DIR=`pwd`/build/Ninja-ReleaseAssert/swift-macosx-$(uname -m)
324+
swift-source$ ninja -C ${SWIFT_BUILD_DIR} swift-benchmark-macosx-$(uname -m)
324325
````
325326

326327
When modifying the testing infrastructure, you should verify that your changes
327328
pass all the tests:
328329
````
329-
swift-source$ ./llvm/utils/lit/lit.py -sv ${SWIFT_BUILD_DIR}/test-macosx-x86_64/benchmark
330+
swift-source$ ./llvm/utils/lit/lit.py -sv ${SWIFT_BUILD_DIR}/test-macosx-$(uname -m)/benchmark
330331
````

docs/DebuggingTheCompiler.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -875,14 +875,14 @@ well as cleanups/modernizations on a code-base. Swift's cmake invocation by
875875
default creates one of these json databases at the root path of the swift host
876876
build, for example on macOS:
877877

878-
$PATH_TO_BUILD/swift-macosx-x86_64/compile_commands.json
878+
$PATH_TO_BUILD/swift-macosx-$(uname -m)/compile_commands.json
879879

880880
Using this file, one invokes `clang-tidy` on a specific file in the codebase
881881
as follows:
882882

883-
clang-tidy -p=$PATH_TO_BUILD/swift-macosx-x86_64/compile_commands.json $FULL_PATH_TO_FILE
883+
clang-tidy -p=$PATH_TO_BUILD/swift-macosx-$(uname -m)/compile_commands.json $FULL_PATH_TO_FILE
884884

885885
One can also use shell regex to visit multiple files in the same directory. Example:
886886

887-
clang-tidy -p=$PATH_TO_BUILD/swift-macosx-x86_64/compile_commands.json $FULL_PATH_TO_DIR/*.cpp
887+
clang-tidy -p=$PATH_TO_BUILD/swift-macosx-$(uname -m)/compile_commands.json $FULL_PATH_TO_DIR/*.cpp
888888

utils/coverage/coverage-generate-data

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import logging
1414
import multiprocessing
1515
import os
1616
import pipes
17+
import platform
1718
import subprocess
1819
import sys
1920
import timeit
@@ -100,7 +101,7 @@ def dump_coverage_data(merged_file):
100101
"""Dump coverage data of file at path `merged_file` using llvm-cov"""
101102
try:
102103
swift = os.path.join(global_build_subdir,
103-
'swift-macosx-x86_64/bin/swift')
104+
'swift-macosx-{}/bin/swift'.format(platform.machine()))
104105
coverage_log = os.path.join(os.path.dirname(merged_file),
105106
'coverage.log')
106107
testname = os.path.basename(os.path.dirname(merged_file))

0 commit comments

Comments
 (0)