refactor Bazel variable export

Most of the variable export code for cc modules can be re-used for
exporting variables for java modules. Refactor this code into a more
composable structure for reuse.

Test: build/bazel/bp2build.sh
Test: manual comparison of
  out/soong/soong_injection/cc_toolchain/constants.bzl
  with previous output
Change-Id: Ie5a6fee08cc888b7dc69c3e324e5c3f8aa269a8f
This commit is contained in:
Sam Delmerico
2022-03-25 14:55:40 +00:00
parent 85b935eff2
commit 7f88956c16
12 changed files with 305 additions and 237 deletions

View File

@@ -21,7 +21,7 @@ const (
SoongInjectionDirName = "soong_injection"
GeneratedBazelFileWarning = "# GENERATED FOR BAZEL FROM SOONG. DO NOT EDIT"
GeneratedBazelFileWarning = "# GENERATED FOR BAZEL FROM SOONG. DO NOT EDIT."
)
// String returns the name of the run.