-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Runtime: Refactor platform-dependent image inspection code. #5846
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime: Refactor platform-dependent image inspection code. #5846
Conversation
@swift-ci Please test |
Build failed |
58393ae
to
c8655e3
Compare
@compnerd I had to eyeball the Cygwin and MSVC stuff since I don't have a Windows build environment set up. Would you be able to take a look and ensure this works? |
@swift-ci Please test Linux |
Build failed |
@compnerd The Windows module lookup stuff also looks like it could be cleaned up quite a bit by using the Win32 API directly instead of trying to emulate the Linux |
c8655e3
to
dbe323d
Compare
@swift-ci Please test Linux |
Full test runs passed: @swift-ci Please smoke test |
@swift-ci Please smoke test |
The code we use to interface with the platform dynamic linker is turning into a rat's nest of conditionals that's hard to maintain and extend. Since ELF, Mach-O, and PE platforms have pretty fundamentally different dynamic linker interfaces and capabilities, it makes sense to factor that code into a separate file per-platform, instead of trying to conditionalize the logic in-line. This patch factors out a much simpler portable interface for lazily kicking off the protocol conformance and type metadata lookup caches, and factors the guts out into separate MachO, ELF, and Win32 backends. This should also be a much cleaner interface to interface static binary behavior into, assisting swiftlang#5349.
dbe323d
to
87b27c6
Compare
@swift-ci Please smoke test |
The code we use to interface with the platform dynamic linker is turning into a rat's nest of conditionals that's hard to maintain and extend. Since ELF, Mach-O, and PE platforms have pretty fundamentally different dynamic linker interfaces and capabilities, it makes sense to factor that code into a separate file per-platform, instead of trying to conditionalize the logic in-line. This patch factors out a much simpler portable interface for lazily kicking off the protocol conformance and type metadata lookup caches, and factors the guts out into separate MachO, ELF, and Win32 backends. This should also be a much cleaner interface to interface static binary behavior into, assisting #5349.