Commit graph

1517 commits

Author SHA1 Message Date
Sophie Zheng
8f863178da Merge "API coverage Copy generated API list during building cc_library to cc_apis/" 2021-08-25 21:42:44 +00:00
sophiez
c2ae0e5bbb API coverage
Copy generated API list during building cc_library to cc_apis/

Test: build/soong/soong_ui.bash --make-mode SKIP_ABI_CHECKS=true TARGET_PRODUCT=aosp_cf_x86_phone TARGET_BUILD_VARIANT=userdebug droid dist DIST_DIR=/usr/local/google/home/sophiez/my_dist_dir EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true CLANG_COVERAGE=true SKIP_BOOT_JARS_CHECK=true

Change-Id: I05e6b7b9c9bbbab72718fd926ddda468bde05565
2021-08-17 14:59:36 -07:00
Spandan Das
fddb39414a Merge "Remove MODULE_BUILD_FROM_SOURCE=true for coverage builds" am: 9c1806331d am: 91a0bf995c
Original change: https://android-review.googlesource.com/c/platform/build/+/1788549

Change-Id: I2029ac5a55b5a24770b5974ab1087e5cd15b71d7
2021-08-10 23:11:04 +00:00
Spandan Das
9c1806331d Merge "Remove MODULE_BUILD_FROM_SOURCE=true for coverage builds" 2021-08-10 22:35:42 +00:00
Alexander Smundak
0db8f12015 Merge changes I0ecafa41,Ic6173a96 am: 420a93155a am: 9edaddf6ad
Original change: https://android-review.googlesource.com/c/platform/build/+/1786890

Change-Id: Ie26afa42c3db28fed546b2c51a58b3d696e55c14
2021-08-06 02:30:02 +00:00
Spandan Das
289fb6cad0 Remove MODULE_BUILD_FROM_SOURCE=true for coverage builds
This flag will be selectively added to build targets if necessary

Bug: 193569756
Test: m nothing
Change-Id: Ie0fd898b03aa91322dddd9137b038031d46c8d24
2021-08-06 02:25:04 +00:00
Sasha Smundak
8d97bf5327 Integrate Starlark-based configuration runner
If RBC_PRODUCT_CONFIG variable is set, obtain product configuration
variables by converting product configuration makefiles to Starlark
files and then executing them.
Also, introduce RBC_NO_PRODUCT_GRAPH variable to suppress product graph
generation. We cannot generate product graph with Starlark, so this
option allows to verify that the rest of the contents of the generated
Ninja files remains the same when Starlark-based converter is used.
This allows to perform the regression testing, i.e. running
`RBC_NO_PRODUCT_GRAPH=t DISABLE_ARTIFACT_PATH_REQUIREMENTS=t m nothing`
and
`RBC_PRODUCT_CONFIG=t m nothing`
should generate identical *.ninja files.

Bug: 181797530
Test: Manual
Change-Id: Ic6173a9640f32766b71c02a2b1833ce7a278e4cc
2021-08-04 17:15:16 -07:00
Mathew Inwood
ab6e72bd00 Merge "Fix typo." am: 0361b625f2 am: c84ab4d0e8
Original change: https://android-review.googlesource.com/c/platform/build/+/1784570

Change-Id: I6d6792534e7e514d68816b524187cbb005c0a7a0
2021-08-03 10:09:57 +00:00
Mathew Inwood
0361b625f2 Merge "Fix typo." 2021-08-03 09:27:41 +00:00
Bowgo Tsai
5c2a544516 Merge "Adding vendor_boot-test-harness.img" am: 23ae3dcbe1 am: 82a45ea4a0
Original change: https://android-review.googlesource.com/c/platform/build/+/1782047

Change-Id: I377125c9184bf2947c4f592f9395efb66864a85e
2021-08-03 06:34:25 +00:00
Bowgo Tsai
23ae3dcbe1 Merge "Adding vendor_boot-test-harness.img" 2021-08-03 06:07:13 +00:00
Mathew Inwood
87c4655f07 Fix typo.
Test: m

Change-Id: I6a85ea59bb6d6babd6979de22a944e8751ea287f
2021-08-02 15:00:10 +01:00
Mathew Inwood
945184174c Don't use mainline prebuilts for coverage builds.
Test: TH
Bug: 192556458
Bug: 159241638
Merged-In: Id29e273c1df1fa27a038ebdcff1a17acca58bd46
Change-Id: Id29e273c1df1fa27a038ebdcff1a17acca58bd46
2021-08-02 13:25:03 +01:00
Alexander Smundak
ba28f07d46 Merge changes I129136e8,I278bd8ed,I1d22ed6f am: 510c0014d5 am: bd4362926e
Original change: https://android-review.googlesource.com/c/platform/build/+/1781014

Change-Id: I96d9919f4b65a548b57d2bc8eee38d2fd02baa73
2021-07-30 02:35:20 +00:00
Bowgo Tsai
87f60017b9 Adding vendor_boot-test-harness.img
boot-test-harness.img is used to allow adb root on user build
images. It also sets properties: ro.audio.silent=1 & ro.test_harness=1.

GKI 2.0 devices will use BOARD_PREBUILT_BOOTIMAGE so
boot-test-harness.img will not be generated.

Therefore, we have to introduce the vendor_boot-test-harness.img
as an alternative for boot-test-harness.img.

In the future, we'll simplify the flow as:
  + If a device has a /vendor_boot partition, builds
    vendor_boot-(test-harness|debug).img.
  + Otherwise, builds boot-(test-harness|debug).img.

boot-(test-harness|debug).img needs to be kept for some clients
to gracefully transit to using vendor_boot-(test-harness|debug).img.

Bug: 194654549
Test: make then `unpack_bootimg --boot_img $OUT/vendor_boot-test-harness.img`
Test: Check the ramdisk content in ./out/vendor_ramdisk

Change-Id: If3a1393b4ff3e69bb9b62f3b843b7858437d47bf
2021-07-30 00:54:47 +00:00
Sasha Smundak
0e4a5ad24b Trim spaces in the rule actions
When rule action contains something like
  cp $(FOO) ...
and FOO is set with
FOO := a \
 b \

the generated Ninja file constains extra spaces, making it
difficult to compare it to the same file generated by the
Starlark-based product configuration.

Bug: 181797530
Test: manual
Change-Id: I278bd8edf0f017a31c5b5115b2a38f4f663c55fc
2021-07-29 10:57:06 -07:00
TreeHugger Robot
18eac2c301 Merge "Don't use mainline prebuilts for coverage builds." into sc-dev am: d932280147
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/15358466

Change-Id: If8a86300a70199380b8bf2885eeac909480e743d
2021-07-22 17:21:47 +00:00
Mathew Inwood
31167aeaf4 Don't use mainline prebuilts for coverage builds.
Test: TH
Bug: 192556458
Bug: 159241638
Change-Id: Id29e273c1df1fa27a038ebdcff1a17acca58bd46
2021-07-22 12:10:57 +01:00
Treehugger Robot
d622e08647 Merge "dexpreopt.config should be created even though unbundled image is built" am: e01cfe4896 am: 10b90baa51
Original change: https://android-review.googlesource.com/c/platform/build/+/1730113

Change-Id: I54f082381d01c57d5fed3be25fdf764ff58431ce
2021-07-15 09:28:41 +00:00
Jeongik Cha
b26bf58e12 dexpreopt.config should be created even though unbundled image is built
Bug: 188179858
Test: compare dexpreopt_config.zip files from
 1. TARGET_BUILD_UNBUNDLED_IMAGE=true m dexpreopt_config_zip
 2. m dexpreopt_config_zip
(note that m clean should run between steps)

Change-Id: I92623b59e4fcac397c7fed3d7ab1070fe5281027
2021-07-14 18:52:01 +09:00
Bill Peckham
87ae77f7ef Merge "Break dependency from droid_targets to blueprint_tools" am: 61de59bc36 am: a897b876e7
Original change: https://android-review.googlesource.com/c/platform/build/+/1754798

Change-Id: I313be134662bf05da0efe835681ca3c32ff6112d
2021-07-07 20:39:51 +00:00
Bill Peckham
cc2961f54a Break dependency from droid_targets to blueprint_tools
But only for a TARGET_BUILD_UNBUNDLED_IMAGE build. Since
the unbundled image build attempts to remove as many
framework sources as possible, we'd like to remove the
sources and dependencies of some blueprint_tools as
well.

Test: m nothing dist
Test: Verify graph is unchanged
Test: m nothing dist TARGET_BUILD_UNBUNDLED_IMAGE=true
Test: Verify that graph no longer includes blueprint_tools
Bug: 192629969
Change-Id: Ibfb52b841379e20855d0a935a13ad047af2fe58d
2021-07-02 13:13:10 -07:00
TreeHugger Robot
ae53a41a1f Merge changes Ie63d08ac,Ia7f8200c into sc-dev am: c66099dcc6
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/15008279

Change-Id: I99e71fbfc149099a7e2bcdd9b71a7281960f5310
2021-06-17 15:18:21 +00:00
TreeHugger Robot
c66099dcc6 Merge changes Ie63d08ac,Ia7f8200c into sc-dev
* changes:
  Fix typo in droidcore-unbundled.
  Introduce droidcore-unbundled target
2021-06-17 15:01:07 +00:00
Bill Peckham
315b98a73a Introduce droidcore-unbundled target
The droidcore-unbundled target replaces the droidcore
target when TARGET_BUILD_UNBUNDLED_IMAGE=true. This
target is similar to droidcore in terms of dependencies,
but it has a smaller set of dist files. The intention is
to use TARGET_BUILD_UNBUNDLED_IMAGE=true with a
VSDK-using vendor build to supply Java dependencies from
prebuilts to avoid building (or needing) Java framework
sources.

Test: build with and without TARGET_BUILD_UNBUNDLED_IMAGE=true
Test: m nothing dist (before patch)
Test: m nothing dist (after patch)
Test: m nothing dist TARGET_BUILD_UNBUNDLED_IMAGE=true (after patch)
Test: examine ninja build graph for previous 3 tests
Bug: 188176942
Bug: 187064252
Change-Id: Ia7f8200c1bb1aaaa57c177d1698a114efe26bec7
(cherry picked from commit 0a30cc41bc)
2021-06-16 19:54:07 +00:00
Bill Peckham
16da01fe20 Introduce droidcore-unbundled target
The droidcore-unbundled target replaces the droidcore
target when TARGET_BUILD_UNBUNDLED_IMAGE=true. This
target is similar to droidcore in terms of dependencies,
but it has a smaller set of dist files. The intention is
to use TARGET_BUILD_UNBUNDLED_IMAGE=true with a
VSDK-using vendor build to supply Java dependencies from
prebuilts to avoid building (or needing) Java framework
sources.

