For the envsetup.sh variables that should not be used in makefiles
(since they're not explicitly set up, and won't be available on the
build servers), mark them as deprecated.
Rework our documentation to have a landing page, and create a "Changes"
section where we can record changes like these. At some point I may go
and backfill some recent work.
Test: build/soong/build_test.bash
Change-Id: I54b9294ddf270245afdb58d17150db8098584e8a
$(basename) was catching all of the hidl services that have versions
like "1.0" in their name, marking the .0-service portion as a suffix to
be removed.
Instead just remove ".so" and assume that everything else isn't actually
a suffix.
Bug: 69271974
Test: NATIVE_COVERAGE=true COVERAGE_PATHS=hardware/interfaces m; compare
ninja files
Change-Id: I76e27d9ab1f9d4862cc2607c5f2ed9c121879421
partition_tag is now set to either VENDOR_, OEM_, or ODM_
even when LOCAL_[VENDOR|OEM|ODM]_MODULE isn't set but LOCAL_MODULE_PATH
is explicitly set to under $(TARGET_OUT_[VENDOR|OEM|ODM]).
Test: build walleye
Change-Id: I0f902061889fe0af1c39f6222e54faa80dd15794
Define a new phony target 'vndk' such that 'make vndk dist'
outputs VNDK snapshot zip file to DIST_DIR.
Bug: 66059995
Test: m -j vndk dist TARGET_PRODUCT=aosp_{arch}_{a, ab}
BOARD_VNDK_VERSION=current
Change-Id: I6fd763a91205b21fba414d1f3068408a6826fad8
So that they can be updated more regularly than prebuilts/sdk/tools.
Bug: 69431993
Test: tapas ExactCalculator; m
Change-Id: Id07ab43f9d9e0c794cc15f21b75ae88c3547d8bd
This allows modules to specify that they may only be used from modules
using aapt2. Using aapt2 removes absolute path references to modules, so
this can be useful if a module is preparing to move its sources, or
replace itself with a prebuilt aar.
Test: m
Test: Label frameworks/support/design; m
Test: Label frameworks/support/v4; m
Test: build/soong/build_test.bash
Change-Id: Icfb3d4b19a6a0e3a3bb00091d2a97a4d88c0c761
Package gpl_source.tgz directly into the dist directory (which is
always removed between build server builds) so that FORCE is not
needed. This prevents the build system from seeing a dirty rule
at the end of a make checkbuild dist.
Bug: 68062417
Test: m checkbuild dist
Change-Id: I4a9d9deb1611cc9ba266e8c1ac086a7ef48061c4
This makes the following readonly if they are defined:
- PRODUCT_FULL_TREBLE_OVERRIDE
- Linker/sepolicy/vintf overrides for PRODUCT_FULL_TREBLE
Test: multiproduct_kati
Change-Id: Ib33e2e23b74a049e87667358bed331f86e517837
This change fixes the following warning message:
WARNING: out/target/product/$(TARGET_DEVICE)/boot.img approaching \
size limit (33554432 now; limit 33554432)
This is because AVB signing will increase boot.img to
BOARD_BOOTIMAGE_PARTITION_SIZE, in order to place the AVB metadata at
the end of the partition. We should check max image size first then use
avbtool to sign it.
The max allowed size will be (partition size - AVB_HASH_META_SIZE) when
AVB is enabled.
Bug: 69115400
Test: build and checks there is no size limit warning message
Change-Id: If9545e64a0d1714a2ec2440f9bd38293e7b1ba9a
This CL topic breaks the single flag value EXPERIMENTAL_USE_OPENJDK9
into two flags USE_OPENJDK9 and TARGET_OPENJDK9 which are computed
independently in config.mk and config.go; this means that later
build logic no longer depends on / duplicates the semantics of an
unset EXPERIMENTAL_USE_OPENJDK9, because that later build logic
can use USE_OPENJDK9 and TARGET_OPENJDK9 instead. Thus, it becomes
slightly easier to change this default in future CLs (touching
only config.mk and config.go).
It also makes it more straightforward to convert .mk files
to .bp.
This CL also introduces a new allowed value "false" for
EXPERIMENTAL_USE_OPENJDK9. This fourth possible value currently
has the same semantics as a default/unset
EXPERIMENTAL_USE_OPENJDK9, but allows people to explicitly
switch back to the old semantics when the default changes.
Test: make showcommands core-oj (in environments with
EXPERIMENTAL_USE_OPENJDK9 set to "", "1.8", and "true").
Bug: 38177295
Change-Id: Iaade9610b237722e5d175143808b8653b1e98996
Soong generates the R.java for framework-res.apk to a srcjar.
Droiddoc will need to consume them, so add support to the droiddoc
rules for extracting sources from a srcjar.
Test: m checkbuild
Change-Id: I064889c9063b642835d9f668e2568b61d0fabe35
my_generated_res_dirs wasn't being reset in some cases in between
different modules. To be safe, clear every input variable that I was sure
was not being used by the caller after aapt2.mk.
Test: m
Test: m ANDROID_BUILDSPEC=vendor/google/build/app_build_spec.mk
Change-Id: I37c861d99637cad77a2a378a119bf66cee373b3a
We don't have great alternatives for some of these use cases, so for now
just silence them, writing them to $OUT/product_copy_files_ignored.txt
(and if `dist' is specified, $DIST_DIR/logs/product_copy_files_ignored.txt)
Test: lunch aosp_arm-userdebug; m nothing
Test: lunch aosp_arm-userdebug; m dist
Change-Id: If0228bc8d907346e3505ae136cb477ef37a5c867
When some of the full treble requirements are turned off,
PROUCT_FULL_TREBLE became false, which in turn cleared macro variables
guarded in treble: {cflags: "..."}.
Until when Soong recognizes each of the requirements (e.g.
treble_sepolicy: { }), don't reset PRODUCT_FULL_TREBLE to false
even when some of the requirements are not met.
Bug: 62019611
Bug: 68710251
Test: get_build_var PRODUCT_FULL_TREBLE returns true for aosp_walleye
Test: aosp_walleye boots to the UI
Change-Id: Iad3ee4f4462c82e9f9e1897f3ec019cdd16da358
PRODUCT_SEPOLICY_SPLIT
PRODUCT_TREBLE_LINKER_NAMESPACES
PRODUCT_ENFORCE_VINTF_MANIFEST
Being able to selectively toggle these does several things:
- it's better software engineering (no longer conflating vars)
- easier bringup for devices.
- devices which don't require full Treble can opt out of only
parts of it and still get the benefits of others.
Bug: 62019611
Test: manual
Merged-In: I728e32869baf043ae9a54e83e513fb99e560c827
Change-Id: I728e32869baf043ae9a54e83e513fb99e560c827
With the update of brotli to version 1.0.1 the new binary tool is now
called "brotli". This patch updates the scripts to use the new name.
Bug: 34220646
Test: `make dist`; ota_from_target_files on non-A/B device.
Change-Id: Ie8da4333388d029d5960a723a55efd875d8ee820
checkvintf will be used to verify compatibility of OTA packages.
Bug: 68327258
Test: `m -j dist` and inspect archive for checkvintf
Change-Id: I1d4cfcff537a03adee28d1e6ba9403a2e1635fe0
With this enabled, we'll check the entire build graph for missing
dependencies -- even if you don't need to build the module. So it'll
present more errors, but surface them earlier.
These can be turned off manually with an environment variable if the
branch is expected to have missing dependencies:
ALLOW_MISSING_DEPENDENCIES=true
SOONG_ALLOW_MISSING_DEPENDENCIES=true (previous method)
That will be set automatically when using 'mm', which doesn't load the
entire build graph. It will also be set when using 'tapas' to build
unbundled apps, since those are usually on reduced branches.
This provides better error messages when a library is missing:
system/core/init/Android.mk: error: init_tests (NATIVE_TESTS android-arm64) missing libinit (SHARED_LIBRARIES android-arm64)
Available variants:
libinit (STATIC_LIBRARIES android-arm64)
libinit (STATIC_LIBRARIES android-arm)
You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build.
system/core/init/Android.mk: error: init_tests (NATIVE_TESTS android-arm) missing libinit (SHARED_LIBRARIES android-arm)
Available variants:
libinit (STATIC_LIBRARIES android-arm64)
libinit (STATIC_LIBRARIES android-arm)
You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build.
build/core/main.mk:852: error: exiting from previous errors.
instead of:
ninja: error: 'out/target/product/generic_arm64/obj/SHARED_LIBRARIES/libinit_intermediates/export_includes', needed by 'out/target/product/generic_arm64/obj/NATIVE_TESTS/init_tests_intermediates/import_includes', missing and no known rule to make it
Test: Manually introduce errors, check for expected output
Test: multiproduct_kati on AOSP and internal master, no new breakages
Change-Id: I5847f813045929813214137403c499b44ef67907
Merged-In: I5847f813045929813214137403c499b44ef67907
we should clean up proguard_flag_files if LOCAL_PROGUARD_ENABLED
not defined in current module in case legacy proguard_flag_files
slips into current jack_all_deps dependencies.
Test: make -j8
Change-Id: I45618fc8e821ab7a8b964fa621824209e1e9894c
Signed-off-by: ShuJie Wang <wangshujie@xiaomi.com>
This CL adds the ability to centrally enable or disable CFI for
components using either an environment or product config
variable. This is a better, nore manageable option that enabling CFI
across each component individually.
Bug: 67507323
Test: CFI_INCLUDE_PATHS= system/nfc m -j40
Test: CFI_EXCLUDE_PATHS = frameworks/av m -j40
Change-Id: I02fe1960a822c124fd101ab5419aa81e2dd51adf
The Java PATH fixup is now handled within soong_ui, along with the
values of ANDROID_JAVA_HOME based on OVERRIDE_ANDROID_JAVA_HOME /
EXPERIMENTAL_USE_OPENJDK9.
Mark PATH as deprecated, so that any reads/writes will cause warnings.
This will be switched to obsolete once it's verified that there are no
more users.
Using PATH within Kati means that we've got to rebuild the ninja files
whenever your PATH changes, which is not ideal, especially since some of
the envsetup functions can change your PATH. In most cases you only need
to use PATH within the bash portions of the build rules ($${PATH}), which
isn't treated as a make variable, so won't produce an error.
I'm also planning on replacing PATH in a future change with our own
directory that has placeholders for everything in your PATH. This will
let us remove tools that shouldn't be used from the build.
Test: m nothing
Test: build/soong/build_test.bash on AOSP and internal master
Change-Id: I18d8d19cfba313ff9176345bf73ac34e8dbebfbb
Bug: 64661857
Bug: 68755013
Test: confirmed that ART default properties were stored in
/system/etc/prop.default on sailfish device
Change-Id: Ie07d3049de5ac395cfb9105e208fe7825080fa15
Adapt the gcno packaging logic from shared_library_internal.mk for the
case of executable binaries so that gcov artifacts are properly
packaged.
Test: lunch walleye_coverage-userdebug && make -j60
Bug: 67998360
Change-Id: I4994fc21521c91d4c18bdf326be079beda1914a4
Instead of building R8 from external/r8 use the prebuild jar in
prebuilds/r8.
Test: m -j USE_R8=true
Change-Id: I9680ae430cdbc2b3beb910873c8eed27354f6af1