Add a flag to use Turbine only if we can use the GraalVM native image #21869
Labels
P4
This is either out of scope or we don't have bandwidth to review a PR. (No assignee)
team-Rules-Java
Issues for Java rules
type: feature request
Description of the feature request:
In experimenting with
--java_header_compilation
, we have found that Turbine is only worth using if we can use the GraalVM native image added in #19361. If we cannot (such as if thejava_library
uses an annotation processor not supported by the native image), then we would rather fall back toJavac
+JavaIjar
, than using non–native image Turbine.As such, we would like to have a flag in Bazel to only use Turbine if we will end up using the native image, tentatively called
--[no]experimental_java_only_use_direct_header_compiler
. We expect that this flag to be used in something like:(with equivalent change done to the Java version of the function)
Specifically,
_would_use_header_compiler_direct
is intended to mirror the logic in JavaHeaderCompilationAction.Builder.build.cc @fmeum
Which category does this issue belong to?
Java Rules
What underlying problem are you trying to solve with this feature?
Making
--java_header_compilation
faster out of the box.Which operating system are you running Bazel on?
macOS
What is the output of
bazel info release
?7.1.1
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: