You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
expose CPU and features as part of the target #2051
enhancementSolving this issue will likely involve adding new logic or components to the codebase.stage1The process of building from source via WebAssembly and the C backend.zig build systemstd.Build, the build runner, `zig build` subcommand, package management
This is something I haven't looked into yet to know the best way to do it, but I'd accept a pull request that provides a workaround exposing this option to the CLI (and the build system which is mostly in std/build.zig).
I think this issue may be a bit difficult for drive-by contributors. I'll repeat the comment I made on a pull request here:
Although LLVM is currently the only backend of Zig, the language does not depend on LLVM, and it is planned to support non-LLVM backends. Even though the target cpu and features options need to eventually be given to LLVM in a way that LLVM understands, we still need to expose these options in a way that is independent of LLVM. That means the CLI option cannot be called --llvm-cpu or --llvm- anything. zig targets must list all the possible options. The CLI should be able to reject invalid options without consulting LLVM.
I recognize this is in direct contradiction with my earlier comment, and I apologize for that. Sometimes it takes me a while to realize the path forward.
changed the title [-]Support specifying the floating point unit with build system[/-][+]expose CPU and features as part of the target[/+]on Sep 3, 2019
I'm not sure I'll be able to do it in time for 0.5.0, but I'll give this a slight priority bump, at the expense of other issues in the 0.5.0 milestone.
enhancementSolving this issue will likely involve adding new logic or components to the codebase.stage1The process of building from source via WebAssembly and the C backend.zig build systemstd.Build, the build runner, `zig build` subcommand, package management
Activity
andrewrk commentedon Mar 11, 2019
Thanks for typing up the issue. Float-abi = hard should work by specifying
gnueabihf,eabihf, ormusleabihf` for the target ABI. Is that not working?As for
-fpu=fpv4-sp-d16, I think this is a general problem of exposing CPU args/features. I'm guessing here:zig/src/codegen.cpp
Lines 7830 to 7835 in f2ca2ac
This is something I haven't looked into yet to know the best way to do it, but I'd accept a pull request that provides a workaround exposing this option to the CLI (and the build system which is mostly in
std/build.zig).justinbalexander commentedon Mar 11, 2019
andrewrk commentedon Sep 3, 2019
I think this issue may be a bit difficult for drive-by contributors. I'll repeat the comment I made on a pull request here:
Although LLVM is currently the only backend of Zig, the language does not depend on LLVM, and it is planned to support non-LLVM backends. Even though the target cpu and features options need to eventually be given to LLVM in a way that LLVM understands, we still need to expose these options in a way that is independent of LLVM. That means the CLI option cannot be called --llvm-cpu or --llvm- anything. zig targets must list all the possible options. The CLI should be able to reject invalid options without consulting LLVM.
I recognize this is in direct contradiction with my earlier comment, and I apologize for that. Sometimes it takes me a while to realize the path forward.
[-]Support specifying the floating point unit with build system[/-][+]expose CPU and features as part of the target[/+]andrewrk commentedon Sep 3, 2019
I'm not sure I'll be able to do it in time for 0.5.0, but I'll give this a slight priority bump, at the expense of other issues in the 0.5.0 milestone.
andrewrk commentedon Oct 17, 2019
I accidentally made a duplicate issue here: #2883
But since that issue has the checklist, I'll make this one refer to that one. I consider this a high priority issue for this milestone.