feat: support standalone translate-c#645
Open
cerisier wants to merge 5 commits intoaherrmann:mainfrom
Open
Conversation
cerisier
commented
May 7, 2026
| mandatory = False, | ||
| values = THREADED_VALUES, | ||
| ), | ||
| "translate_c": attr.int( |
Contributor
Author
There was a problem hiding this comment.
Probably better to name use_standalone_translate_c
cerisier
commented
May 7, 2026
Comment on lines
+80
to
+94
| config_setting( | ||
| name = "translate_c_enabled", | ||
| flag_values = { | ||
| ":translate_c": "1", | ||
| }, | ||
| visibility = ["//visibility:public"], | ||
| ) | ||
|
|
||
| config_setting( | ||
| name = "translate_c_disabled", | ||
| flag_values = { | ||
| ":translate_c": "0", | ||
| }, | ||
| visibility = ["//visibility:public"], | ||
| ) |
Contributor
Author
There was a problem hiding this comment.
Need to move this into zig/config.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #643
Several things worth mentioning:
apple_supportis unfortunate but their cc toolchain doesn't expose builtin headers so we have to add them manually usingapple_support.path_placeholdersfor translate-c to work on macOS. I tried convincingapple_supportto perform the same kind of detection asrules_ccdoes in the autoconfigure rule but they were happy not having to performe repo rule invocations.translate-cneeds command line extraction because it doesn't support-lcwhere zig does the job of adding include paths for the libc.translate-cdoesn't support--sysrootnor-internal-isystemso we have to extract them from the compiler command line and pass them-isystemfor now. As soon as support is added, we'll remove extraction.