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
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
We can only create static host binaries for Linux, so if static host
binaries are requested, turn off Windows cross-builds.
Test: m zipalign BUILD_HOST_static=1
Change-Id: Ib37508d4b502cd56dad535cb6eab648f625486c6
Bug: http://b/33678192
Clang has been updated past the revision mentioned in the work around.
So this is no longer necessary.
Test: Build
Change-Id: I08f8e75936bbc3527abc86ba4ce0f2c10382d332
BUILD_NUMBER_FROM_FILE and BUILD_DATETIME_FROM_FILE may need to
be referenced before main.mk has been parsed, move them to config.mk.
Bug: 68865363
Test: m -j TARGET_PRODUCT=full TARGET_BUILD_APPS=Gallery
aapt dump xmltree out/target/product/generic/obj/APPS/Gallery_intermediates/package.apk AndroidManifest.xml | grep Version
Change-Id: I9361a394469e61fcdf5a2b9509ef2bb2b373d6e7
This easily allow products to add custom adb keys for debuggable builds.
To use, provide a public key created by `adb keygen` to
PRODUCT_ADB_KEYS.
This way automated test farms don't need manual intervention to
authenticate to the device over adb, but we don't disable security for
everyone else.
Add an inherit-product-if-exists hook to aosp_* targets so that our
build servers can add a key for our test farms.
Bug: 32891559
Test: lunch aosp_marlin-userdebug; m bootimage
Test: lunch aosp_marlin-user; m bootimage
Change-Id: I1720644d89ec5289fbe99f95ebcdfbb3f3b20e67
This way it shows up when using the old copy of lunch, which hides
stdout.
Test: source old_envsetup; lunch aosp_marlin-eng
Change-Id: I4bccf37fe69c0d7affb5805d05a2750e5d9a3da4
PRODUCT_SYSTEM_DEFAULT_PROPERTIES will be used to define system default
properties which should be installed in system partition.
Bug: 64661857
Test: confirmed that ART default properties are stored in
/system/etc/prop.default when they were defined in
PRODUCT_SYSTEM_DEFAULT_PROPERTIES.
Change-Id: Ia08c25d0c5805381c6e3fe63dd1d171e8d195b90