-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable header compilation for r-classes (#42)
- Loading branch information
1 parent
4ca608a
commit eb4b9c3
Showing
4 changed files
with
42 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
def _java_header_compilation_transition(settings, attr): | ||
_ignore = (settings, attr) | ||
return {"//command_line_option:java_header_compilation": "False"} | ||
|
||
java_header_compilation_transition = transition( | ||
implementation = _java_header_compilation_transition, | ||
inputs = [], | ||
outputs = ["//command_line_option:java_header_compilation"], | ||
) | ||
|
||
def _java_library_without_header_compilation(ctx): | ||
return [java_common.merge([d[JavaInfo] for d in ctx.attr.dep])] | ||
|
||
java_library_no_header = rule( | ||
implementation = _java_library_without_header_compilation, | ||
attrs = { | ||
"dep": attr.label( | ||
providers = [JavaInfo], | ||
mandatory = True, | ||
cfg = java_header_compilation_transition, | ||
), | ||
"_allowlist_function_transition": attr.label( | ||
default = "@bazel_tools//tools/allowlists/function_transition_allowlist", | ||
), | ||
}, | ||
) |