Since the rbc results file is sorted, .KATI_READONLY
ends up trying to make a variable that hasn't been defined
yet readonly, which is an error.
It's not really worth supporting moving it down in the list,
because it wouldn't affect the variable being writable while
still in Starlark code.
Bug: 226974242
Test: go test
Change-Id: I9402f69be97e5c7cf010ad86f124422ea55fda7f
Previously, seeing anything other than an interpolate variable
was not allowed.
Bug: 226974242
Test: go test
Change-Id: I48a060f9a3fd19cd67a114d2cb0756ab2be25ce1
Some functions are called without the use of $(call),
since $(call) is not necessary when the function doesn't
take any arguments. mk2rbc thinks these function calls
are local variables, and converts them as such. This
leads to undefined variable errors when trying to load
(before even executing) the starlark file.
Hardcode a known function that should not be converted
to a local variable.
Bug: 226974242
Test: go test
Change-Id: I5567a34fcc282b181a7e78ac3d5cc9b40bd025a2
These private variables sometimes have references to make
variables like $< or $@. When converted to starlark, they
become invalid local variables like _< and _@, preventing
the file from being loaded even if it's never executed.
Bug: 226974242
Test: go test
Change-Id: Iafd4c6939731f3b7c051c9e41464134d5b672f23
Use the new --dependency-file flag for lld to produce a deps file.
Fixes: 137961579
Test: m checkbuild
Change-Id: I4e0724795a4237ef4560f814e5ef40e44591d776
* A new ALLOW_LOCAL_TIDY_TRUE variable, default is false.
* If it is 0/false, local "tidy:true" is ignored.
* If it is 1/true, local "tidy:true" is honored as it is now.
Bug: 229779921
Test: make with and without ALLOW_LOCAL_TIDY_TRUE=1
Change-Id: I0323289a4d3bb2514982252a5a1339e94f2bbaab
Also remove the file existence functions because they
can just be wildcards instead.
Bug: 226974242
Test: go test
Change-Id: Icbf65c47af97a710580864e8b76e2697aba96dd8
These occur in some vendor makefiles in
order to include files in a foreach loop.
Bug: 226974242
Test: go test
Change-Id: I59242eba9a2d7c659994556d9123b6481f4a8130
These contained duplicate code, but evolved separately in the effort to
identify module type of those created with CreateModule. This refactors
to share a common implementation between the two.
Test: m json-module-graph and verify Type fields
Test: CI
Change-Id: Ifdb9a006d9b1bef7411f9ce3a4384797693b4bfc
Hard-coded min_sdk_version is not necessary for kotlinx-* modules
because they are already marked by updater script.
Bug: 158059172
Test: m nothing
Change-Id: I42cf26c9390244f93059af68027cca4f8518a828
- Making newapi disabled by default will ensure that this lint check
does not run on the platform. This prevents noisy lint warnings like b/228956345#1
- This lint check will continue to be enforced on the transitive deps of
apexes, since lint.strict_updatability_linting will be true for those
Soong modules
Test: TH
Test: m
out/soong/.intermediates/frameworks/base/services/core/services.core.unboosted/android_common/lint/lint-report.xml
// file no longer contains "Call requires API level ..." warning
Bug: 228956345
Change-Id: I8ef3137394011fb679a1129f80f6351fb05a4eff
- NewApi check should be enforced only if min_sdk_version is less than
the compile_sdk_version (the opposite direction should be a different
build-time error)
- Change the datatype of *sdkVersion to android.ApiLevel (from string)
to support version comparisons
Test: go build ./java
Test: no changes in ninja file
Bug: 228956345
Change-Id: Ic408857db7760d912ef4694d2ed72c0b7106eb04
Akin to testing for cc_defaults' `static`, we introduce
a `shared` sibling to
TestStaticLibrary_SystemSharedLibsStaticEmpty
Bug: 195451854
Test: TestCcLibrarySharedSystemSharedLibsSharedEmpty
Change-Id: I63cb0641d216e8c11586ecf415fa2441e31dd3e5
This respin contains performance improvements to clang-tidy and lld, and
fp16 cost fixes.
Test: presubmit
Bug: 219872481
Change-Id: I322a680cdc6ebc0f1fe3735ed087477e7f2508fe
These can take a minute or more of build time, and currently hold up
other processing. We could move to a parallel compression scheme to
speed them up, but it's simpler just to background them and continue the
build, waiting to make sure they've finished before exiting.
Testing this on git_master/flame-userdebug:
This brings a local no-op `m nothing dist` build from 2m1s to 1m39s,
even though most of that time is still spent waiting on these (since
there is very little else happening in a `nothing` build when Soong and
Kati don't need to run).
Running `touch art/Android.mk; m nothing dist` (so the above, but with
Kati) goes from 3m39s to 2m2s. We spent 9 seconds at the end waiting for
these to finish.
CI cases that almost always run Kati plus some number of other actions
are likely to completely hide the time taken to dist these files.
Bug: 229932999
Test: Check $DIST_DIR, files still exist
Change-Id: I1fb78d7c4d5103d72b5d71d9277dea0d452f8968
If we didn't need to run soong_build during the current run, we still
try to load the soong metrics. But in the case of `dist`, that's in a
directory that is not guaranteed to persist between runs.
Make loading the soong metrics optional if the file does not exist. Also
fixes a variable shadowing issue that meant we never passed it into
ctx.Metrics.
Test: treehugger
Change-Id: Ic836282f4d13e91daa0e7241ad7c488de3293d8b
Standalone D8 invocations tend to be shorter-lived than R8 invocations
that involve deeper layers of bytecode optimization. Introduce a
separate set of JVM flags to pass to D8 invocations which limit the
runtime JIT tiering, reducing overall compile times and significantly
reducing total CPU consumption for D8 build workloads.
Representative incremental build times with this change:
* real 6m1.388s
* user 63m32.412s
and without:
* real 6m30.624s
* user 79m12.626s
Bug: 205303544
Test: time m
Change-Id: Ic568a4316325c6a4e0da41ffebbb07f0c5f7e8e3
In using prebuilt_file for prebuilt_{etc,usr_share}, Bazel now sees such
targets translated and doesn't permit a target name to alias e.g. its
`src`. Thus we temporarily disable the conversion of the `tz_version` and
`tzdata` whilst their in-tree sources are updated. Their conversions
will be reenabled afterward.
Bug: 215723302
Test: bp2build.sh
Test: mixed_{libc,droid}.sh
Change-Id: Ie19813ccb0fb93c90b54bfd19c909ed15b826385
This CL removes the build_id.mk suffix and replaces it with a hardcoded
placeholder string that will be replaced with the actual version in
apex_manifest.json by apexer at apex construction time.
This means that as long as the apex version is incremented, the
APK-in-APEX will be installed to a new directory path from the package
manager's perspective.
Fixes: 229574810
Bug: 229625490
Bug: 226559955
Bug: 224589412
Bug: 227417611
Bug: 228157333
Bug: 228803590
Bug: 229136249
Test: atest StrictJavaPackagesTest
Test: soong tests
Test: deapexer list out/dist/com.google.android.permission.apex
Change-Id: I9cef1418c3fc7e0970d96995b8398f5e82f479e0
Adding salt to bootimg/filesystem so that avbtool can produce the same
output with same input.
Adding timestamp/uuid to filesystem so that resulting image can be
deterministic.
Bug: 229784558
Test: m com.android.virt
# remove intermediates and touch some sources
m com.android.virt
# compare two built artifacts
Change-Id: I4e4668fd0ac42a35bea5a33ec3ae8c362b6a6bd2
We need to land an update to the NDK prebuilts and the NDK no longer
supports APIs 16-18.
Bug: https://issuetracker.google.com/228670422
Test: treehugger
Change-Id: I996b0eb65a7d1ae4cc0687b7ed8f533fbbba295d