@@ -245,13 +245,13 @@ Phew, that's a lot to digest! Now let's proceed to the actual build itself!
245
245
- Via Ninja:
246
246
` ` ` sh
247
247
utils/build-script --skip-build-benchmarks \
248
- --skip-ios --skip-watchos --skip-tvos --swift-darwin-supported-archs " x86_64 " \
248
+ --skip-ios --skip-watchos --skip-tvos --swift-darwin-supported-archs " $( uname -m ) " \
249
249
--sccache --release-debuginfo --test
250
250
` ` `
251
251
- Via Xcode:
252
252
` ` ` sh
253
253
utils/build-script --skip-build-benchmarks \
254
- --skip-ios --skip-watchos --skip-tvos --swift-darwin-supported-archs " x86_64 " \
254
+ --skip-ios --skip-watchos --skip-tvos --swift-darwin-supported-archs " $( uname -m ) " \
255
255
--sccache --release-debuginfo --test \
256
256
--xcode
257
257
` ` `
@@ -350,7 +350,8 @@ git push --set-upstream my-remote my-branch
350
350
### First time Xcode setup
351
351
352
352
If you used `--xcode` earlier, you will see an Xcode project generated under
353
- `../build/Xcode-RelWithDebInfoAssert/swift-macosx-x86_64`. When you open the
353
+ `../build/Xcode-RelWithDebInfoAssert/swift-macosx-x86_64` (or
354
+ `../build/Xcode-RelWithDebInfoAssert/swift-macosx-arm64` on Apple Silicon Macs). When you open the
354
355
project, Xcode might helpfully suggest "Automatically Create Schemes". Most of
355
356
those schemes are not required in day-to-day work, so you can instead manually
356
357
select the following schemes:
@@ -375,12 +376,12 @@ Now that you have made some changes, you will need to rebuild...
375
376
376
377
To rebuild the compiler:
377
378
```sh
378
- ninja -C ../build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64 swift-frontend
379
+ ninja -C ../build/Ninja-RelWithDebInfoAssert/swift-macosx-$(uname -m) swift-frontend
379
380
```
380
381
381
382
To rebuild everything, including the standard library:
382
383
```sh
383
- ninja -C ../build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64
384
+ ninja -C ../build/Ninja-RelWithDebInfoAssert/swift-macosx-$(uname -m)
384
385
```
385
386
386
387
### Incremental builds with Xcode
@@ -396,7 +397,7 @@ build should be much faster than the from-scratch build at the beginning.
396
397
Now check if the version string has been updated:
397
398
398
399
```sh
399
- ../build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64 /bin/swift-frontend --version
400
+ ../build/Ninja-RelWithDebInfoAssert/swift-macosx-$(uname -m) /bin/swift-frontend --version
400
401
```
401
402
402
403
This should print your updated version string.
@@ -439,22 +440,22 @@ There are two main ways to run tests:
439
440
` ` ` sh
440
441
# Rebuild all test dependencies and run all tests under test/.
441
442
utils/run-test --lit ../llvm-project/llvm/utils/lit/lit.py \
442
- ../build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64 /test-macosx-x86_64
443
+ ../build/Ninja-RelWithDebInfoAssert/swift-macosx-$( uname -m ) /test-macosx-$( uname -m )
443
444
444
445
# Rebuild all test dependencies and run tests containing "MyTest".
445
446
utils/run-test --lit ../llvm-project/llvm/utils/lit/lit.py \
446
- ../build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64 /test-macosx-x86_64 \
447
+ ../build/Ninja-RelWithDebInfoAssert/swift-macosx-$( uname -m ) /test-macosx-$( uname -m ) \
447
448
--filter=" MyTest"
448
449
` ` `
449
450
2. ` lit.py` : lit doesn' t know anything about dependencies. It just runs tests.
450
451
```sh
451
452
# Run all tests under test/.
452
453
../llvm-project/llvm/utils/lit/lit.py -s -vv \
453
- ../build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64 /test-macosx-x86_64
454
+ ../build/Ninja-RelWithDebInfoAssert/swift-macosx-$(uname -m) /test-macosx-$(uname -m)
454
455
455
456
# Run tests containing "MyTest"
456
457
../llvm-project/llvm/utils/lit/lit.py -s -vv \
457
- ../build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64 /test-macosx-x86_64 \
458
+ ../build/Ninja-RelWithDebInfoAssert/swift-macosx-$(uname -m) /test-macosx-$(uname -m) \
458
459
--filter="MyTest"
459
460
```
460
461
The `-s` and `-vv` flags print a progress bar and the executed commands
0 commit comments