Skip to content

Use loader notifications for module registration on Windows #79268

Open
@compnerd

Description

@compnerd

Motivation

Darwin uses a dyld hook for module registration. Windows provides a loader hook for module load notification globally. We should be able to use this to handle metadata registration similar to Darwin on Windows. Doing so would allow us to remove the need for swiftrt.obj (and swiftrtT.obj`).

Proposed solution

Use https://learn.microsoft.com/en-us/windows/win32/devnotes/ldrregisterdllnotification for the notification.

Alternatives considered

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    WindowsPlatform: WindowsfeatureA feature request or implementationruntimeThe Swift Runtime

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions