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

Avoid LLVM API for setting a module's code model and PIC/PIE levels #21238

Closed
Tracked by #16270
alexrp opened this issue Aug 29, 2024 · 1 comment · Fixed by #21277
Closed
Tracked by #16270

Avoid LLVM API for setting a module's code model and PIC/PIE levels #21238

alexrp opened this issue Aug 29, 2024 · 1 comment · Fixed by #21277
Labels
backend-llvm The LLVM backend outputs an LLVM IR Module. bug Observed behavior contradicts documented or intended behavior contributor friendly This issue is limited in scope and/or knowledge of Zig internals.
Milestone

Comments

@alexrp
Copy link
Member

alexrp commented Aug 29, 2024

See: https://github.com/ziglang/zig/pull/21224/files#r1734518792

We should be able to do this with our own bitcode writer just fine as these are just module flags.

@jacobly0 jacobly0 added bug Observed behavior contradicts documented or intended behavior backend-llvm The LLVM backend outputs an LLVM IR Module. labels Aug 30, 2024
@jacobly0
Copy link
Member

jacobly0 commented Aug 30, 2024

This is a bug because if you want to use the emitted bitcode directly it will have the incorrect module flags as ZigLLVMSetModule* won't have been called yet.

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. bug Observed behavior contradicts documented or intended behavior contributor friendly This issue is limited in scope and/or knowledge of Zig internals.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants