Commit graph

1098 commits

Author SHA1 Message Date
Dan Willemsen
d7994816c1 Remove package-stats.txt
I can't find any remaining users of this functionality.

Test: codesearch; treehugger
Change-Id: I63b079b381211b743baa293267c992d9b2eadcf9
2019-08-21 12:36:14 -07:00
Hsin-Yi Chen
7205361315 Merge "Add tags to lsdump_paths.txt" 2019-08-15 02:20:30 +00:00
Dan Willemsen
8da52d4b9d Move TOP/TOPDIR to build/make/common/core.mk
So that they're set properly during dumpvars / product loading.

SHELL is already set in common/core.mk, so it's not necessary to be in
core/main.mk as well (which quickly loads core/config.mk, which loads
common/core.mk).

Test: get_build_var TOP
Test: get_build_var TOPDIR
Change-Id: I8179ac32628b74ccf29851dc53bf83cfb4b280fd
2019-08-08 10:58:09 -07:00
Hsin-Yi Chen
5cbf33afe9 Add tags to lsdump_paths.txt
- Update the conversion from LSDUMP_PATHS to lsdump_paths.txt.
  LSDUMP_PATHS is a list of "tag:path". Each element is converted to
  "tag: path\n" in lsdump_paths.txt.

- Update the check for redundant ABI dumps.
  prebuilts/abi-dumps/ndk contains the ABI dumps for NDK.
  prebuilts/abi-dumps/vndk contains those for LLNDK, VNDK-core, VNDK-SP,
  except NDK.

Test: make findlsdumps
Bug: 133176785
Change-Id: I90559e6c68a7f901a318cd8d5125e9a7401ac22c
2019-08-05 11:20:22 +08:00
Dan Willemsen
18ffd5891e Remove import_includes/export_includes
Now that ONE_SHOT_MAKEFILE no longer exists, we don't have to rely on
the filesystem to store this informtion.

This removes ~16.7k files from our build graph
(aosp-master/aosp_arm64-eng), though only about 600 of them were being
used in a normal build.

Test: treehugger
Change-Id: I3ac12f5ea7f11d25064109a0599bc5be1976fba5
2019-08-01 14:56:45 -07:00
Dan Willemsen
8b8b9b6bf8 Merge changes from topic "rm_ONE_SHOT_MAKEFILE"
* changes:
  Remove [jni_]link_type files
  Remove support for ONE_SHOT_MAKEFILE
2019-08-01 21:11:02 +00:00
Dan Willemsen
0df0f6bbf1 Remove [jni_]link_type files
Now that mm/ONE_SHOT_MAKEFILE have been removed, we can expect to know
about all of our dependencies at the end of the build.

This removes 19k nodes from our build graph (aosp-master
aosp_arm64-eng), though in a default build, only 3k of those are used.

Test: ALLOW_MISSING_DEPENDENCIES=true, then trigger a missing dependency
Test: treehugger
Test: create link_type files, then apply CleanSpec.mk, ensure they're removed
Change-Id: I9506331e4a9911d2f26e59a2f72a97aef1644073
2019-07-31 18:09:22 -07:00
Dan Willemsen
5c3fc2a792 Remove support for ONE_SHOT_MAKEFILE
Test: treehugger
Change-Id: Ie73418c186ec4c0e1c91078c133de8f8113295bf
2019-07-31 18:08:47 -07:00
Chen Zhu
95b0913070 Add Mainline Test Suite (MTS).
Test: m mts && mts-tradefed run mts

Bug:123411735
Bug:126277867

Merged-In: Iba6bf89bd4457ed0f5c1eb3351bf5ffd6720441d
Change-Id: I889ace72980619884cb35359b9a18d7b2053fed8
2019-07-31 21:31:10 +00:00
Dan Willemsen
d69e849c9b Merge "Stop supporting wrapping the build with make" 2019-07-30 21:48:52 +00:00
Dan Willemsen
893948955d Stop supporting wrapping the build with make
The build servers are no longer using this. It's hard to search for
others using it -- I've cleaned them up as I've run across them, but
we'll just have to see who breaks once this goes in.

This was the last user of makeparallel, so we can remove it.

Test: make
Test: treehugger
Change-Id: If6df3f1a67d6a6df36afaa4b07cd88a48a364fe1
2019-07-29 22:43:35 -07:00
Dan Willemsen
8a5d597bbf Remove the PRODUCT-* goal
I've switched all the build server configs to using TARGET_PRODUCT /
TARGET_BUILD_VARIANT and explicit goals instead.

