Comments (15)
@thekief , in your second example, you are not invoking the driver from the swift-LOCAL-2023-05-02-a.xctoolchain
toolchain, but the compiler frontend: swift-frontend
. Whereas from the Xcode toolchain you are invoking the driver swiftc
.
from swift-driver.
Sorry, my bad. I put the wrong command there. Here is the corrected one:
/Library/Developer/Toolchains/swift-LOCAL-2023-05-02-a.xctoolchain/usr/bin/swiftc -version
Apple Swift version 5.8 (swift-5.8-RELEASE)
Target: arm64-apple-macosx13.0
Anyway, my problem still applied. I did some debugging with dtruss
and noticed that the my custom toolchain does not check for swift-driver
while the stock one does:
351- 1234/0x252e: 16496 1 0 sysctl([CTL_KERN, 4, 0, 0, 0, 0] (2), 0x16BC19140, 0x16BC18DA0, 0x0, 0x0) = 0 0
352- 1234/0x252e: 16500 4 3 sysctl([CTL_HW, 1, 0, 0, 0, 0] (2), 0x16BC19240, 0x16BC18DA0, 0x0, 0x0) = 0 0
353: 1234/0x252e: 16505 3 2 access("/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-driver\0", 0x0, 0x0) = 0 0
354: 1234/0x252e: 16507 2 1 access("/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-driver\0", 0x0, 0x0) = 0 0
355- 1234/0x2530: 17970: 0: 0 fork() = 0 0
356- 1234/0x2530: 17971 1 0 mprotect(0x104EB4000, 0x8000, 0x1)
I also noticed this details in the README:
Line 14 in 221b5ea
Previous snapshots of Swift worked without any problems in that regard. Could it be that using a self-built "release" disables forwarding executions to the driver?
from swift-driver.
Could you please clarify how your build a custom toolchain, exactly?
from swift-driver.
I used the official instructions aka:
swift/utils/build-toolchain <prefix>
from swift-driver.
Sure, sorry for leaving out this details. My bundle prefix is customCompiler
.
Is there anything special you have in mind? Are there some names that are considered "forbidden"?
from swift-driver.
@thekief do you have a swift-driver
executable adjacent to /Library/Developer/Toolchains/swift-LOCAL-2023-05-02-a.xctoolchain/usr/bin/swiftc
?
I am having trouble using build-toolchain
script locally, but I just triggered a toolchain build on a release/5.8
PR here:
apple/swift#65587
And the resulting toolchain seems to have the new driver correctly installed and it does get used when calling swiftc
from this toolchain.
from swift-driver.
Thank you for your help there. I had a look at your build and I noticed that some files on my side were kind of missing and broken most likely due to some issues in the build process.
We had some issues during our build times in the night and so far restarting/resuming the build process never caused any issues. That is the first time for me here. I will test the toolchains internally and potentially close the ticket soon
from swift-driver.
@thekief, the trunk and 5.9 snapshots might be a good comparison to your custom toolchain builds, ie you should end up with the same files as in there.
from swift-driver.
@thekief is this issue still reproducible for you?
from swift-driver.
i will inform you until next Monday. Currently, we switched back to Xcode 14, circumventing any problems with this. I will write about the outcome as soon as possible.
from swift-driver.
@thekief have you had a chance to reproduce this again?
from swift-driver.
(Potentially) related to this one here:
apple/swift-package-manager#6970
I kinda forgot about this issue. Thank you for the reminder
from swift-driver.
I don't think that SwiftPM issue is related in any way, unless some details in the description of this one were omitted.
from swift-driver.
Sorry for the bad phrasing:
I wanted to retest it with the new version mentioned in the other ticket. As I cannot build the new version, I have no update on it yet.
from swift-driver.
I was able to build release/5.9.0
and the issue does not occure anymore.
from swift-driver.
Related Issues (20)
- [SR-12129] swift-driver fails to diagnose a lack of input files HOT 1
- Driver diagnostics (such as remarks and errors) don't obey `-parseable-output` HOT 7
- [SR-11900] 'swift help' doesn't work HOT 8
- SwiftDriver compilation error: com.apple.xcode.tools.swift.compiler is not absolute HOT 23
- Group CLI options for easier navigation HOT 1
- Cargo Termizi
- Crash due to an assertion in libswiftCore
- Xcode 14.3 RC 2 (14E222b) not pass '-strict-implicit-module-context' flag to swift-frontend
- `Process.findExecutable(arguments[0])` gives an unexpected result HOT 5
- Windows builds broken when querying target-info from libSwiftScan HOT 2
- "swift build" command duplicates error messages HOT 8
- iOS get error Dependency for P1: Debug:SwiftDriver Compilation Requirements app normal arm64 com.apple.xcode.tools.swift.compiler is not absolute
- swift help build doesn't work when it's documented to
- Test suite broken on Windows due to CAS HOT 1
- SPM doesn't enumerate source files properly in different configurations HOT 6
- tests crash on windows HOT 1
- `swift run` usage suggestion should be fixed HOT 1
- Program is several times slower when compiled with swiftc than when compiled with XCode due to retain&release calls HOT 1
- “swift ./-” does the same as “swift -” HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swift-driver.