[swiftc] Swift compiler hook does not work
See original GitHub issueThe FrontendObserver has changed. I thought that we could simply call CompilerInstance.takeSILModule()
when configuredCompiler(...)
is called, but I then realized that the CompilerInstance does not yet contain the SILModule
at that point.
I don’t think there is a way for us to get the SILModule
without having to change the Frontend ourselves, which would require forking the Swift repo, and that is not ideal.
I have submitted a post on the Swift forums.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Swift compiler plugins
I've recently been looking into implementing a lint checker for Swift code in my project. I've used SwiftLint[1] so far, but I'd love...
Read more >Why isn't Swift compiler flag being set? - xcode - Stack Overflow
It looks like the Swift compiler ignores -D flags that assign a specific value. If you use -DDEBUG and -DRELEASE, it seems to...
Read more >Bazel rules to build Swift on Apple and Linux platforms - GitHub
Swift Rules for Bazel · Build status. This repository contains rules for Bazel that can be used to build Swift libraries, tests, and...
Read more >Running Xcode Playgrounds on Travis CI - Flight School
Without an Xcode project or Swift package manifest, we can't directly hook into familiar solutions for testing apps or libraries.
Read more >Swift Compilation Hangs on Release Builds - Apple Developer
I'm getting an issue where compiling both my macOS and iOS frameworks in ... If you can include a project that reproduces the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
They have agreed to reverse the changes. Forum post. Pull request.
I guess they want a unit test to be written for it.
Isn’t the
FrontendTool
used instead of theswift/tools
? Do those tools not simply exist for certain situations where you do not need to run the whole compiler?Yes, and they combined make up quite a bit of code that needs to be maintained. Not to mention it would take time to combine all of these tools. Or to copy the driver + frontend, which basically has the same function as these tools combined. My time on the this project is limited to this summer and I would like to start writing the analysis ASAP. It might take me over a week to write a custom driver (since it would involve learning the compiler much more in depth) and that’s a lot of time for me.
You have a fair point in that these tools do not change often, and we could just copy their changes.