Vendor apks should be able to reference native vendor libraries.
Vendor apks have worked around this by building without
LOCAL_SDK_VERSION, which then allowed to use all libs. However,
since vendor apks now needs to be built with SystemSDK, that
workaround can no longer be used.
Bug: 76398918
Test: BOARD_SYSTEMSDK_VERSION=P m -j
Change-Id: Idb13d5db71f4dfd542658483b6a24e7ece18ce26
Currently the build system will automatically attribute a NOTICE
file with the target of $(BUILD_PHONY_PACKAGE). This shouldn't
be the case.
Disable notice file inclusion for fake targets so that the
/fake_packages/blah_blah-timestamp paths don't show up in
NOTICE.xml.gz.
Bug: 77910458
Test: NOTICE files are not attributed to fake targets.
Change-Id: Ia942cac41b750efbd5a23d896d85ac0820ee8b4e
There is an extra ) in the implicit output path for R.txt, which causes
the rule to rerun every time because of a missing output file. There
is already an implicit output for R.txt on line 180 (which is why
the incorrect path didn't cause an immediate "No rule to generate R.txt"
error), so just remove the incorrect one.
Bug: 77244156
Test: m checkbuild && m checkbuild
Change-Id: Id960ee211b89a9a5f5104cdcac23bc3124742145
I'm making some changes to it, and found the names are scattered
in various places. Make a macro and re-use the logic instead.
Bug: 77525052
Test: make droid
Change-Id: I0f2da80b8b4d427353509b27ec720d024eee7a6e
Instead of passing the entire contents of
$(COMPATIBILITY.$(suite).FILES) to eval, which may keep that string
around, delay the evaluation of that, and the new files until inside the
eval.
This saves ~2.8GB: 7.4GB -> 4.6GB of ckati max resident memory for a
relatively small internal build. It also saves ~10% of the makefile
loading time (81 -> 73 seconds).
Test: build-aosp_arm.ninja is identical
Change-Id: If45a4796f1bbf6d67dff388ea877a6115a4e06f4
Many boards have warnings like this, saying that we defined a build
rule, but later something else came in and overrode it with something
else:
art/build/Android.gtest.mk:677: warning: overriding commands for target `test-art-target-gtest-cmdline_parser_test'
art/build/Android.gtest.mk:674: warning: ignoring old commands for target `test-art-target-gtest-cmdline_parser_test'
Beyond the obvious problem of replacing the rule with something else,
target-specific variables can be combined as well, leading to some very
strange problems.
Since so many boards still have problems like this, but we don't
currently have any global problems, add a flag so that we can mark
boards as not broken. This should prevent regressions while we clean up
the individual problems.
Once the non-broken devices number significantly more than the broken
devices, we'll switch this default. And once they're all cleaned up this
variable will become obsolete, and these warnings will always be errors.
Bug: 77611511
Test: lunch aosp_arm-eng; m nothing
Test: lunch aosp_marlin-eng; m nothing
Test: build_test on all downstream branches
Change-Id: I43b645658f468c23a5b9ebcfcd9d4516537db540
Our binary was rather old, and for a variety of reasons we haven't kept
it updated. We've been running into a handful of reliability issues that
would have been fixed with an update, and a few reproducibility /
correctness issues that may or may not be fixed with newer versions.
For local no-change full rebuilds, ccache can still save ~35% of the
build time (but adds a few minutes to initially populate the cache). But
most local uses should be using incremental builds anyways, not clean
rebuilds. Or you're doing builds of different configurations, which
wouldn't be cache hits either, and would make your cache even larger.
At a large scale, we haven't seen a significant performance difference
between having ccache on or off. This may be different if you've got
very good build locality, or a very large cache -- but if you've got
good build locality, it's reasonable to do incremental builds (not for
release builds, and while running `m installclean` in between builds).
So for our cases, we'd prefer the stability and correctness of not using
ccache, but if you still want to use ccache, continue setting USE_CCACHE
and also set CCACHE_EXEC to the path of your ccache executable.
Bug: 32748498
Bug: 72408185
Test: performance testing of USE_CCACHE=false vs true locally
Test: turned off ccache for a collection of targets
Test: CCACHE_EXEC=/usr/bin/ccache USE_CCACHE=true m
Change-Id: I7117fe3107bd98521051ae343038a38f7e855502
LOCAL_VINTF_FRAGMENTS/vintf_fragments are
used to specify what manifest fragments should be installed
by a target.
Test: fragments get installed to the right location
Test: broken fragment gets detected
Test: boot device and verify service is working and manifest is updated
Test: verify OTA package contains fragments
Bug: 66917623
Change-Id: I21abe65a31b8c3d255c8ccd80e102ff3acb23105
Start deprecating add_lunch_combo, preferring a list of common choices
in each AndroidProducts.mk file.
This list will be validated so that we don't have typos:
https://android-review.git.corp.google.com/c/device/generic/car/+/619533
Or targets that no longer exist.
Bug: 77599627
Test: lunch
Test: lunch 34
Test: lunch aosp_x86_64-eng
Test: lunch aosp_<tab>
Change-Id: Ie0ddaa94cbd6cee26584f56f1706a8ec1333f87e
The function along with LOCAL_TEST_DATA are very helpful, but it took me
some extra minutes to figure out the issue with the arguments.
Test: N/A
Change-Id: I2c2878fca99ab77ea881d86635c27c34f9ecf855
This is a list of modules which should be installed by default, but only on
builds which are set up for Address Sanitizer (via SANITIZE_TARGET=address).
Additionally, add sanitizer-status to PRODUCT_PACKAGES_DEBUG so that all
userdebug builds will have the binary. Currently, the module has the
"debug" tag but it may go away in the future.
Change-Id: I0bea4faf9c2a65380292471437e51ef8324b5af3
Normally, when building with VNDK, platform modules are not allowed to
link against vendor libraries, because the ABI of the vendor libraries
are not guaranteed to be stable and may differ across multiple vendor
images.
However, the vendor public libraries are the exceptions. Vendor public
libraries are vendor libraries that are exposed to 3rd party apps and
listed in /vendor/etc/public.libraries.txt. Since they are intended to
be exposed to public, their ABI stability is guaranteed (by definition,
though it is up to the vendor to actually guarantee it).
This change allows platform modules to link to vendor public libraries.
When the name of a vendor public libraries (whose stub is defined via
vendor_public_library in Android.bp) is listed in
LOCAL_SHARED_LIBRARIES, it is actually linked to the stub library which
is available to platform modules.
Bug: 74275385
Test: m -j
Change-Id: I063b43431196190b59332b1bcad59f267073f89f
This CL changes PRODUCT_CFI_INCLUDE_PATHS to be included in all
product configs by default. To maintain the status quo, the sanitizer
logic has been modified to only respect this product config for Arm64
devices (where this was previously enabled).
Bug: 63926619
Test: m -j60 # the device still has CFI enabled thanks to the default
opt-in
Change-Id: I22788d92be881d3290568488f5458c85e02ee8c7
If there are no symbols to keep (i.e. all function symbols are also in
the dynsym table), then the $@.keep_symbols file has size 0.
When objcopy parses a --keep-symbols file, it has a special case for
0-sized files where it silently fails (exits with status 1, no error
message). On the other hand, objcopy is happy with a file containing no
symbols, as long as there is some whitespace or a comment. Avoid the
special case by appending a newline to keep_symbols.
Bug: b/62815515
Bug: b/77242617
Test: manual
Change-Id: I348593164fe78ece5c85db3d28c7daccce3a52fb
AUX modules are not necessarily using the same toolchain
as the TARGET modules. they don't have to depend on
this library.
Change-Id: Ib50cf0eb26c257ae3eb69a43aa1a12c41d5d39b0
Signed-off-by: Alexey Polyudov <apolyudov@google.com>
This variable is equal to the sepolicy version for tip-of-tree development.
Bug: 74622750
Test: ./build/soong/soong_ui.bash --dumpvars-mode -vars PLATFORM_SEPOLICY_VERSION
is unchanged.
Change-Id: I2a62f7399fe245ec0c681e9a789da6b1b83dd9d8
When BOARD_SYSTEMSDK_VERSIONS is set, any apk in the vendor partition
is force built against SystemSDK (or Android SDK if LOCAL_SDK_VERSION is
set to current). However, there should be one exception to this: RRO for
framework-res.apk. This is because the RRO is currently overriding
resources that are not part of SystemSDK. Until SystemSDK is expanded to
cover resources that are eligible for overriding, let's allow the direct
dependency from RRO to framework-res.apk.
Bug: 35859726
Bug: 76398918
Test: m -j
Merged-In: Ib9981b107d78691eef21f4525ebdac9866d5c50e
Change-Id: Ib9981b107d78691eef21f4525ebdac9866d5c50e
(cherry picked from commit d8c4c30ba4)
javadoc expects directories on the sourcepath, not jar files.
The original commit 88b607994a
in 2009 was already passing the jar files, and every revision
since then seems to have kept this habit through cargo cult.
This CL removes the superfluous jar file arguments from the
sourcepath argument to javadoc.
Test: Treehugger
Bug: 76436487
Change-Id: I44b4b8ba248ad4deafbb6462e6f7398f15bd2845
When building vendor modules with BOARD_VNDK_VERSION=current, the
API of the vendor modules will be current PLATFORM_VNDK_VERSION.
__ANDROID_API_FUTURE__ will be used as before if the version is a
CODENAME.
If BOARD_VNDK_VERSION is not "current", that means the VNDK version
of the vendor modules is BOARD_VNDK_VERSION.
Bug: 74833244
Test: Build and check boot.
Change-Id: Iccc603f1b5ffa066e74ba1357f3fbbcc13c58f76
Non-A/B devices need to include the DTBO image
within the recovery partition to be self-sufficient
and prevent OTA failures.
Test: Ran 'm dist' and verified that the DTBO image
was included in recovery.img using unpack_bootimg.
Also ran 'make' and verified that the DTBO image was
included in recovery.img using unpack_bootimg.
Also tested that aosp_angler-userdebug could
boot into recovery(including a fake dtbo.img
in recovery image).
Bug: 74763691
Change-Id: I38c9c395c95d21f4da42cfa646063bd4416f6bd8
With project Treble, it's possible to only update system.img across
Android major releases without changing other partitions. However,
for non-A/B devices, ramdisk cannot be updated via a system-only OTA
because it resides in /boot partition.
This leads to two major incompatibility issues:
- The older /init in ramdisk might not be able to parse the *.rc files
on /system.
- The ramdisk contains /init.rc, which also may be out of date compared to
what is required for the new /system.
Therefore, for new devices launched in P with full Treble support, ramdisk
should be merged into system.img by setting
BOARD_BUILD_SYSTEM_ROOT_IMAGE := True.
Upgrading devices can keep using non-system-as-root configuration.
Bug: 64194858
Test: manual makefile prodding
Change-Id: Ic04c63bd2aac3afa686a6f5cb124beebbcd6a5ee
Add PRODUCT_OTHER_JAVA_DEBUG_INFO similar to PRODUCT_SYSTEM_SERVER_DEBUG_INFO.
Use WITH_DEXPREOPT_DEBUG_INFO as global default, and allow the product
to opt out by setting the above to "false."
Bug: 75259124
Test: m
Change-Id: Id4a2e5d00a1b73a7e7a0a65146042c0aa0c1b411
This allows the integer_overflow LOCAL_SANITIZE setting to be used with
static targets, to mirror Soong.
Bug: 73283972
Test: make SANITIZE_TARGET{,_DIAG}=integer_overflow
Test: Enabled sanitizer in a static target and tested for SIGABRT.
Change-Id: I0103dc3485b63b86a3dd36a7277b5001813b37fd
build_image.py used to invoke build_verity_metadata.py with a hard-coded
path of 'system/extras/verity/build_verity_metadata.py', which makes it
hard to run unittests from non-$(ANDROID_BUILD_TOP) directory.
This CL adds the dependency on the tool, so that it gets installed to
$(HOST_OUT_EXECUTABLES), then removes the hard-coded path.
Bug: 74544459
Bug: 76015688
Test: `m dist`
Test: python -m unittest test_validate_target_files
Change-Id: I0dcf4eb067a0db6f099cb589eb99a151a05c7f2b
* changes:
Add asan-specific CleanSpec
Use a srcjar for aapt and aapt2 output
Move R.txt and make aapt2 generate it
Move aapt2.mk before java.mk
Remove redundant renderscript_target_api computation
Move java renderscript support to java_renderscript.mk
Use srcjar and resource zip as output of renderscript rules
Dumping files in the *_intermediates/src causes incremental build
problems, because we don't know when to delete them if they are
no longer generated. Switch to outputting a srcjar instead, and
pass it in to the turbine and javac compiles.
Bug: 73885582
Test: m checkbuild
Change-Id: Ibef28507522339d930c09426d0c98372eb864cb6
Merged-In: Ibef28507522339d930c09426d0c98372eb864cb6
(cherry picked from commit 2d1cddd567)
Move R.txt from $(intermediates.COMMON)/src to $(intermediates.COMMON)
in preparation for moving aapt/aapt2 java files out of src. Also
make aapt2 generate R.txt, and make it an implicit output of the rule
and and input to the aar rule.
Bug: 73885582
Test: m out/target/common/obj/JAVA_LIBRARIES/SettingsLib_intermediates/javalib.aar
Test: m checkbuild
Change-Id: Ia858de226355965b69794c002f841333df16a612
Merged-In: Ia858de226355965b69794c002f841333df16a612
(cherry picked from commit 7c24f8ec85)
aapt2.mk will export a srcjar that will be compiled by java.mk, so
it needs to be evaluated first. Also move java_renderscript.mk
before aapt2.mk so that the generated resoures are available.
Bug: 73885582
Test: m checkbuild
Test: rm -rf out/target/common/obj/APPS/RsHelloCompute_intermediates &&
m out/target/common/obj/APPS/RsHelloCompute_intermediates/src/R.stamp
Change-Id: Ide3050ec993a945f7077b75e952c3b3532306ede
Merged-In: Ide3050ec993a945f7077b75e952c3b3532306ede
(cherry picked from commit 8528eabbba)