Test: build with and without TARGET_BUILD_UNBUNDLED_IMAGE=true
Test: m nothing dist (before patch)
Test: m nothing dist (after patch)
Test: m nothing dist TARGET_BUILD_UNBUNDLED_IMAGE=true (after patch)
Test: examine ninja build graph for previous 3 tests
Bug: 188176942
Bug: 187064252
Merged-In: Ia7f8200c1bb1aaaa57c177d1698a114efe26bec7
Change-Id: Ia7f8200c1bb1aaaa57c177d1698a114efe26bec7
2021-06-16 09:10:07 -07:00
Kelvin Zhang
9b55885314 Add ro.vendor.build.dont_use_vabc to disable VABC OTA
This prop is owned by OEM, OEM can set this if they want to disable
VABC.

Test: m dist, make sure generated OTA has VABC disabled
Bug: 185400304

Change-Id: Iceb2fb1f399d38a51722352a86ddf68af05fa24e
Merged-In: Iceb2fb1f399d38a51722352a86ddf68af05fa24e
2021-06-14 15:38:37 -07:00
Treehugger Robot
6b0f56a5fc Merge "Add ro.vendor.build.dont_use_vabc to disable VABC OTA" am: c09cda8c6c am: 61a1d6d7a3
Original change: https://android-review.googlesource.com/c/platform/build/+/1734412

Change-Id: I0cdfa2823cc075dce0fe75df2a36c1731ea15155
2021-06-14 19:13:17 +00:00
Kelvin Zhang
10eac08fe1 Add ro.vendor.build.dont_use_vabc to disable VABC OTA
This prop is owned by OEM, OEM can set this if they want to disable
VABC.

Test: m dist, make sure generated OTA has VABC disabled
Bug: 185400304

Change-Id: Iceb2fb1f399d38a51722352a86ddf68af05fa24e
2021-06-14 10:23:14 -04:00
Tianjie Xu
8108eed6d0 Merge "Enable a prop to determine the new figerprint is enabled" am: 5260f435a3 am: d34ac59c5a
Original change: https://android-review.googlesource.com/c/platform/build/+/1716976

Change-Id: I894e32aefa3e83f287a59c5c81fa4e11e7eff140
2021-06-01 05:08:17 +00:00
Tianjie
c3b841a422 Enable a prop to determine the new figerprint is enabled
VTS and some other tests would replace the system images with GSI. To
put the correct fingerprint in the test report, we need to know if the
new fingerprint format is in use. So, add a vendor build prop.

OEMs are reponsible for setting this build prop, or using other ways
to put the correct fingerprint in the test report.

Bug: 188824341
Test: boot the device, check build prop
Change-Id: I6bc7f01903865fc2c256d209debdab68cd9d1bb3
2021-05-26 11:19:45 -07:00
Treehugger Robot
fdca5d9faa Merge "Target for tools to dexpreopt" am: 26bad544c5 am: ee88da65f5 am: 4beb444294
Original change: https://android-review.googlesource.com/c/platform/build/+/1688306

Change-Id: I91c8fd16af6707d159b448668082fed25d215531
2021-05-13 01:27:10 +00:00
Jeongik Cha
2522c36b4c Target for tools to dexpreopt
Bug: 158843648
Test: m droidcore
Change-Id: I580e2b3285cc524234859998a0e4e072ecaef072
2021-05-12 23:28:49 +09:00
Treehugger Robot
c572c6dc7a Merge "Store dexpreopt.config files to dexpreopt_config.zip" am: 6edaa353b1 am: 543f6750c9 am: 0a1e0a5914
Original change: https://android-review.googlesource.com/c/platform/build/+/1666808

Change-Id: Ic836d95701bab97c0f9b579e03724b4a10a80545
2021-04-23 08:10:51 +00:00
Treehugger Robot
6edaa353b1 Merge "Store dexpreopt.config files to dexpreopt_config.zip" 2021-04-23 06:47:57 +00:00
Jeongik Cha
a8056d6cb9 Store dexpreopt.config files to dexpreopt_config.zip
To dexpreopt in post processing, store config files for dexpreopt

Bug: 158843648
Test: m dist and check dexpreopt_config.zip
Change-Id: I5c63a5ffc10023994b14e3a63f50defb9194739f
2021-04-23 01:01:31 +00:00
Treehugger Robot
9c612a36eb Merge "Test changes for build support for test jni_libs" am: f3162034ef am: bcc08a2454 am: ab9ffa8fed
Original change: https://android-review.googlesource.com/c/platform/build/+/1680149

