platform_build_soong/cmd
Cole Faust c9508aac4c Load starlark files from soong
There are a number of instances where we are exporting information
from soong to bazel via soong_injection. This could be more bazel-centric
if the information was instead held in bzl files, and both bazel and
soong read it from there.

Add a starlark package that will run
//build/bazel/constants_exported_to_soong.bzl at initialization time,
and then results can be retreived with GetStarlarkValue.

Since changes to the starlark files mean that soong has to rerun,
add them as ninja deps.

Unfortunately, the starlark code has to be run at runtime rather than
pregenerating their results, because tests run from intellij wouldn't
go through any pregeneration steps. This means that starlark is run
multiple times during the build, once per test package and once per
primary builder invocation. (currently 3, could be reduced to 2 if we
made the symlink forest generation into its own standalone tool) The
starlark code we have so far in this cl is very fast, roughly half a
millisecond, so it's not a big deal for now, but something to keep an
eye on as we add more starlark constants.

Bug: 279095899
Test: go test
Change-Id: I1e7ca1df1d8d67333cbfc46e8396e229820e4476
2023-04-26 17:18:19 -07:00
..
dep_fixer Add LOCAL_LICENSE_KINDS to build/soong 2021-02-06 04:23:21 +00:00
diff_target_files Add LOCAL_LICENSE_KINDS to build/soong 2021-02-06 04:23:21 +00:00
extract_apks Add skip-sdk-check to extract_apks 2023-03-21 08:13:25 -07:00
extract_jar_packages Add LOCAL_LICENSE_KINDS to build/soong 2021-02-06 04:23:21 +00:00
extract_linker Fix adding /DISCARD/ to linker script 2022-02-25 18:25:45 -08:00
fileslist Add LOCAL_LICENSE_KINDS to build/soong 2021-02-06 04:23:21 +00:00
go2bp If invoked 'go list' command fails, show its stderr. 2022-04-19 11:32:28 -07:00
host_bionic_verify Stop injecting symbols into host bionic binaries 2021-06-11 15:22:41 -07:00
javac_wrapper Add LOCAL_LICENSE_KINDS to build/soong 2021-02-06 04:23:21 +00:00
merge_zips Precompile python sources 2023-01-27 15:43:38 -08:00
multiproduct_kati Disable RBE in multiproduct_kati 2023-02-17 11:36:35 -08:00
path_interposer Add comments for path_interposer. 2022-05-06 12:42:05 +02:00
pom2bp Add support for pom with packaging=apk to pom2bp. 2022-10-12 12:12:02 -07:00
pom2mk Add LOCAL_LICENSE_KINDS to build/soong 2021-02-06 04:23:21 +00:00
run_with_timeout Increase timeouts in Test_runWithTimeout 2021-09-17 21:36:29 +00:00
sbox sbox: print more errors 2023-03-28 22:39:00 +00:00
soong_build Load starlark files from soong 2023-04-26 17:18:19 -07:00
soong_ui Fix possible race condition 2023-03-23 17:34:24 +09:00
symbols_map symbols_map: allow unexpected EOF in ELF files 2022-04-12 21:18:09 +00:00
zip2zip add support for escaping for zip2zip 2023-04-17 14:58:02 +00:00
zipsync Add LOCAL_LICENSE_KINDS to build/soong 2021-02-06 04:23:21 +00:00