mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #79528 from iThinker/improve-benchmark-readme
Update benchmark README with info on how to ensure benchmarks test locally built stdlib
This commit is contained in:
@@ -119,6 +119,11 @@ installed libraries instead, enable
|
||||
This will reflect the performance of the Swift standard library
|
||||
installed on the device, not the one included in the Swift root.
|
||||
|
||||
If a build fails with an error like `cannot find X in scope`, it may be because
|
||||
default toolchains don't give access to stdlib SPI. Try using a dev toolchain
|
||||
built locally or a dev snapshot from
|
||||
[Swift.org](https://www.swift.org/install/).
|
||||
|
||||
### build-script using SwiftPM+LLBuild
|
||||
|
||||
To build the benchmarks using build-script/swiftpm, one must build both
|
||||
@@ -148,6 +153,15 @@ swift-source/swift/benchmark$ .build/release/SwiftBench
|
||||
...
|
||||
```
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
* To check what libraries benchmark is linked against, set the
|
||||
`DYLD_PRINT_SEARCHING` environment variable. E.g.
|
||||
`export DYLD_PRINT_SEARCHING=1`.
|
||||
* To force linking with a locally built stdlib, use the `DYLD_LIBRARY_PATH`
|
||||
environment variable. E.g. `export
|
||||
DYLD_LIBRARY_PATH=<path_to_build_folder>/Ninja-ReleaseAssert/swift-macosx-x86_64/lib/swift/macosx/x86_64`.
|
||||
|
||||
## Editing in Xcode
|
||||
|
||||
It is now possible to work on swiftpm benchmarks in Xcode! This is done by using
|
||||
|
||||
Reference in New Issue
Block a user