Change-Id: Idda39045f8a58b6abe55b09e2ca934643b4603af
2021-04-20 13:47:58 +00:00
Treehugger Robot
f3162034ef Merge "Test changes for build support for test jni_libs" 2021-04-20 12:26:30 +00:00
Treehugger Robot
e52d2e5dbd Merge "Rename ro.product.enforce_debugfs_restrictions" am: 228ef5f05f am: a74fbc00a0 am: 16a42ccf08
Original change: https://android-review.googlesource.com/c/platform/build/+/1676369

Change-Id: I7df1d7b81485aea822a8fdb5bc7adb78bb73ccc9
2021-04-20 07:29:53 +00:00
Daniel Cardenas
68984aa93a Test changes for build support for test jni_libs
Tested with patches:  aosp/1560314  aosp/1560314/

Bug: 176593487
Test: make tvts aapt
Change-Id: I2a2867726cc39758dfb27a0a12867e20e4af56d7
2021-04-19 20:48:02 -07:00
Hridya Valsaraju
31b2e3e388 Rename ro.product.enforce_debugfs_restrictions
Rename ro.product.enforce_debugfs_restrictions appropriately to
ro.product.debugfs_restrictions.enabled as per the sysprop naming
scheme.

Test: build, boot
Bug: 184381659
Change-Id: I65265098caf6382583aa53811f1b3330e58141c0
2021-04-19 17:41:25 +00:00
Treehugger Robot
aa2f6f2e3f Merge "Add a build flag to turn on debugfs restrictions" am: fb65e89346 am: 3de9fa6182 am: e252975036
Original change: https://android-review.googlesource.com/c/platform/build/+/1663700

Change-Id: I4f14fbcbcf7dbc509a48f1e1b350a7747a59b6c8
2021-04-09 01:30:32 +00:00
Treehugger Robot
fb65e89346 Merge "Add a build flag to turn on debugfs restrictions" 2021-04-09 00:12:02 +00:00
Treehugger Robot
b52b0c027c Merge "Use BOARD_API_LEVEL to define ro.board.api_level" am: 222b4ab071 am: bcadcb4c8f am: cd2621f177
Original change: https://android-review.googlesource.com/c/platform/build/+/1662022

Change-Id: I5e92476f760690139018c7b7bc2d0e3f9f5ee0f9
2021-04-08 02:21:14 +00:00
Hridya Valsaraju
b39ec7084a Add a build flag to turn on debugfs restrictions
Starting with Android R launched devices, debugfs cannot be mounted in
production builds. In order to avoid accidental debugfs dependencies
from creeping in during development with userdebug/eng builds, this
patch introduces a build flag that can be set by vendors to enforce
additional debugfs restrictions for userdebug/eng builds. The same flag
will be used to enable sepolicy neverallow statements to prevent new
permissions added for debugfs access.

Bug: 184381659
Test: make with/without PRODUCT_SET_DEBUGFS_RESTRICTIONS
Change-Id: I9aff974da7ddce9bf1a7ec54153b161527b12062
2021-04-07 16:47:59 -07:00
Justin Yun
07ceaa71c1 Use BOARD_API_LEVEL to define ro.board.api_level
GRF devices must define the API level of which the SoC is first
shipped by setting BOARD_SHIPPING_API_LEVEL. As this is a permanent
value, vendors may not change this value even if they implement new
features under the GRF policy.

BOARD_API_LEVEL can be optionally defined in this case to manually
set the api level of the vendor implementation.
The current api level will be set to `ro.board.api_level` property.

Bug: 176950752
Test: atest --host post_process_props_unittest
Change-Id: Ib126c1a622ded9848650f3f60c0f15005867272d
2021-04-06 16:33:07 +09:00
Treehugger Robot
ea1e272a21 Merge "Adding bootimage_test_harness artifact to droidcore" am: 8a42f673ac am: f1350276c7 am: 41944d9612
Original change: https://android-review.googlesource.com/c/platform/build/+/1659677

Change-Id: I6eaf1fb240693439bfb2cba402c981a97d07080d
2021-04-01 15:49:40 +00:00
Bowgo Tsai
42131496c8 Adding bootimage_test_harness artifact to droidcore
Currently bootimage_test_harness is only built on a few targets
on release branches. However, we might have a last minute build
breakage on release branches as bootimage_test_harness is not
built on dev branches. Moving it to droidcore so we can have more
completed build coverage on pre-submit/post-submit builds.

Bug: 183865297
Test: `make` then check $OUT
Change-Id: I496609401a9444706726256d2f7b45c6bb69ee94
2021-03-31 03:11:14 +00:00
satayev
b90b546567 Merge "Move allowed_deps.txt to packages/modules/common." 2021-03-22 10:48:45 +00:00
Treehugger Robot
a04ff5da40 Merge "Define ro.board.first_api_level property" am: 5dcd959a90 am: ea649248ca am: 98de12b000
Original change: https://android-review.googlesource.com/c/platform/build/+/1640362

Change-Id: I8ae464ad8e29a5f03e03787b9330dad1012e0637
2021-03-19 10:50:38 +00:00
Treehugger Robot
98de12b000 Merge "Define ro.board.first_api_level property" am: 5dcd959a90 am: ea649248ca
Original change: https://android-review.googlesource.com/c/platform/build/+/1640362