Remove tools/check_builds.sh which relied on this, but hasn't been
touched in a long time.

Test: m PRODUCT-test
Test: treehugger
Change-Id: If5f8c714567b33aeb38223c176ca24ea649eb57d
2019-07-29 14:27:04 -07:00
Przemyslaw Szczepaniak
b4befed86f Merge "Move libneuralnetworks.so to com.android.neuralnetworks APEX" 2019-07-24 09:12:18 +00:00
Przemyslaw Szczepaniak
f67c72b34d Move libneuralnetworks.so to com.android.neuralnetworks APEX
Test: build&flashed crosshatch image
Bug: 137320025

Change-Id: Iadbb32cffc636c515a5e89b62539183ebc0c2f14
2019-07-19 16:41:48 +01:00
Martin Stjernholm
1886f53103 Make the error messages from the two APEX_MODULE_LIBS checks easier to tell
apart.

Also make it more clear what the problem may be when the "find" check fails,
to aid troubleshooting.

Test: m
Change-Id: Iacdc4734f20eeaf3fb0d29e418df21f5089cecbc
2019-07-16 17:47:33 +01:00
Dimitry Ivanov
9c7ab5944e Merge "Add NativeBridgeRelativePath config variables" 2019-07-16 09:17:35 +00:00
dimitry
fb2449f7b7 Add NativeBridgeRelativePath config variables
This will allow us to unhardcode relative paths for native-bridge
binaries in soong.

Test: make PRODUCT-cf_x86_phone-userdebug
Change-Id: I72b33ee610c92d41e1370fcaa1512529c5d7c88c
2019-07-12 16:08:00 +02:00
Elliott Hughes
440c99f1f2 Stop building unnecessary tarballs.
Test: treehugger
Change-Id: Iaba2aa6d09ad891f37171cc76778d08c78c78f93
2019-07-12 05:04:12 +00:00
Justin Yun
6151e3f1ea Rename product_services to system_ext
Bug: 134359158
Test: build and check if system_ext.img is created
Change-Id: I67f2e95dd29eac6a28e07e24ea973d3a134c3bfc
2019-07-09 08:57:19 +00:00
Kavi Gupta
7185f8cc2d Modify build to put dumpcoverage agent into /system/lib
This location allows the agent to be attached to arbitrary processes.

It only makes sense to include libdumpcoverage.so on coverage builds,
as these are the only builds that have any information to be dumped.

Test: manual, used examples in README (see other CL) to test whether
it works on a userdebug_coverage build on cuttlefish

Change-Id: Ib2fece1b41a3b5d16c8a2a444c5486137e475fda
2019-06-27 09:28:39 -07:00
Dan Willemsen
b88f792d25 Install shared library dependencies for 64-bit windows
Test: m host_cross_libandroidicu_64; see libs in out/host/windows-x86/lib64
Change-Id: Ibf816aeb96e70b70cfcb9b58df9605c3af87db39
2019-06-25 12:56:41 -07:00
Felix
b56b25157c core/main: Strip bitness before existence check
Strip bitness information for PRODUCT_PACKAGES and
PRODUCT_HOST_PACKAGES before checking against ALL_MODULES.

Also correct spelling: nonexistant -> nonexistent

Bug:
If PRODUCT_ENFORCE_PACKAGES_EXIST was set, the build system would
complain about nonexistent packages for e.g. HALs where the bitness was
specified using a suffix, such as android.hardware.audio@4.0-impl:32

Test:
Add android.hardware.audio@4.0-impl:32 to PRODUCT_PACKAGES, specify
PRODUCT_ENFORCE_PACKAGES_EXIST, ensure no whilelist is set.
"make systemimage vendorimage" -> No error.

Signed-off-by: Felix <google@ix5.org>
Change-Id: Id59460a19320aa9437b8805411a0d97fa6432633
2019-06-03 14:10:33 +02:00
Dan Willemsen
e048f7eff3 Remove BUILD_BROKEN_ENG_DEBUG_TAGS
All users have been removed.

Test: treehugger
Change-Id: I2cfe720bef88cc5485e90746d85a7e0a5d068ef7
Merged-In: I2cfe720bef88cc5485e90746d85a7e0a5d068ef7
2019-05-25 22:47:35 +00:00
Daniel Mentz
bacc040da0 Install radio image as part of droidcore
Previously, the radio image was only installed as part of "make dist".

