otatools.zip is required to sign GSI.
Bug: 112293933
Test: lunch aosp_arm64-userdebug && make otatools-package
Test: lunch aosp_arm64-userdebug && make otapackage will fail
Change-Id: Iae9f9af5cc8b98c05a66219779ce35592d3321bd
Scudo is now compatible with the -fsanitize-minimal-runtime, and offers a new
dynamic library that doesn't bundle UBSan.
This patch adds support for this new library in make, preferring it over the
full one, unless a diagnostic dependency is found.
Test: aosp compiled with m -j
Test: local test enabling Scudo for mediaextractor
Change-Id: I99ac0d410b1619de09783f5009476c1ea2995f98
This commit adds LOCAL_ADDITIONAL_DEPENDENCIES to soong_cc_prebuilt.mk
so that ABI dump and diff files can be generated and checked.
Test: make -j && find out -name '*.abidiff'
Change-Id: If12ec9a321f42efe4f8dc938568e8911400cc053
When LOCAL_SANITIZE := never is given for an executable, skip
building the binary in the ASAN build stage.
Bug: 117579123
Test: Build ASAN image with a never-sanitized executable
Change-Id: I6495fc857678ca9b46527c7d60ee71112004266d
Most of the 6 nested conditionals are independent and can be
evaluated individually. This has a slight change in behavior,
disabling preopt for a module in the product will now override
LOCAL_DEX_PREOPT, but that seems preferable.
Test: m
Change-Id: I6a4060a78df729c34bbf6978c84993859a947bf7
When "PRODUCT_DEX_PREOPT_GENERATE_DM_FILES := true" and
"PRODUCT_DEX_PREOPT_DEFAULT_COMPILER_FILTER := verify" are set,
boot jar may wrongly refer to previous module's variables such as
my_generate_dm, my_built_dm and my_installed_dm. And then cause
unexpected files installed along with this boot jar.
So initialize my_generate_dm to empty at first.
Bug: 117526952
Test: make out/target/product/generic/module-info.json
Test: cat out/target/product/generic/module-info.json | grep '"apache-xml":'
Change-Id: Iaa851f4fb530b3446de3dbcb1f54e545938830ce
This reverts commit 039bb48f72.
This is no longer needed. Depending on the setting of REMOVE_OAHL_FROM_BCP the org.apache.http.legacy library is now either on the bootclasspath or a standalone library, it cannot be both.
Bug: 18027885
Bug: 72167111
Change-Id: I88eb24f8a4324e206fd384cd8adf79acd6fc0858
Merged-In: I88eb24f8a4324e206fd384cd8adf79acd6fc0858
Test: make with and without REMOVE_OAHL_FROM_BCP=true
(cherry picked from commit 9390268746)
If an APK specifies LOCAL_PREBUILT_JNI_LIBS embedded in the prebuilt
APK, remove any that aren't listed. Restores the behavior from before
I82dd3aa441712772a1d1ddd6aaf5f41179facaa7.
Bug: 69500920
Test: m checkbuild
Change-Id: I971a9c4206604c172d77144df4c0ed9a8b1c5dd0
The --compile-pic argument is obsolete, all generated code
is now PIC.
The -Xnorelocate is ignored by dex2oat since
https://android-review.googlesource.com/771001
where the option was reinterpreted from "use patchoat if
needed" to "relocate the boot image in memory if possible"
and dex2oat forbids that relocation.
Test: Pixel 2 XL boots.
Bug: 77856493
Change-Id: I60cdf81267a129be8a482af26fb865110561268e
BUG: 117224272
Test: 1. Modify build/core/base_rules.mk
Add the following line after line 617
$(eval my_compat_dist_$(suite) += out/a:out/a))
2. touch out/a
3. make -j BluetoothInstrumentationTests
4. It should build pass without any dependency errors.
Change-Id: I40372eab5b74e042f605c3cb38e72942531ed69a
Unzipping and rezipping files causes the umask of the host machine
to affect the permissions in the APK. Use the new zip2zip -0 feature
to rewrite the zip file with selected files uncompressed.
Bug: 69500920
Test: m checkbuild
Change-Id: I82dd3aa441712772a1d1ddd6aaf5f41179facaa7
Zip classes*.dex so that the jar does not contain an empty
classes.jar.
Test: m out/target/common/obj/JAVA_LIBRARIES/android.test.base.impl_intermediates/javalib.jar
Change-Id: I53bdd2035b2963dd781734da64058c95e1cff9d4
Obsolete more GCC-specific flags, TARGET_(arm|thumb)_CFLAGS now contains
pre-filtered clang flags, and GLOBAL_CLANG_CFLAGS_NO_OVERRIDE now
contains all flags instead of just the clang additional flags.
Test: m
Change-Id: I068f155041e681068d38e1a5b6b04d354b85ccee
* BOARD_SUPER_PARTITION_GROUPS defines a list of "updatable groups". Each
updatable group is a group of partitions that share the same pool of free
spaces.
* For each group in BOARD_SUPER_PARTITION_GROUPS, a BOARD_{GROUP}_SIZE and
BOARD_{GROUP}_PARTITION_PARTITION_LIST may be defined.
- BOARD_{GROUP}_SIZE: The maximum sum of sizes of all
partitions in the group.
If empty, no limit is enforced on the sum of sizes for this group.
- BOARD_{GROUP}_PARTITION_PARTITION_LIST: the list of partitions that
belongs to this group.
If empty, no partitions belong to this group, and the sum of sizes is
effectively 0.
* BOARD_SUPER_PARTITION_PARTITION_LIST should not be defined
by the device. It is now computed from all
BOARD_{GROUP}_PARTITION_PARTITION_LIST.
* Each 'updatable group' has its own pool of space for its
partitions to grow into. Enforce the following:
* sum(all partitions) <= super partition (/ 2 for A/B)
* For each group, sum(partitions in group) <= group size
* sum(all group sizes) <= super partition (/ 2 for A/B)
Test: builds
Bug: 111610495
Change-Id: I072b011714ec31a1d8813cc75edd27da3c6ff39a
Merged-In: I072b011714ec31a1d8813cc75edd27da3c6ff39a
Use install_jni_libs_internal.mk to install JNI libraries alongside
preinstalled APKs. APKs with embedded JNI libraries are handled
within Soong.
Bug: 80095087
Test: m checkbuild
Change-Id: I2ecf10b6771dff14c940cc6e6442eb2ae43a75b0
- Don't duplicate the same comment over and over
- Stop defining values that are immediately overwritten
Test: make
Change-Id: I87cb2c2b76bb69a026695e145849f4acee197b94
This changes the paths for partitions modules inside the 'asan'
subdirectory to match those used when not making sanitized builds.
This fixes get_non_asan_path macro, which just strips the 'asan' dir
from the lib paths.
For example, on a device without a product partition, previously
libraries would install install in:
- out/target/product/x/asan/product/lib[64]/y.so (with SANITIZE_TARGET)
- out/target/product/x/system/product/lib[64]/y.so (no SANITIZE TARGET)
Stripping the asan dir would look for the lib in out/.../<x>/product/,
which didn't exist. The new path for SANITIZE_TARGET builds is now
out/target/product<x>/asan/system/product/lib[64]/<y>.so
Bug: 117089649
Test: m; SANITIZE_TARGET=address m (for a device without /product)
Change-Id: Id663c5f284e3b4fc65ed8cb8c2da6bcf6542e034
These files are now unused, patchoat shall be removed soon.
Test: m
Test: Pixel 2 XL boots.
Bug: 77856493
Change-Id: I07babe7e6b2657e340265e74042e958a91678329
mmm has a smaller view of the world and cannot generate sdk-addon
zip files.
Bug: 116818719
Test: m checkbuild
Change-Id: I9e73c0b84a42aaaa353704d6ab245b449166606d
soong_zip produces more reproducible zip files that are not
affected by umask values or timestamps.
This partially reapplies I2eca2f7618e06c0b5893ff54c79261921fe051d6
with fixes for 64-bit only builds and directories that are changing
during zipping.
Bug: 69500920
Test: m checkbuild
Test: m checkbuild platform
Test: lunch hikey64_only && m platform
Test: contents of zips is unchanged
Change-Id: Iac5c43276f7ae700d4d13d0ef27003d09c1c87e0
soong_zip produces more reproducible zip files that are not
affected by umask values or timestamps.
This partially reapplies I2eca2f7618e06c0b5893ff54c79261921fe051d6.
Bug: 69500920
Test: m checkbuild
Test: contents of zips is unchanged
Change-Id: Idf6fbc94e257dc34af4f5b115d740b7cb9bac015
soong_zip was previously ignoring trailing command line arguments,
but now they are an error. boot_profile_jars.zip had all its
files as trailing arguments instead of as -f flags, previously
resulting in an empty zip, but now causing an error. Fix the
arguments to use -f before each file.
Test: m PRODUCT_DIST_BOOT_AND_SYSTEM_JARS=true out/target/product/sailfish/boot_profile_jars.zip
Change-Id: I8ac4aa4fbca812b8aa2ff9526e1ed7c769dd8420
This is more convenient than the current always-off conditional,
because it doesn't require changing the build system to dump
the installed files.
Bug: 80410283
Test: m dump-files
Change-Id: I7d395750673aff07d2018ffce8321dd280b94ccf
The installed jni libs were previously not tracked in the way
other installed files were. One problem with this is that the
product-installed-files macro failed to track these files.
Bug: 80410283
Test: build_test
Change-Id: I85f528f228ef6921ed596d58303991a5370ae631
$OUT/obj/APPS/SystemUI_intermediates/package.dex.apk was not being
written after being converted to Soong. Add a copy rule for it
to soong_app_prebuilt.mk, add it as an implicit output to the Make
rules that create it, and add it as a real dependency to the
platform.zip rules.
Test: m platform
Change-Id: I96f58d3d80b764a51a6acb87e92498589cfe5c18
We turn off the default implicit and suffix rules with
--no_builtin_rules.
DELETE_ON_ERROR has no effect, ninja just keeps track of whether we've
successfully built it or not.
Test: build-aosp_arm.ninja is the same before/after
Change-Id: I2e407d4a12dd3a2af3e923fe3e1a3f7a6e2a463c
The recovery image already contains a copy of first stage init, so we
can boot unconditionally to the recovery image and instruct first
stage init whether or not to boot to Android or to recovery. In this
case, we need neither the kernel to mount /system as / nor a separate
partition for recovery, so this change modifies the build scripts to
allow this combination.
Bug: 114062208
Test: Boot pixel from recovery to Android with BOARD_USES_RECOVERY_AS_BOOT
But without BOARD_BUILD_SYSTEM_ROOT_IMAGE
Change-Id: Icd047afb7f22d2724b3bcaca1aa0c837426dcce7
- Link libgcc_eh, which needs pthread, which in turn depends on
kernel32. Wrap the libraries with --start-group and --end-group and
remove duplicates.
- Use SjLj exceptions for 32-bit. libgcc_eh implements SjLj exception
model for 32-bit.
- Disable visibility annotations for libcxx and libcxxabi since we are
only going to support these as static libraries.
- Use Win32 threads. MinGW pthreads throws an error when building
libcxx since it's pthread_mutex_initializer is not constant (needs a
cast).
Test: Build and test Windows binaries under Wine.
Change-Id: I594fa7673282ff5c1b7b80d49f48b7618960a148
This has been long dead since commit
17c83cf22c (2009).
Test: m checkbuild (via TreeHugger)
Test: No hit in code search.
Change-Id: I054241ae63436ade2f4e50ec2fc3757ae35635dd
d8 requires the full classpath if --min-api requires default method
or try-with-resources desugaring. Always pass the full classpath,
since it will already have been built to generate the input jar.
Bug: 116243313
Test: m checkbuild
Change-Id: I363b4d3145e23d4eed77455c1897430206f3ac22
For ASAN build the intermediate dir might differ from the default
directory.
Test: m (on an affected ASAN build)
Bug: 116020783
Change-Id: Ie4f282ea651d710351799f3fc24dba42e79ee63d
Adding -pie to LOCAL_LDFLAGS for host linking leaves it around
when doing the host cross Windows linking, resulting in a warning:
clang-7: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]
Add it later in binary.mk after the flags have been copied to the
single-use my_ldflags.
Bug: 115776263
Test: m checkbuild
Change-Id: I70d71fa1ec6445631dc7e89ef61927a3304375e2
For example, if BOARD_SUPER_PARTITION_SIZE is
10GiB, then the sum of sizes of all dynamic partitions must
be within 5GiB.
Fixes: 115920069
Test: make
Change-Id: I800faff28e8483c92a1c0cf5e0b3bae4d638f86d
When the system partition is a dynamic partition, the device will be
using an initial ramdisk and should not have a root device specified on
the kernel command-line.
Bug: 115939310
Test: device boots when BOARD_SUPER_PARTITION_PARTITION_LIST contains
super and AVB is enabled.
Change-Id: I5c4b2304bf1ab6a59443c43c354845bf8a3949f0
Missing that doesn't seem to affect correctness, but it upsets the
syntax parsing in my editor.
Test: `m -j out/target/product/marlin/recovery/root/prop.default` with
aosp_marlin-userdebug.
Change-Id: I272f6a6e4fe67b3ef316aa38896a0df0b42228d0
dex_preopt_odex_install.mk should always be included, it handles
setting a default value for LOCAL_DEX_PREOPT.
Use dexpreopt-copy-jar when preopting to strip the dex file if
necessary.
Bug: 115967961
Test: m SystemUI
Change-Id: I74f77ed0e88a67043836407261f3845a16cbaf37
$(HOST_OUT)/obj/PACKAGING is cleaned via `installclean`, so regular
built modules should not be depending on it. Explicitly call out the
dependencies instead.
Test: m; m installclean; m
Change-Id: I0f318257e4742d6b7bd099dc06958ca8aba0cfb8
Also remove the msg.mk files used for old apicheck.
And export jdiff-doc.zip generated by Soong.
Test: api-stubs-docs-diff
Bug: b/78245848
Change-Id: I329aa375623a7b7a121d58314dab694a326c9f0f
soong_zip produces more reproducible zip files that are not
affected by umask values or timestamps.
Bug: 69500920
Test: m checkbuild
Test: contents of zips is unchanged
Change-Id: I2eca2f7618e06c0b5893ff54c79261921fe051d6
zip maintains permissions when adding files to zips, which causes
the final jars and apks to change based on the umask of the build.
Move some of the rules that were using zip to soong_zip instead.
Since soong_zip doesn't support adding files to existing zips,
create a new zip file for each part of the package creation
process and then merge them together at the end with merge_zips.
Bug: 69500920
Test: m checkbuild
Change-Id: Id253df776ce19ec4cac3a36fa470a50461ea3cad
In preparation for rearranging the way jars and apks are built.
Relands Ib9f0da132196942062c58fd5b12e84588106724e with a fix to
correctly include classes.dex in hostdex jars.
Test: m checkbuild
Change-Id: I397544456b8ce5827716fcd1828de707b719c2bb
The change https://r8-review.googlesource.com/c/r8/+/26482 made R8
process data resources by default. This is not expected for the
Android Platform build
Test: m -j PRODUCT-aosp_x86-userdebug core-oj
Change-Id: I8936a39ea3cc0f46e455087076635a8fa2c9e0d3
If something needs to distinguish between _OVERRIDE and non-_OVERRIDE,
it is a hack (these should be the same property).
Bug: 114488870
Test: m nothing (exercises this)
Test: searching all of these reqs in the code.
Change-Id: Idc22150a3179d025d7d95beafad39e8b07946ef8
This makes the product-installed-files macro more accurately reflect
the files installed for a given product, as well as fixing bugs in
the previous implementation.
Specifically, the complete list of overrides found so far is stripped
in each round of expanding required modules. Previously, overrides were
stripped out *after* expanding required modules. This meant that for a
scenario where B depends on C, and A overrides B, C could get installed.
It's unclear if this was a problem in practice.
The other effect is that the offending artifacts txt is more accurate,
since overridden modules are now correctly removed.
Bug: 80410283
Test: build_test downstream
Change-Id: I8bfc7c40bedd5cb2afba567bae4b998f51770793
This makes the product-installed-files macro more accurate, as it will
now include the eng/debug/test/asan packages for each product involved
in the analysis.
It also fixes a bug, where packages in e.g. PRODUCT_PACKAGES_DEBUG
would not get their REQUIRED modules installed prior to this change
(I think).
Bug: 80410283
Test: diff modules_to_install on an internal product
Change-Id: I8e148454df2f96523bbed25e2695d050559968f1
These are left in PRODUCT_PACKAGES so that they can still
be added to the classpaths of legacy targets.
Bug: 77307025
Test: boot Pixel 2
Change-Id: Ib14969291319e03f181b9ea4d40096de095137e7
- add "dependencies" and "srcs" to collect in module-info.mk.
- add "Srcs" in core/base_rules.mk
Bug: 112523202
Test: make out/target/product/generic_x86_64/module-info.json and
generate out/target/product/generic_x86_64/module-info.json
Change-Id: I0669377b2e5e6b4ee225f1930bda208eff092dea
Allows dist-for-goals entries to use always use apps_only, without
having to conditionalize on TARGET_BUILD_APPS, or cause errors on full
platform builds.
Test: EMMA_INSTRUMENT=true m dist
Change-Id: Id484ad2a650b8ad49880469f195080ef7fa8c814
When ASAN is on, recovery modules are instaled to
$(OUT_DIR)/target/product/.../data/asan/recovery/root. However, since
this is not under $(TARGET_RECOVERY_OUT), their linktype is incorrectly
determined as native:platform, instead of native:recovery.
To fix this, use get_non_asan_path to have consistent paths when
determining the linktype.
Bug: 115361480
Test: m -j; SANITIZE_TARGET=address m -j
Change-Id: I75edb1fe193d8a1a8099d4f5cf498910ca868d38
These are used in various dist-for-goal targets even if we're not
currently building the sdks, so they always need to be marked with
.PHONY.
Test: m dist
Change-Id: I1e11ae37c6d0fd6ef8a3e293cf7409773c1bf3ab
Add soong_cc_prebuilt.mk for Soong modules to use so they can avoid
going through all of prebuilt_internal.mk, dynamic_binary.mk and
binary.mk. Also moves stripping support into Soong.
Relands I8b37dda2b449b6b5d48d5b983f43de452f494a1e with fixes for
builds with GENERATE_BREAKPAD_SYMBOLS=true
Bug: 113936524
Test: m checkbuild
Change-Id: Id41cd76ccb1b5bb6ac43b41ae3e8f1ce46d7ad7e
targetSdkVersion should stay as "current" when LOCAL_MIN_SDK_VERSION
is set but LOCAL_SDK_VERSION is not.
Bug: 112438448
Test: atest CtsTelecomTestCases
Change-Id: I72a2dc1073013863f5f8c44f271eace2a4e37a23
full_android_manifest may or may not be equal to
fixed_android_manifest, set PRIVATE_MIN_SDK_VERSION on
fixed_android_manifest instead.
Test: m checkbuild
Change-Id: I21795317a1334ebed772e781aeefba87392a8478