Change-Id: I1bddf76775de6c97cb7821783aca6c3fe58d958d
2021-03-19 09:58:46 +00:00
Artur Satayev
398b995d74 Move allowed_deps.txt to packages/modules/common.
Bug: 179234385
Test: run update-apex-allowed-deps.sh locally
Change-Id: I6866e7a80bce03f991f5b99fb5182c91351cc311
Merged-In: I6866e7a80bce03f991f5b99fb5182c91351cc311
2021-03-17 15:49:01 +00:00
Artur Satayev
1cd28cdd03 Move allowed_deps.txt to packages/modules/common.
Bug: 179234385
Test: run update-apex-allowed-deps.sh locally
Change-Id: I6866e7a80bce03f991f5b99fb5182c91351cc311
Merged-In: I6866e7a80bce03f991f5b99fb5182c91351cc311
2021-03-17 15:35:48 +00:00
Justin Yun
f39f080c80 Define ro.board.first_api_level property
When a device define BOARD_SHIPPING_API_LEVEL with an API level, it
sets a vendor property ro.board.first_api_level in vendor/build.prop.
This is for the GRF devices. Non-GRF devices must not define this
property.

Bug: 176950752
Test: getprop ro.board.first_api_level
Change-Id: I6921d7fe6acca3f73a5fd0fbaa3d4f1e9394541b
2021-03-17 15:00:23 +09:00
Artur Satayev
046e713abd Move allowed_deps.txt to packages/modules/common.
Bug: 179234385
Test: run update-apex-allowed-deps.sh locally
Change-Id: I6866e7a80bce03f991f5b99fb5182c91351cc311
Merged-In: I6866e7a80bce03f991f5b99fb5182c91351cc311
(cherry picked from commit 921646a8ff)
2021-03-16 14:31:33 +00:00
Petri Gynther
295486c079 Merge changes Ibac6424f,Ief572e30 am: 345294f459 am: c77e1025bf am: 06175093dd
Original change: https://android-review.googlesource.com/c/platform/build/+/1626721

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I480bc2cf0dce12f52738a933f1b54fa2af9d5040
2021-03-11 21:43:30 +00:00
Treehugger Robot
20ddb0d89a Merge "Workaround for existing packages check failure when the generic product is used with ART prebuilts." am: 40ea7379a8 am: 1837e64d2d am: 15d6b176ad
Original change: https://android-review.googlesource.com/c/platform/build/+/1622507

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7cc28d5315947f744f8a23b0e5619ba77838d4ea
2021-03-10 21:59:07 +00:00
Petri Gynther
1426cab468 Copy vendor_ramdisk[-debug].img to out/dist
Test: make
Change-Id: Ibac6424f600b77d222585c17a91d59fb6985df26
2021-03-10 13:22:29 -08:00
Petri Gynther
d7946d13f0 Add support for building vendor_ramdisk-debug.img
Existing BoardConfig.mk variable:
BOARD_BUILD_VENDOR_RAMDISK_IMAGE := true

generates:
out/target/product/<name>/vendor_ramdisk.img

Extend the above to additionally generate:
out/target/product/<name>/vendor_ramdisk-debug.img

as the two ramdisks should be built together.

Test: make
Change-Id: Ief572e30c9225d0f5569e9ff89096c69accafc7f
2021-03-10 13:22:29 -08:00
Treehugger Robot
40ea7379a8 Merge "Workaround for existing packages check failure when the generic product is used with ART prebuilts." 2021-03-10 19:13:43 +00:00
Colin Cross
dfa1752be7 Merge "Fix kati regen due to build_number.txt" am: 6023b1944d am: 1b74125136 am: e7db5a634b
Original change: https://android-review.googlesource.com/c/platform/build/+/1623659

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I07b6a43a8c62b1978c4441ae87e016f47d2d849d
2021-03-10 02:55:09 +00:00
Martin Stjernholm
e564ec3502 Workaround for existing packages check failure when the generic
product is used with ART prebuilts.

The prebuilt packages in packages/modules/ArtPrebuilt don't get
Android.mk entries in the `generic` product (as opposed to e.g.
`aosp_arm`), so the enforce-product-packages-exist check fails there.

Exclude the ART APEX modules from the check as a workaround. It's also
necessary to remove the check for superfluous allow list entries, since
which modules are actually missing depends on many other variables (see
runtime_libart.mk).

Test: m nothing TARGET_PRODUCT=generic \
      SOONG_CONFIG_art_module_source_build=false
Bug: 172480615
Bug: 182105280
Change-Id: Id67278615f3e7c64c7658bbf1b2aa71ed6b381da
2021-03-09 12:49:06 +00:00
Po Hu
6e64c14ce9 Fix kati regen due to build_number.txt
Do NOT touch build_number.txt if BUILD_NUMBER is explicitly set
but not changed from last build.

Bug: 182221512
Test: BUILD_NUMBER=123 m nothing
Change-Id: Ic88f6e0d2b9767d84e1ec5c826018d1ea08c0fc0
2021-03-09 14:11:05 +08:00
Petri Gynther
7f25d1e721 Merge "Add support for building vendor_ramdisk.img" am: 0ceba881c5 am: 28c619a577 am: e96cd1d3e1
Original change: https://android-review.googlesource.com/c/platform/build/+/1619809

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I30bfd5153b0cd1c92cfa7122224fb0069610aeac
2021-03-06 08:30:39 +00:00
Petri Gynther
828828ba07 Add support for building vendor_ramdisk.img
Allow BoardConfig.mk to set:
BOARD_BUILD_VENDOR_RAMDISK_IMAGE := true

to build:
out/target/product/<name>/vendor_ramdisk.img

This is done to support GKI device kernel development.

Kernel developers build vmlinux + DTB + GKI kernel modules locally
and then use kernel build tools to output:

* vmlinux + ramdisk.img => boot.img
* GKI kernel modules + DTB + vendor_ramdisk.img => vendor_boot.img

In other words, kernel developers use ramdisk.img and vendor_ramdisk.img
as prebuilts for building flashable boot.img and vendor_boot.img
directly from the kernel development environment.

Test: make vendorramdisk with BOARD_BUILD_VENDOR_RAMDISK_IMAGE := true
Test: make vendorramdisk with BOARD_BUILD_VENDOR_RAMDISK_IMAGE omitted
Change-Id: Id67839887b6bf608f4a5f13384c551c12ee9fdbd
2021-03-05 17:45:03 -08:00
Oli Lan
9c8cafe38f Add build task for cts_root.
This adds the configuration necessary to allow the cts_root
test suite to be built.

Bug: 162933947
Test: m cts_root
Merged-In: I4732bf82d3cedc77e30d7fa5eff285d382992853
Change-Id: I4732bf82d3cedc77e30d7fa5eff285d382992853
2021-02-11 10:34:01 +00:00
Oli Lan
434a3b77cf Add build task for cts_root.
This adds the configuration necessary to allow the cts_root
test suite to be built.

Bug: 162933947
Test: m cts_root

Change-Id: I4732bf82d3cedc77e30d7fa5eff285d382992853
2021-02-10 10:10:04 +00:00
Sanket Chinchalkar
0ef588d656 Added CATBox Changes
Test: Tested Locally
Bug: 177692101
Change-Id: I76811dd996618fb80ef30256df4032557c5c6492
2021-01-29 21:41:15 +00:00
Treehugger Robot
c12f1084c0 Merge "Moving $OUT/vendor-ramdisk-debug.cpio.lz4 to intermediate dir" 2021-01-24 14:53:43 +00:00
Treehugger Robot
75c4e3483f Merge "Concat INTERNAL_*IMAGE_FILES into INTERNAL_ALLIMAGES_FILES" 2021-01-21 00:28:02 +00:00
Bowgo Tsai
7ac96037c3 Moving $OUT/vendor-ramdisk-debug.cpio.lz4 to intermediate dir
vendor-ramdisk-debug.cpio.lz4 will be packed into a
vendor_boot-debug.img and usually won't be flashed directly.

Moving it to the intermediate build directory.

Bug: None
Test: make vendorbootimage_debug
Change-Id: I86ea72c7a3484a90286139624408d07ce4bf994c
2021-01-20 22:33:13 +08:00
Treehugger Robot
d041e4babf Merge "Make ro.product.cpu.abilist.* to be fetched dynamically" 2021-01-14 18:34:22 +00:00
Martin Stjernholm
23e4ab2edf Merge "Add check that a module doesn't try to override itself." 2021-01-14 10:36:25 +00:00
Jiyong Park
f66f0ececc Concat INTERNAL_*IMAGE_FILES into INTERNAL_ALLIMAGES_FILES
As we add more partitions, INTERNAL_*IMAGE_FILES variables has grown
and the places where the variables are referenced had to be touched
everytime. This change introduces a new variable
INTERNAL_ALLIMAGES_FILES which concatnates INTERNAL_*IMAGE_FILES, and
replaces the uses of the variables with the new one.

Bug: N/A
Test: m
Change-Id: I62a0f725a0f6999421d04a6261370be9124e62d7
2021-01-14 11:23:12 +09:00
Jiyong Park
4a693b28e6 jacoco-report-classes-all.jar doesn't depend on fake modules
The reason that the jar file depended on modules_to_install was to
collect files from other partitions, not just system. It isn't the
intention to gather fake modules like phony modules and more importantly
their dependencies (LOCAL_REQUIRE_MODULES). This change explicitly
filters out the fake modules to make the intent clearer.

In fact, the jar file depending on fake modules can have a side effect
that overridden modules are installed. It can happen as follows:

PRODUCT_PACKAGES += A B C

LOCAL_MODULE := A
LOCAL_REQUIRED_MODULES := B
include $(BUILD_PHONY_PACKAGE)

LOCAL_MODULE := B
include $(BUILD_XXX)
...

LOCAL_MODULE := C
LOCAL_OVERRIDES_MODULES := B
include $(BUILD_XXX)

modules_to_install is set to

out/target/product/xxx/fake_packages/A-timestamp
out/target/product/xxx/system/.../C

; B is correctly overridden.

But there still is an order-only dependency from A to B which is created
by add-all-target-to-target-required-modules-deps. Unfortunately,
overridden isn't take into account here.

So, if the jacoco jar file depends on modules_to_install, both B and C
are installed. And if the creation of system.img happens later, the two
are included together, which is an error.