Change-Id: Id497238930b5a155d1ae30fd7fb2203377c9741d
2019-05-24 17:50:27 +00:00
Dimitry Ivanov
f64b664d6c Merge "Fix typo in APEX_LIBS_ABSENCE_CHECK_EXCLUDE" 2019-05-24 08:26:36 +00:00
dimitry
c193ae4c04 Fix typo in APEX_LIBS_ABSENCE_CHECK_EXCLUDE
arm64 guest libraries are located in lib64/arm64

Bug: http://b/77159578
Test: lunch cf_x86_64_phone-userdebug in internal master; mm -j48 dist
Change-Id: I9f1f9426cbaed0a269126cb242e1a6df9249b167
2019-05-23 16:01:50 +02:00
Sasha Smundak
2748c61659 Remove unused (and currently broken) samplecode target.
Running 'm samplecode' fails with
"build/make/core/main.mk:1834: error: overriding commands for target
`out/target/common/samples/libsimplejni.so', previously defined at
build/make/core/main.mk:1834"
This proves that noone has been using 'samplecode' target at least since
the build started generating both 32- and 64-bit shared libraries by default,
because development/samples/SimpleJNI/jni/Android.mk defines libsimplejni.so
as 'sample', and the deleted code in core/main.mk causes duplicate rule in
such case.

Test: treehugger
Change-Id: I38a4c478fcb0e60793129fe2513a8cdc6d2c79fb
2019-05-22 20:01:49 -07:00
Colin Cross
ab83244472 Bypass LOCAL_*_REQUIRED_MODULES checks for ONE_SHOT_MAKEFILE
When ONE_SHOT_MAKEFILE is set, the targets of LOCAL_*_REQUIRED_MODULES
may not exist, so skip the error message.

Fixes: 131241991
Test: mmm cts/tests/signature/intent-check
Change-Id: I95c4c901610746854179af8486c8c4767dd18864
2019-05-17 23:10:26 +00:00
Martin Stjernholm
ff29b0fa3e Add libc_malloc_{debug,hooks}.so to the absence check.
They should only be in the Runtime APEX, c.f. discussion on
http://r.android.com/957159.

Test: build/soong/build_test.bash through Forrest
Bug: 124293228
Change-Id: I33e97a56e67c3f4734d14f38e0f1597b697a2604
2019-05-14 18:37:40 +01:00
Martin Stjernholm
f26bef86ec Merge "Extend library absence check to Bionic libs and all ART debug libs." 2019-05-09 11:51:37 +00:00
Martin Stjernholm
e115e3cf07 Extend library absence check to Bionic libs and all ART debug libs.
Test: m systemimage
Test: build/soong/build_test.bash
Bug: 124293228
Change-Id: I1a25d8d45668638b7eb0d39ded9cad3ed30db33c
2019-05-09 01:07:56 +01:00
Treehugger Robot
e591ef32a0 Merge "Move ro.boot.dynamic_partitions to vendor/build.prop" 2019-05-08 21:39:26 +00:00
Hridya Valsaraju
1fd498d748 Move ro.boot.dynamic_partitions to vendor/build.prop
Bug: 132197773
Test: property present in vendor/build.prop

Currently, the property resides in product partition which gets
overwritten by the GSI image. Moving it to vendor will ensure
that the property is set even when a GSI image is flashed on the device.

Change-Id: I4d4a3c473194e15ba124a121f89bbb3ec1a73d19
2019-05-08 16:22:06 +00:00
Martin Stjernholm
b0382f0319 Add the library absence check as a kati stage check.
Primarily for use with build_test during presubmit.

Moved the check to main.mk to avoid nonobvious dependency on
product_target_FILES from main.mk to Makefile.

Test: m systemimage
Test: build/soong/build_test.bash
Test: m out/target/product/taimen/system/lib/libdexfile.so; m systemimage;
  check that "find"-based check fails
Test: Add a system library to APEX_MODULE_LIBS; m systemimage;
  check that "product_target_FILES"-based check fails;
  env DISABLE_APEX_LIBS_ABSENCE_CHECK=true m systemimage;
  check that it works
Bug: 124293228
Change-Id: I7a93cc0ac4480404a3d56c75eb43ae499e8a3a05
2019-05-03 13:02:51 +01:00
Yifan Hong
acd862aed3 Add BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT flag.
If set to true,
- super.img is built from images in $PRODUCT_OUT
- super.img is built to $PRODUCT_OUT
- super.img is built when 'make'.

'make dist' still builds super image from images in target files to
intermediates directory.

This flag is useful for virtual devices, but isn't intended to be set for
actual devices. For actual devices, userspace fastboot should flash
super_empty.img and individual user images separately.

Test: on cuttlefish (flag is set),
      make            # generates $OUT/super.img
      make superimage # generates $OUT/super.img
Test: on real non-retrofit DAP device (flag is not set)
      make            # no super.img is generated
      make superimage # generates $OUT/obj/PACKAGING/.../super.img
      make dist       # generates out/dist/super.img

Bug: 113175337

Change-Id: Ieb81e4fbb663bb4b69e9962c3fa9f16b03aeb907
2019-04-25 10:51:35 -07:00
Bowgo Tsai
0013f55ef4 Adding boot-debug.img and ramdisk-debug.img
The two new debugging images adds additional files based on
boot.img and ramdisk.img/ramdisk-recovery.img, respectively.

File /force_debuggable is to trigger special logic in /init to load an
userdebug version of sepolicy and an additional property file from this
ramdisk to allow adb root, if the device is unlocked.

It's intentional to skip signing for boot-debug.img, as it can
only be used if the device is unlocked, where verification error
is allowed.

Those debugging images allows adb root on user build
system.img, vendor.img, product.img, etc. This can facilitate more
automated testings on user builds and is helpful to narrow down the
delta between what's being tested v.s. what's being shipped.

Bug: 126493225
Test: `make dist`, checks both boot-debug.img and ramdisk-debug.img
      are in $OUT/ and out/dist.
Test: `make dist`, checks installed-files-ramdisk-debug.{json,txt} are
       in out/dist.
Test: `system/core/mkbootimg/unpack_bootimg.py --boot_img $OUT/boot-debug.img`,
      checks the extracted out/ramdisk is as expected
Test: Run `gunzip -c ramdisk | cpio -idm` for the ramdisk extracted from
      $OUT/boot-debug.img and $OUT/boot.img, respectively.
      Then compare the root dirs of both, e.g.,
      `diff -rq --no-dereference ./ramdisk ./ramdisk-debug`
Test: `make ramdisk_debug-nodeps` and `make bootimage_debug-nodeps`

Change-Id: I30137c3caef91805d9143d404e5e4d06c0fccc30
2019-04-22 21:50:07 +08:00
David Brazdil
f5b3fc854f Enable core platform API warnings on non-user builds
Core platform API violation reporting is disabled by default and can be
enabled by setting the persist.debug.dalvik.vm.core_platform_api_policy
property. Set it to "just-warn" for non-user builds and leave disabled
on user builds.

Test: builds, boots
Bug: 125701194
Change-Id: I2f4be42373de9fdbc71c3178de6d34e07809f13a
2019-04-15 16:12:59 +01:00
Dan Willemsen
8e96a794ac Split ALL_MODULES.*.REQUIRED and friends between target/host
So that we actually respect different LOCAL_REQUIRED_MODULES for the
host and device versions instead of unioning them. That got particularly
problematic when LOCAL_SHARED_LIBRARIES is implicitly added to
LOCAL_REQUIRED_MODULES. We also used to walk through device-only modules
when filling out the list of required modules, which triggered even more
extra installations.

This also changes the requirements for PRODUCT_HOST_PACKAGES so that it
no longer accepts target-only phony modules (since we can now
differentiate them). They were all removed in previous patches.

Test: treehugger; diff resulting builds
Test: diff list of product_target_FILES and product_host_FILES
Change-Id: I2ed8950320d31f5693323ad8cef6ec5b6780b7d4
2019-04-10 13:22:23 -07:00
Johan Harvyl
7005d4f4cc Remove 'column' from modules target
The standard target modules stopped working when restrictions in
soong were introduced to which binaries are allowed to be used during
builds.

Listing a very large amount of modules in columns does not make it
more readable and harder to work with in tools so just drop it.

Bug: 129800175
Test: make modules
Change-Id: I26040479a03916161fb5d072de1af640d8080c7f
2019-04-03 07:41:43 -07:00
Anton Hansson
8adf501905 Merge "Access PRODUCT_ variables directly" 2019-03-29 16:54:47 +00:00
Anton Hansson
b5cec0d792 Merge "Automate the strip and assignment of PRODUCT_ vars" 2019-03-29 16:54:25 +00:00
Dan Willemsen
672e98fac8 Merge "Stop installing host packages via PRODUCT_PACKAGES" 2019-03-29 03:20:52 +00:00
Anton Hansson
8dab0a6f50 Access PRODUCT_ variables directly
This CL simplifies the PRODUCTS.$(INTERNAL_PRODUCT).X accesses of
product variables, and removes unnecessary stripping of them.

Replace: '\$\(PRODUCTS\.\$\(INTERNAL_PRODUCT\)\.([^\)]*)\)' with '$(\1)'
Replace: '\$\(strip\s*\$\(PRODUCT_([^\)]*)\)\)' with '$(PRODUCT_\1)'

A few minor manual tweaks.

Bug: 116769560
Test: presubmit
Change-Id: I70c54f1582e3cc780028535960147d99ebc2e0e1
2019-03-28 15:54:25 +00:00
Anton Hansson
13ea2a6a7d Automate the strip and assignment of PRODUCT_ vars
With this change, all PRODUCT_ variables are treated the same
when it comes to stripping and assigning them to their final
variable name. In the past, all the PRODUCT variables needed
to be listed in two places to achieve this.

The documentation previously attached to the strip/assignment
is moved to the PRODUCT_ variable list in product.mk.

Also refactor some of the default value logic to cope with
the new automation.

Many places in the build system that currently refer to
$(PRODUCTS.$(INTERNAL_PRODUCT).X) can now be modified to
use $(X) directly.

Bug: 116769560
Test: verified noop on PRODUCT_ variables on all products in the tree
Change-Id: I5677c355e81359b1d3c0db2a2232941097a05047
2019-03-28 15:26:49 +00:00
Anton Hansson
cb8276fa93 Put DEVICE/PRODUCT overlays in different partitions
This change changes auto-generated RROs from DEVICE_PACKAGE_OVERLAYS
to be generated in the vendor partition, as opposed to /product where
they were generated in the past.

Note that PRODUCT_PACKAGE_OVERLAYS continue generating RRO packages
to /product, which means that a single app can be overlayed from
different partitions. These RROs have been given module and package
names based on their location.

Bug: 127758779
Test: verify noop on presubmit targets
Change-Id: I5cee70e28e3969e67b2d83eaf25d9c6e3a11102d
2019-03-22 13:25:20 +00:00
Dan Willemsen
2e79dafed1 Stop installing host packages via PRODUCT_PACKAGES
Test: treehugger
Change-Id: I24ac93f3558116f4ddd96d22ef9bbd47240fdd06
2019-03-20 10:29:42 -07:00
Vic Yang
51512c558c Add support for no-vendor-variant VNDK
When TARGET_VNDK_USE_CORE_VARIANT is set to true, the vendor variant of
VNDK libraries are by default not installed.  Instead, the core variant
will be used by vendor binaries at runtime.

To ensure the core variant of VNDK libraries are installed, we also add
a flag LOCAL_VNDK_DEPEND_ON_CORE_VARIANT to indicate that the vendor
variant module depends on the core variant module.  This flag should be
set by Soong for all VNDK libraries without the vendor variant
installed.  When the flag is set, the vendor variant binary is also
compared against the core variant binary to ensure they are
functionally identical.

As we are merging the two variants for some libraries, we need a new
link type to denote a module is usable as both native:vndk and
native:platform.  We add native:platform_vndk for this.

Bug: 119423884
Test: With the corresponding Soong change, build with
      TARGET_VNDK_USE_CORE_VARIANT set to true.
Test: Add a dummy VNDK library and a dummy vendor binary that depends
      on it.  Build with no-vendor-variant VNDK and check the core
      variant is installed.
Test: Add conditional compilation based on __ANDROID_VNDK__ in the
      dummy VNDK library and check build fails.

Change-Id: I40000f2728e8193212113c1ee950e9d697f2d40d
2019-03-20 10:23:04 -07:00
Anton Hansson
f9b6cd6593 Merge "Fix missing modules check for dont_bother goals" 2019-03-20 10:11:50 +00:00
Treehugger Robot
22b9a4a207 Merge "Generate api.xml for every target build." 2019-03-19 19:18:16 +00:00
Anton Hansson
fa7ddae29b Fix missing modules check for dont_bother goals
Like If1f817d855cbe329b83caee9fdd68c2cce55f02b, but for
PRODUCT_PACKAGES, which is only enabled for a few builds.

Also share the ALLOW_MISSING_DEPENDENCIES check with the host
version.

Test: m product-graph
Change-Id: Iab55072e7d7c0fc9f4680cc515e139a5214dc3b4
2019-03-19 18:20:30 +00:00