Make it so that `export`/`unexport` are deprecated during product
configuration, but obsolete during Android.mk parsing (and later in the
build, since we can't un-obsolete it).
Remove some ccache / goma exports, those don't need to be exports, since
soong_ui asks about them explicitly. They also only run doing the
initial project configuration, so we don't run anything with that
environment.
Bug: 73959648
Test: m nothing
Test: build_test on all downstream branches
Change-Id: I55a749f46775660439ae57e881a02c914e83de16
Make the values tristate, so that we can differentiate set vs not in
scripts that parse the logs.
Also add some placeholders for warnings that I expect to turn into
errors.
Test: Set BUILD_BROKEN_PHONY_TARGETS to "foo"
Change-Id: I3f7e1e0f85dcef84d6461fc40bdd83dc5bf75ff7
If there aren't any boot dex files, we can't generate a boot image
profile.
Test: lunch uml-eng; m
Test: diff build-aosp_arm.ninja
Change-Id: I09cc1ef37379d9d353958c8aa75731f3d29df759
A java module exports SDK library names that it is using directly or
indirectly via its dependencies. Manifest fixer uses the SDK lib names
to automatically add <uses-library> tags for the apk.
The SDK library names are exported via exported-sdk-libs file in make.
From Soong, they are exported via LOCAL_EXPORT_SDK_LIBRARIES flag.
Bug: 77575606
Test: m -j
Change-Id: I4e7a9bdc5bf845af85168abf55f8063900bacc72
Scudo is a hardened usermode allocator that is part of LLVM's compiler-rt
project (home of the Sanitizers). clang allows for -fsanitize=scudo as a
possible command line option to link the shared Scudo library to a binary.
This patch add Scudo as a potential sanitize option. Scudo is not compatible
with ASan and TSan and will be disabled if either is enabled.
Test: aosp compiled with m -j
Test: local experiment with LOCAL_SANITIZE := scudo to ensure that a test
target (mediaserver) could be linked with scudo.
Change-Id: I462843b9d5512fba2c4a3ac1a0c356ca90bce4e5
Switch a use of `ndk` to the timestamp file that `ndk` depends on
itself.
Mark more module-specific rules as PHONY.
Test: diff build-aosp_arm.ninja (stripping _kati_always_build_)
Test: Turn on --warn_real_to_phony for Kati, see fewer warnings
Change-Id: I101ced4067780e38d18820f5d916596429087e49
These had been depending on the phony target for the library
(liblz4.vendor), not the actual built file and notice file.
Since we hadn't been saving the NOTICE file, and were only assuming the
installed notice file path. save that away for use during packaging.
Test: m vndk; diff out/target/product/generic/android-vndk-aosp_arm.zip
Test: m vndk; diff out/target/product/generic_arm64/android-vndk-aosp_arm64.zip
Change-Id: If9a4bed27030b7bd464cd3987739df94d32a0037
This reverts commit 4cd1a75d17.
PackageParser no longer treats minSdkVersion=Q as targetSdkVersion=Q
when targetSdkVersion is set to a number.
Bug: 110167203
Bug: 110353795
Change-Id: Ib44743e4c49e59cd29a57af1bf885090e380b1b6
Since this is a directory separator, it causes a good deal of
strangeness in the build whenever we include a module name in a path.
It becomes particularly problematic if used together with ".."
Test: build_test on downstream branches
Change-Id: I344eca0db3346cd6ffabff767c34159c85ebc051
Pass LOCAL_STATIC_ANDROID_LIBRARIES to ManifestMerger, and copy
manifests for prebuilts AARs and static android libraries to
$(intermediates.COMMON)/manifest/AndroidManifest.xml.
Bug: 78447299
Test: m java
Change-Id: I02ac29d3445fcd591101ff0ce215e60dd0997224
Merged-In: I02ac29d3445fcd591101ff0ce215e60dd0997224
Merged-In: Ib20aa4849978283f1da1ce601b28199fc0183e05
If there happen to be any dependencies added to target of $(test_config),
it'll cause problem in the autogen_config. We fix it by using $< in
the autogen command.
BUG: 109736180
Test: lunch walleye_coverage-userdebug; make adbd_test
Change-Id: I22ab100c5a3f9fa058c1edd66f9e5cfdf5b7f855
installed-files*.json provides hashes of each file, which will allow
a quick comparison of what has changed between builds.
Test: m checkbuild
Change-Id: I87f6c1fa89aaa83c7bcc7cbefb799e9e26d7bfa5
Add a script that can inject a <uses-sdk minSdkVersion=""> into
AndroidManifest.xml files. This will help with merging
LOCAL_STATIC_ANDROID_LIBRARIES, because ManifestMerger treats
a missing minSdkVersion as minSdkVersion=1 and throws errors
if libraries use a larger minSdkVersion. It will also help
with cases where an app has a manifest that specifies an old
minSdkVersion, but the build system is compiling the app in
a way that is not compatibile with old devices, for example
using a newer dex format.
Bug: 110167203
Test: m java
Change-Id: Ia60d462e8af9e93c57d75f423207fa8d221b1347
Some modules have manifests that ManifestMerger doesn't like, and
don't need manifest merging. Skip manifest merger if
LOCAL_DONT_MERGE_MANIFESTS is set.
Bug: 78447299
Test: m checkbuild
Change-Id: If1a58253c62e0194a6acfd79930b9bb10978abe5
Some modules generate their own custom AndroidManifest.xml file
to $(intermediates.COMMON)/AndroidManifest.xml file. Move the
build system's location to
$(intermediates.COMMON)/manifest/AndroidManifest.xml.
This location will also be used later for finding manifest files
from LOCAL_STATIC_ANDROID_LIBRARIES dependencies.
Bug: 78447299
Test: m checkbuild
Change-Id: I345f079bdd191451333b38d882418f2f7150b1e9
Merged-In: I345f079bdd191451333b38d882418f2f7150b1e9
(cherry picked from commit 00a6348e7dfa4fafc308ab92d8e7d06dcfcd01ba)
Bug: 36970783
Test: builds pass without failures
Test: builds fail with failures in init files used via LOCAL_INIT_RC,
PRODUCT_COPY_FILES, or TARGET_PREBUILT
Change-Id: Ia98793776b365733ca8f0174dc228326a6edf041
Setting PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS to be non-empty will
verify that when an inherited product file makes an path requirement
claim, no files other than the ones it produces are allowed inside its
paths. This allows more rigorous control of what goes where, and
specifically stops accidental inclusion of modules in the wrong places
(which is very easy to do otherwise).
In order to enable iterative improvements to current offenders, support
for a whitelist is also added (via the new
PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST property). Verification is
done that this variable corresponds to exactly the list of current
offenders.
Example use:
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := true
PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST := system/priv-app/Dialer/Dialer.apk
Bug: 80410283
Test: In a downstream CL specifying the above.
Change-Id: I58047db08bde34da21759cfc55f398892b1c809a
Remove my_full_libs_manifest_deps by making AndroidManifest.xml an
implicit output of the prebuilt aar unzipping rule.
Bug: 78447299
Test: m checkbuild
Change-Id: I26934d16fd646d45bf57c9527dbb191112cb627b
Merged-In: I26934d16fd646d45bf57c9527dbb191112cb627b
(cherry picked from commit 2b5829e1a6)
When a product adds a path requirement, the build system will verify
that all its artifacts are produced inside these paths, and fail
otherwise.
The paths are all relative to PRODUCT_OUT, and the macro also supports
giving a whitelist, for known existing offenders in the hierarchy. The
build will fail if redundant whitelist entries are present.
Example invocation:
_paths := $(TARGET_COPY_OUT_SYSTEM)/
_whitelist := root/init root/init.rc
$(call require-artifacts-in-path $(_paths), $(_whitelist))
Bug: 80410283
Test: Downstream with a new product definition.
Change-Id: I235de681f65254087a42e345af69b2113b682072
This way, the logic can be reused for multiple products during
the same build step. This will be used to track files output
by different subtrees in the product makefile hierarchy.
Bug: 80410283
Test: diff produt_FILES before and after
Change-Id: I6dd1cf586410b9809fdd9d75441128acb07cab08
The dyanmic linker and the linker config script for the recovery mode
(*.recovery variants) are added to PRODUCT_PACKAGES.
Also this removes the mountpoint /system_root from the recovery image as the
recovery image is self-contained and the real system image is mounted at
/mnt/system which is created automatically at runtime.
Bug: 63673171
Test: `adb reboot recovery; adb devices` shows the device ID
Test: Select 'mount /system' in the recovery mode, then `adb shell`.
$ lsof -p `pidof adbd` shows that libm.so, libc.so, etc. are loaded from
the /lib directory.
Change-Id: Ice6c75b0b81bb9be696aaff3e095d87f19278995
Note of existing configurations:
* When lld is used, llvm-strip and llvm-objcopy are also used.
* darwin host modules do not use lld.
* lld can be disabled locally with use_clang_lld:false in Android.bp
or LOCAL_USE_CLANG_LLD:=false in Android.mk.
Bug: 73768157
Test: make checkbuild, boot and run bionic and system/core native tests
Change-Id: I3067ff8021dd6e1598f2447b80aea66a3f7e1677