Skip to content

Address NativeAOT header file strategy to allow windows global definitions to co-exist #81285

@LakshanF

Description

@LakshanF

It looks like in NativeAOT, if any file includes windows global definitions, then that file can't include PalRedhawkFunctions.h, to interact with the NativeAOT runtime.

For example, this can be seen on PalRedhawkMinWin.cpp, where the file includes #include <windows.h> but also needs to define its own PalEventWrite instead of using the one defined in PalRedhawkFunctions.h. This seems to be due to the fact that Windows and RedHawk global definitions cannot co-exist as the PalRedhawkMinWin.cpp comment states.

This issue is also going to exist in the planned EventPipe port to NativeAOT. Most of the files in the common EventPipe sources require windows global definitions and will not be able to use PalRedhawkFunctions.h and will need to define its own PalEventWrite similar to PalRedhawkMinWin.cpp above.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions