-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Add C as a target architecture #5107
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
Comments
by "c target" do you mean a c backend so that zig can transpile to c? |
Yes, to support more architectures. |
Interesting idea. Could a C target theoretically eliminate the need for the stage 1 compiler to be a separate implementation? |
No because the point of bootstrapping is to go from source to generated code. Even if we committed the output of compilation (even if it is C code) to the repository, it would not make it source code, it would still be generated code. It could potentially be done once, and then it would have to "fork" off, and get de-obfuscated and commented, and start being maintained separately. |
Related one #3772. |
Duplicated of already planned #3772 |
I would appreciate it if you could add a "C" Target. I know it shouldn't be used because of the optimization and information lost. But just as an option to compile Zig for platforms/architectures which aren't supported by clang.
The text was updated successfully, but these errors were encountered: