Soong was generating proguard_dictionary, but not marking it as an
output, so ninja would fail with:
ninja: error: 'out/soong/.intermediates/bootable/recovery/tools/recovery_l10n/RecoveryLocalizer/android_common/proguard_dictionary', needed by 'out/target/common/obj/APPS/RecoveryLocalizer_intermediates/proguard_dictionary', missing and no known rule to make it
Fixes: 78770148
Test: mmma bootable/recovery/tools/recovery_l10n
Change-Id: I956f92519ea81d4fb1322114214099d46d734906
When linking in the UBSan minimal runtime, don't export the symbols.
This was resulting in an edge case where symbols were sometimes
undefined at runtime on address sanitized builds if static library
dependencies were integer overflow sanitized.
Bug: 78766744
Test: readelf on libraries show either inclusion of the shared library
or no undefined symbols related to the minimal runtime.
Change-Id: Ide85c8c6b53b400ce9166ccaf96d250797fe4b24
When the config loading was changed to using AndroidProducts.mk lists
from soong_ui instead of finding them itself, multiproduct_kati stopped
being able to find all the products. Move the finder initialization
earlier so that we can dump the full list.
Test: build/soong/build_test.bash -only-config
Test: forrest runs of every downstream build_test
Change-Id: I085d40f9008a47b850783499365977a0ff70ac66
`recovery: true` installs a module to the recovery partition.
`recovery_available: true` makes a module to be available to other
`recovery:true` or `recovery_available: true` modules.
These to are very similar to vendor, vendor_available properties, except
for the target partition.
Bug: 67916654
Bug: 64960723
Test: m -j, toybox_recovery is installed to the recovery/root/sbin
Change-Id: Iaebe0593de16c69fa70de251a61f4d018a251509
Some tests make their temporary directories readonly. If they fail or
crash before cleaning up, they could leave these readonly directories
behind with files in them. os.RemoveAll fails with an error in this
case, and we can't start the build until they're removed.
Test: `m blueprint_tools` to run the new go tests
Change-Id: I761f96579e96167ebfd98c6cca59765bd50536ec
droiddoc now supports apicheck. java_sdk_library uses it to
automatically perform apichecks against the not-yet-release API and
the latest-released API.
A module type prebuilt_apis is added. It finds api txt files and creates
filegroup modules so that it can be referenced from java_sdk_library
across the module boundary.
Bug: 77575606
Test: m -j
Test: m -j checkapi
Test: m -j update-api
Change-Id: I0ba859972eac060296e1df2e71c4e047392d4877
And fix up androidmk / bpfix to provide warnings about what to do
instead.
Test: m blueprint_tools (runs the tests, ensures there aren't any tags left)
Change-Id: I1a3ad8600211050420041740207d6957f44463c8
LLVM r328258 turned on a feature called temporary dtor inlining by
default for all of C++ in clang-tidy. This feature appears to be
somewhat over-aggressive when objects are being passed by value. For
example, given:
void foo(std::unique_ptr<int> i);
void bar() {
auto x = std::make_unique<int>();
int *i = x.get();
foo(std::move(x));
*i = 99;
}
...clang-tidy will complain about `*i = 99;` being a definite
use-after-free. This is incorrect, however: `foo` could stash the
`unique_ptr` it's given in a global, or a class member, or ...
Until upstream fixes this bug, it's probably best to keep this disabled.
Bug: None
Test: Ran the analyzer across Android locally. Nothing broke; number of
complaints dropped significantly.
Change-Id: I806c7ead34b61f4a88a7e6ec1c94751836a21e70
This way we can remove the line the property was on, not just the
property itself.
Test: `m blueprint_tools` to run the unit tests
Test: diff bpfix results on all of AOSP before/after this change
Change-Id: I61fdd945e6ee711c620b79683dfee7b7c751b3c4
This will move the common properties:
name
defaults
device_supported
host_supported
To be listed first (and in that order) for every module. Other
properties are untouched.
This also adds a helper to test individual passes in an end-to-end
manner, and a helper to run passes that use PatchLists.
Test: `m blueprint_tools` to add the new tests
Test: Diff bpfix results over all of aosp before/after this change
Change-Id: I746a00a3731cb7597d2613ef2dc45a99654cd122
Bug: 78133793
Bug: 78242072
Test: Builds when using cortex-a75 as a target.
Change-Id: Ie3fbe40b15f4d89eeba0d630a82097122fc83b33
Merged-In: Ie3fbe40b15f4d89eeba0d630a82097122fc83b33
(cherry picked from commit 0612597a41)
Previously abi diffs were allowed only on unsanitized variants of vndk
libraries. This CL allows them on all sanitized variants which go onto
production devices, eg: cfi variants.
Bug: 66301104
Test: Without this change, for arm64 libstagefright_foundation doesn't
get an lsdump file since we don't build an unsanitized variant
(aosp_arm64_ab).
Test: With this change, for arm64 libstagefright_foundation does
get an lsdump file (aosp_arm64_ab)
Change-Id: I94f82fd84fc898e4980c3f3619df9677ed723c32
framework-res.apk should get the platform version name ("9") as
--version-name, not the SDK version ("28"). It will get copied
to compileSdkVersionCodename in APKs compiled against it.
Bug: 78324052
Test: aapt dump badging $OUT/system/framework/framework-res.apk | grep -i version
Change-Id: I34a601cb2c14f66199066e7d598862108da0b950
Merged-In: I34a601cb2c14f66199066e7d598862108da0b950
(cherry picked from commit b691e24d89)
didn't remove the props: api_filename, removed_api_filename yet since
these two currently are used by java_sdk_library.
Bug: b/78034256
Test: m clean && m checkapi
Change-Id: Iebd014ef227487717b5b3819c80d630c34559983
According to the documentation: "NewBuffer creates and initializes a new
Buffer using buf as its initial contents. The new Buffer takes ownership
of buf, and the caller should not use buf after this call."
Test: Run bpfix twice, only wrote the first time.
Change-Id: I52f88bfd9247240436b46f396c9196157774615b
protoc dependency files, at least for C++ outputs, uses the form of:
a/b.c \
a/b.h: <dep1> <dep2>...
Ninja will fail the command when it parses a dep file and there's more
than one output file (even though it doesn't care what the output file
name is). So this tool will parse the original file, and output a
version with only a single output file.
Bug: 67329638
Test: NINJA_ARGS="-t deps ...pb.c" m
Test: NINJA_ARGS="-t deps ...srcjar" m
Test: NINJA_ARGS="-t deps ...srcszip" m
Test: Run dep_fixer across all of taimen's dep files, no failures.
Test: Run dep_fixer against the processed files, no changes.
Test: Run androidmk across all of our Android.mk files, inspect the diffs
Change-Id: I4263b7d5faea37285afa6b24dedf5964aa7d19dc
Make builds handle modules with duplicate names in different
namespaces by passing a list of exported namespaces to Soong.
Soong-only builds can try to install both modules, leading to
a duplicate rule error. Re-use the same list of exported
namespaces in Soong, which will be empty in all existing
Soong-only builds. This will effectively only install modules
in the root namespace in Soong-only builds.
Test: m checkbuild
Bug: 79369665
Change-Id: Ie80d4b77e1dce165a33579fcf58b571989794b35
This still leaves a blank line in it's place, but that's a more general
problem.
Test: m blueprint_tools
Test: Run bpfix over AOSP, diff.
Change-Id: I55c1d1c183cfa49beeca07abd539348bc2524c5a
error while loading shared libraries: libc++.so:
cannot open shared object file: No such file or directory
BUG: N/A
Test: make -j16 hello_world_test
out/host/linux-x86/testcases/hello_world_test/x86_64/hello_world_test
out/host/linux-x86/testcases/hello_world_test/x86/hello_world_test
Change-Id: I0ecb1955cd67295abe12fc19ab811fe046ac5f23
I3487634f1ec5bb3b5b60d636b64461d391add35a is causing build breakages in
unbundled builds.
The stubs libs are disabled for unbundled builds, and thus we shouldn't
declare them as dist artifacts.
Bug: 605033
Test: make -j dist ANDROID_BUILDSPEC=vendor/google/build/app_build_spec.mk
Change-Id: I3cd92e2cc6aeb48baf47d37780d8df2aa4756438
The java library rewrites should only happen for java modules, not cc
modules.
Test: Ran androidmk on a number of Android.mk files
Change-Id: Ife2cfb5a69d7db37216671f08317033b99fcd3a1
Make will use the list to sort support libraries into
LOCAL_STATIC_ANDROID_LIBRARIES and LOCAL_STATIC_JAVA_LIBRARIES
as appropriate.
Bug: 78300023
Test: m checkbuild
Change-Id: I58582b124f2b6a9b124683ddf8f5d77314f2e941
Merged-In: I58582b124f2b6a9b124683ddf8f5d77314f2e941
(cherry picked from commit ff8ab0745f)
If a static android library lib1 has static_libs: ["lib2"] then the
R.class files for packages in lib2 will be merged into the jar for
lib1. If an app has lib1 in its static_libs it will get the R.class
files from lib2 through lib1, instead of regenerating the R.java
files with numbering that matches the resource table of the app.
Pass transtive static android library dependencies on the aapt2
command line so that aapt2 will always regenerate the R.java
constants for those packages.
Also extract the packages that have R.java files after each aapt2
invocation. This is not necessary for Soong, but is passed to
make to let it force regenerating the packages using
--extra-packages.
Bug: 78300023
Test: m checkbuild
Change-Id: I0f3444af44d2a9f370d1f156c908972f8cc3a1ee
So that we can see where the time is going. Also removes the obsolete
ASAN_OPTIONS, which moved to kati, but I forgot to update this instance.
Test: m nothing; check out/soong.log
Change-Id: I0c4066bad20fc2dc22b389f4c973d10dca554ee3