A preferred way of fixing this is to amend
add-all-target-to-target-required-modules-deps so that override is take
into account. However, it will likely to require more Make tricks. This
change takes a much easier path; pruning the fake packages from the
dependencies so that its dependencies which might be wrong can't be
installed.

Bug: 175400393
Test: build/soong/soong_ui.bash --make-mode SKIP_ABI_CHECKS=true
SOONG_COLLECT_JAVA_DEPS=true TARGET_PRODUCT=cf_x86_phone
TARGET_BUILD_VARIANT=userdebug
TARGET_USERDATAIMAGE_PARTITION_SIZE=17179869184 droid dist
DIST_DIR=out/dist EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true
CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS="*"
NATIVE_COVERAGE_EXCLUDE_PATHS="art bionic/libc device"
continuous_instrumentation_tests continuous_native_tests device-tests
platform_tests
No com.android.art.apex in system.img

Change-Id: Ie8a917b7c3985c3a4f19372a4430accd84124e83
2021-01-13 22:12:52 +09:00
Bob Badour
7a95820907 Revert^2 "Rough-in license metadata support to make."
Changed shell script to /bin/sh syntax for portability to mac_os etc.

54066744f0

Change-Id: Ibd472fc1bedfdc228a704108f0280b13ab1c9333
2021-01-06 20:52:43 -08:00
Bob Badour
21bd34fe09 Revert^2 "Add variables for notice deps, license kinds etc."
dcfb9c5ef5

Change-Id: I6a60f55ab0e7013061a695cb1b7c5ffde29577dd
2021-01-06 20:46:49 -08:00
Jerome Gaillard
dcfb9c5ef5 Revert "Add variables for notice deps, license kinds etc."
Revert "Export soong license data to make."

Revert "Add ability to declare licenses in soong."

Revert submission 1377717-metalics

Reason for revert: This has broken renderscript_mac target for aosp-master, see b/176909442

Reverted Changes:
I26ac54ca9:Define the standard license_kind rules.
I656486070:Export soong license data to make.
If9d661dfc:Export soong license data to make.
I97943de53:Add ability to declare licenses in soong.
Icaff40171:Rough-in license metadata support to make.
Ib8e538bd0:Add variables for notice deps, license kinds etc.

Change-Id: I1f672e6e8ec48f0141bb4b6cc4eb2efed1eeef6b
2021-01-06 19:00:05 +00:00
Jerome Gaillard
54066744f0 Revert "Rough-in license metadata support to make."
Revert "Export soong license data to make."

Revert "Add ability to declare licenses in soong."

Revert submission 1377717-metalics

Reason for revert: This has broken renderscript_mac target for aosp-master, see b/176909442

Reverted Changes:
I26ac54ca9:Define the standard license_kind rules.
I656486070:Export soong license data to make.
If9d661dfc:Export soong license data to make.
I97943de53:Add ability to declare licenses in soong.
Icaff40171:Rough-in license metadata support to make.
Ib8e538bd0:Add variables for notice deps, license kinds etc.

Change-Id: Iaf2243cba16f6191b022371a14f81ef8194a47d1
2021-01-06 19:00:05 +00:00
Bob Badour
20fc1b3719 Rough-in license metadata support to make.
Change-Id: Icaff40171b94538219a8caa697b182dbdcc8229a
2021-01-05 08:42:48 -08:00
Bob Badour
6421674a39 Add variables for notice deps, license kinds etc.
Change-Id: Ib8e538bd09044a5791083b362d807cd9293833d5
2021-01-05 08:42:48 -08:00
SzuWei Lin
baf5c8114b Make ro.product.cpu.abilist.* to be fetched dynamically
The patch rename the original ro.product.cpu.abilist* to
ro.system.product.cpu.abilist*. The property service will
define ro.product.cpu.abilist* by the intersect ABIs of
ro.{partition}.product.cpu.abilist*.

Bug: 176520383
Test: build aosp_arm64-userdebug and check the system/build.prop
Change-Id: I26e404632b28e9f6abd462920e0084ad2022a763
2020-12-31 16:59:27 +08:00
Martin Stjernholm
3839f03b7d Add check that a module doesn't try to override itself.
If that happens it will be left out entirely.

It would be nice to catch this on the Soong level, but there are
several separate code paths there so this ensures it isn't missed.

Test: `m nothing` with packages/modules/ArtPrebuilt/Android.bp that
  had this mistake
Bug: 172480615
Change-Id: I2d31679b2ca5b57bf14f35703c10093275209890
2020-12-18 17:38:06 +00:00
Anton Hansson
e47d6e4a8c Merge "Add make support for Aml_abis and Ndk_abis options" 2020-12-16 11:38:49 +00:00
Anton Hansson
5e05b8ef31 Add make support for Aml_abis and Ndk_abis options
Add a new TARGET_ARCH_SUITE which, when set to 'mainline_sdk' or 'ndk',
sets `Aml_abis: true` in soong.variables.

This is required to enable removing the custom soong.variables that
are being maintained for the ndk and mainline sdk builds.

Bug: 174315599
Test: TARGET_ARCH_SUITE=mainline-sdk m nothing; inspect soong.variables
      (ditto for ndk)
