Skip to content
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

Consider switching *-uefi-* targets to uefi instead of windows for LLVM 20+ #21630

Open
Tracked by #22014
alexrp opened this issue Oct 8, 2024 · 0 comments
Open
Tracked by #22014
Labels
backend-llvm The LLVM backend outputs an LLVM IR Module. enhancement Solving this issue will likely involve adding new logic or components to the codebase.
Milestone

Comments

@alexrp
Copy link
Member

alexrp commented Oct 8, 2024

There is ongoing work to make UEFI a first-class citizen in LLVM. The backend work in particular is what's important for us here.

Once these efforts progress far enough (maybe LLVM 20 or 21?), we should consider switching over to uefi when lowering to LLVM as our use of windows for this purpose is a brittle hack that could break with any given LLVM upgrade.

.windows, .uefi => "windows",

@alexrp alexrp added enhancement Solving this issue will likely involve adding new logic or components to the codebase. backend-llvm The LLVM backend outputs an LLVM IR Module. labels Oct 8, 2024
@alexrp alexrp added this to the unplanned milestone Oct 8, 2024
alexrp added a commit to alexrp/zig that referenced this issue Nov 28, 2024
Without doing this, we don't actually test whether the data layout string we
generate matches LLVM's.

A number of targets had to be commented out due to this change:

* Some are using a non-working experimental LLVM backend (arc, csky, ...).
* Some don't have working LLD support (lanai, sparc, ...).
* Some don't have working self-hosted linker support (nvptx).
* Some are using ABIs that haven't been standardized (loongarch32).

Finally, all non-x86 uefi targets are hopelessly broken and can't really be
fixed until we change our emit logic to lower *-uefi-* verbatim rather than to
*-windows-*. See: ziglang#21630
alexrp added a commit to alexrp/zig that referenced this issue Nov 28, 2024
Without doing this, we don't actually test whether the data layout string we
generate matches LLVM's.

A number of targets had to be commented out due to this change:

* Some are using a non-working experimental LLVM backend (arc, csky, ...).
* Some don't have working LLD support (lanai, sparc, ...).
* Some don't have working self-hosted linker support (nvptx).
* Some are using ABIs that haven't been standardized (loongarch32).

Finally, all non-x86 uefi targets are hopelessly broken and can't really be
fixed until we change our emit logic to lower *-uefi-* verbatim rather than to
*-windows-*. See: ziglang#21630
@alexrp alexrp modified the milestones: unplanned, 0.15.0 Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend-llvm The LLVM backend outputs an LLVM IR Module. enhancement Solving this issue will likely involve adding new logic or components to the codebase.
Projects
None yet
Development

No branches or pull requests

1 participant