You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Swift: turn extractor into a swift-frontend plugin
This change turns the extractor into a plugin to a slightly modified
`swift-extractor` binary, providing only a `swift::FrontendObserver`
instance.
This makes it so that we inherit the behaviours of the released
`swift-frontend`, among the known solved issues are:
* work around the issue preventing the Linux extractor from compiling
stdlib `.swiftinterface` files, which was preventing the extractor
from working on top of earlier versions of the swift SDK
* `@`-prefixed parameter files are now supported
Under the hood the Swift build system has been tweaked so that calls to
`performFrontend` in the driver executable use a `FrontendObserver`
built from a dynamic library, and the extractor now provides an
alternative frontend observer dynamic library.
Some special treatment needed to retain the same features:
* a new `finished` method was added to `swift::FrontendObserver` to
implement the `file_is_successfully_extracted` predicate
* part of the swift AST library (`Identifier`) needed to be extracted
into a separate dynamic library as well, as behaviour was depending on
the value of static pointers that therefore needed to be shared
between `swift-frontend` and the extractor
* the `CODEQL_EXTRACTOR_SWIFT_RUN_UNDER` functionality has been moved
to the `extractor` bash wrapper, which also makes it work better to
catch crashes happening before `main` is even entered (which can
happen with tracer problems)
0 commit comments