Change-Id: Ib651a637457310270840d721cdccf50bede3ee58
2020-12-15 12:46:46 +00:00
Treehugger Robot
dec924e081 Merge "Revert^2 "Always turn on compatible property"" 2020-12-15 12:00:10 +00:00
Anton Hansson
fae0f97114 Move artifact path requirement logic to a separate file
main.mk was a bit cluttered/difficult to follow wth all the indents. Put
the logic in a separate file instead.

Test: m nothing
Change-Id: I545bcd117a6bcd33b520ad279be1bab9b2d89393
2020-12-08 21:13:00 +00:00
Anton Hansson
cd8fa36cbb Move rule for certificate_violation_modules.txt
It was in the middle of some other logic in main.mk

Put it in Makefile instead next to the other "information" dist txt
files.

Test: make and diff certificate_violation_modules.txt
Change-Id: I5b73a0f89ccf3de69e7608a0568d2b4b6f37e98c
2020-12-08 21:12:36 +00:00
Petri Gynther
6ff5201ce9 Add installed-files-vendor-ramdisk.txt
Add installed-files-vendor-ramdisk.txt build artifact, so that it is
easy to see what files landed on the vendor ramdisk.

Test: clean build, inspect installed-files-vendor-ramdisk.txt
Change-Id: Ie84d06dc968ad972ab2bfa79db4d1839ba09e09f
2020-11-20 16:59:57 -08:00
Inseob Kim
2e88158571 Revert^2 "Always turn on compatible property"
This reverts commit facfb54ee4.

Reason for revert: Fixed broken targets

Change-Id: Ia713b08cf15fd356494984964a1e61eaa9991266
2020-11-19 09:48:49 +00:00
Inseob Kim
facfb54ee4 Revert "Always turn on compatible property"
This reverts commit 9994e96c7d.

Reason for revert: broken targets on the internal branch

Change-Id: Ic440fb1ca6ae5774a1d51e8fe1f3724426511841
2020-11-18 11:04:17 +00:00
Yifeng Zeng
154ff7ebc8 Copy generated $(PRODUCT_OUT)/module-info.json file to dist when SOONG_COLLECT_JAVA_DEPS flag is set.
Test: build/soong/soong_ui.bash --make-mode SKIP_ABI_CHECKS=true SOONG_COLLECT_JAVA_DEPS=true TARGET_PRODUCT=aosp_cf_x86_phone TARGET_BUILD_VARIANT=userdebug droid dist DIST_DIR=/usr/local/google/home/yifengzeng/temp EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS="*" NATIVE_COVERAGE_EXCLUDE_PATHS="art bionic/libc device"

Bug: 168755196
Change-Id: I2b54d7cd1aaef1068ed5dfe35bfc4a8525b2e968
2020-11-18 03:34:01 +00:00
Inseob Kim
9994e96c7d Always turn on compatible property
It's mandatory for devices launching with Android P or later.
Some makefiles still depend on PRODUCT_COMPATIBLE_PROPERTY, so rather
than aggressively removing all codes, this forces
PRODUCT_COMPATIBLE_PROPERTY to be true.

Bug: 170082975
Test: m
Change-Id: I49dab8d573c21781e6295a8581a5ad2944e165d7
2020-11-17 10:00:40 +00:00
Yo Chiang
544b5568db Merge "Fix missing required dependency caused by circular dependency" 2020-11-11 03:43:56 +00:00
Treehugger Robot
6ca8eef673 Merge "Create a new test zip for hostside unittest" 2020-11-07 04:53:10 +00:00
Dan Shi
705d652767 Create a new test zip for hostside unittest
Bug: 172006742
Test: m
Change-Id: Idb82b508d3c49d19f1a76de4311bc0616e1ffa49
2020-11-06 23:00:11 +00:00
Artur Satayev
a97b43e4bd Revert^2 "Add a check for apex/allowed_deps.txt to droidcore."
67e8be4b9c

Test: presubmit
Change-Id: I5695dd1003386191dbbe0ea511ef5b615d0d5e4e
Merged-In: I5695dd1003386191dbbe0ea511ef5b615d0d5e4e
(cherry picked from commit 0efeca6a25)
2020-11-03 17:49:30 +00:00
Yo Chiang
e73c5a074d Fix missing required dependency caused by circular dependency
Fix a bug where if module A requires module B, and for whatever reason
module A and B have some common installed files, then all required
dependencies of the common files would be lost.

For example:
```
 # A requires B
ALL_MODULES.A.INSTALLED := a
ALL_MODULES.B.INSTALLED := a b
```

Right now the build system wouldn't generate any dependency for `a`.
However the correct behavior should be: `a` has a order-only dependency
on `b`.

Bug: 157444528
Test: Check generated build-*.ninja
Change-Id: Iec60231f6597ec46077393d1defa109b9c07b208
2020-10-29 10:48:17 +00:00
Dan Shi
0b8473591c Merge "Package host shared lib for art-host-tests" 2020-10-22 17:39:58 +00:00
Dan Shi
cb8655c3b9 Package host shared lib for art-host-tests
Bug: 169111770
Test: m art-host-tests
Change-Id: Ic5a9740977cd9a1f6bdfbbfef81116f7a3cf5e8a
2020-10-21 21:28:34 -07:00