Commit Graph

43189 Commits

Author SHA1 Message Date
Pirama Arumuga Nainar 088205a050 Switch to clang-r416183b1
Bug: http://b/189328402

This contains a fix to AArch64 __clear_cache.

Test: TH + Manual verification by emulator team.
Change-Id: Iff1064df8361163a6828b01256d5a7950f618652
Merged-In: Iff1064df8361163a6828b01256d5a7950f618652
(cherry picked from commit 3e54508a3a83eef2c8265192e232196a6572b31f)
2021-06-24 16:18:26 -07:00
Liz Kammer b12c1404cd Make prebuilt properties customizable
Previously whether prebuilt properties were customizable was dependent
on the order of calling various inits.

Test: go test soong tests
Bug: 191975220
Change-Id: Icaa1fe811a5f5fc4aa5fc9fa0ec0b90debe3d537
Merged-In: Icaa1fe811a5f5fc4aa5fc9fa0ec0b90debe3d537
(cherry picked from commit 69d6413dd0a0dad94335a4b0c8e9eef5c9383b70)
2021-06-24 22:07:54 +00:00
Jeongik Cha ec9c82da9f Expose imageLocationsOnDevice as well as imageLocationsOnHost
Bug: 158843648
Test: check if dexpreopt.config for the module defined in mk file has
DexPreoptImageLocationsOnDevice field

Change-Id: Idb2de398871ff114245393a9dd92b5a1b5c942e7
Merged-In: Idb2de398871ff114245393a9dd92b5a1b5c942e7
(cherry picked from commit e3165c8de302839c8ab15f53d8024b585c62061f)
2021-06-24 13:14:29 +00:00
Paul Duffin 2f7ccd56a8 Ensure consistent APEX variation for java_sdk_library and java_sdk_library_import
Previously, a java_sdk_library with shared_library = true would create
a variation per APEX because it depends on an sdkLibraryXml module
which generates a file containing the APEX name. However, a shared
java_sdk_library_import would create a merged APEX variation. The
inconsistent variations caused failures in sdkDepsReplaceMutator.

This change ensures that both java_sdk_library and
java_sdk_library_import create an APEX specific variation when their
shared_library property is true.

Bug: 190499958
Test: m nothing
      - ran the above command after modifying the test to reproduce the
        problem and then after fixing to verify that it fixed the problem.
Change-Id: Iee81776a8569db3e871c40cbde14d248dfeb56e4
2021-06-24 13:38:05 +01:00
Android Build Coastguard Worker 7a0ea6bafc Snap for 7487213 from f38428bf58 to sc-d2-release
Change-Id: Ie1c4386d8214263292fa6726c1b6e44c5055d109
2021-06-24 01:01:21 +00:00
TreeHugger Robot f38428bf58 Merge "Propagated srcs from cc_defaults to cc_prebuilt_library_shared." into sc-dev am: ffc9ae993a
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15084348

Change-Id: I9f9e775062e086fa36d6b441e12c2de25f51bea1
2021-06-24 00:33:47 +00:00
TreeHugger Robot ffc9ae993a Merge "Propagated srcs from cc_defaults to cc_prebuilt_library_shared." into sc-dev 2021-06-24 00:18:56 +00:00
Evgenii Stepanov c2adacc92f Disable ubsan diagnostics under HWASan. am: e57ca4ccc3
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15083917

Change-Id: I89863cb162a583c1988855c3dfdea2744ca12a9a
2021-06-23 23:48:28 +00:00
Yu-Chi Cheng 24b2b0fd0c Propagated srcs from cc_defaults to cc_prebuilt_library_shared.
Bug: 191185522
Test: verified on local P21 devices.
Change-Id: I3bab7144213934f6832000793ee6cbc49abd3beb
2021-06-23 15:56:39 -07:00
Evgenii Stepanov e57ca4ccc3 Disable ubsan diagnostics under HWASan.
This is a workaround for a compiler bug that makes this combination
extremely slow to build.

Bug: 191808836
Test: m net_test_btm_iso with SANITIZE_TARGET=hwaddress
Merged-In: Ide7436bbc564413cb2f29355ada5286976607205
Change-Id: Ide7436bbc564413cb2f29355ada5286976607205
(cherry picked from commit b15a564869dada75d78f72489fc50138cd314764)
2021-06-23 15:06:00 -07:00
Paul Duffin 10546275df Remove duplicate component from sdk snapshot am: a1aa7387f7
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15080378

Change-Id: I97343a5fbee03efaf36323d9366215adea2c5e3a
2021-06-23 20:32:52 +00:00
Paul Duffin a488b230fb Add commonSdkLibraryAndImportModule interface am: 3accbb5446
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15080377

Change-Id: Ia9f820fa754184e2bb8feabfb5298fa7f3592643
2021-06-23 18:59:49 +00:00
Paul Duffin a1aa7387f7 Remove duplicate component from sdk snapshot
Previously, an sdk snapshot could contain the following:
* A java_sdk_library_import module, e.g. "foo" which creates component
  modules "foo.stubs", etc.
* A corresponding versioned module, e.g. "sdk_foo@current" which
  created component modules "sdk_foo@current.stubs", etc.
* An internal (to the sdk snapshot) java_import for one of "foo"'s
  components, e.g. "sdk_foo.stubs"
* A corresponding versioned module, e.g. "sdk_foo.stubs@current".

That causes a few problems:
1. The "foo.stubs" is duplicated.
2. The names of the components created by the versioned
   java_sdk_library_import are invalid, as they append the component's
   suffix to the version and not the name before the version.

The latter causes problems when building against prebuilts and fixing
that causes the generated snapshot to be invalid because it contains
duplicate definitions of the "sdk_foo.stubs@current" module. One
explicitly in the Android.bp file and one created by the
"sdk_foo@current" module.

Removing the duplicates from the snapshot causes errors as the name
generated by the snapshot for the component module, i.e.
"sdk_foo.stubs@current" does not match the name generated by the
"sdk_foo@current", i.e. "sdk_foo@current.stubs".

This change fixes them together.

Bug: 179354495
Test: m nothing
Change-Id: I515f235fe21755b5275af12366e96c24c94c0273
2021-06-23 17:46:50 +01:00
Paul Duffin 3accbb5446 Add commonSdkLibraryAndImportModule interface
The commonSdkLibraryAndImportModule defines the methods that a module
which embeds the commonToSdkLibraryAndImport struct need to provide.

Bug: 179354495
Test: m nothing
Merged-In: I7a469ae03ea5c19922200284da08a9ae38a46751
Change-Id: I7a469ae03ea5c19922200284da08a9ae38a46751
(cherry picked from commit 71b33cca9d3a589badc714063e47a28b94df31a1)
2021-06-23 17:46:50 +01:00
Paul Duffin bedbd53288 Add test for sdk that contains overlapping members am: 0e7bb0e80a
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15063349

Change-Id: I0c3d1399e3092f52b79b5329ba9ffce20ef394d2
2021-06-23 09:18:41 +00:00
Paul Duffin 5257d5b67b Remove unused apiModuleName am: 0b5a143c32
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15063348

Change-Id: If5b57f74bb0dbcca7eea23ec824563d0e05c2fd8
2021-06-23 09:18:34 +00:00
Paul Duffin 19bef03853 Fix monolithic hidden API processing with prebuilts am: 2a999332ef
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15063347

Change-Id: I0d71dd747b1305f43cec8fe0ad36f8b6f2b3ea10
2021-06-23 09:18:26 +00:00
Paul Duffin 6c6f1b962a Make CheckHiddenAPIRuleInputs more reusable am: 4c2f78bff4
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15063346

Change-Id: I39917308bdd97c3f367293c7be779e21f6c1c8b1
2021-06-23 09:18:19 +00:00
Paul Duffin 8e8ea06d1e Use classpath elements in platform_bootclasspath am: 3ae9e2cef5
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15063345

Change-Id: I36bd687a4014297a604146c3edc860eab3b22b59
2021-06-23 09:18:11 +00:00
Inseob Kim 8ddb08c8ec Fix ndk and aml arch order
Some codes assume that the first arch is the primary arch. But ndk/aml
arch order have been [arm, arm64, x86, x86_64]. This fixes the order to
workaround possible breakage while building ndk.

Bug: 187196593
Test: OUT_DIR=out build/soong/scripts/build-ndk-prebuilts.sh
Change-Id: I33164a7e7c64a23f2cc1860acb24a2584f4dffad
Merged-In: I33164a7e7c64a23f2cc1860acb24a2584f4dffad
2021-06-23 04:39:24 +00:00
Inseob Kim edca3f4323 Add ramdisk_available to sysprop_library
Bug: 187196593
Test: build
Change-Id: Ib8d92904a9004ccbc18634a97f9d75c2093ac2ae
Merged-In: Ib8d92904a9004ccbc18634a97f9d75c2093ac2ae
2021-06-23 04:39:13 +00:00
Inseob Kim f75c415810 Add install_in_root to cc_binary
To support init_first_stage, install_in_root property is added to
cc_binary. The output is installed to {partition}, rather than
{partition}/{mount_point}/bin.

Bug: 187196593
Test: build init_first_stage
Change-Id: Ibc351645308676ed188f748972eb6312c9cbd64f
Merged-In: Ibc351645308676ed188f748972eb6312c9cbd64f
2021-06-23 04:31:54 +00:00
Android Build Coastguard Worker e0d4908c06 Snap for 7482035 from 51020266da to sc-d2-release
Change-Id: I63dc968d0ef4e4550198687a77ccee084b7e6f50
2021-06-23 01:01:07 +00:00
Paul Duffin 0e7bb0e80a Add test for sdk that contains overlapping members
This change adds a test for an sdk that includes a java_sdk_library
directly as well as transitively includes one of the component modules
that it creates. It also adds a test for the names of a versioned
java_sdk_library_import's components as fixing one requires fixing the
other.

The use case added is one that does occur in the art-module-sdk. It has
a couple of pairs of java_sdk_library and java_system_modules that
cause both the java_sdk_library and one of its component modules to be
included in the sdk snapshot. That causes problems when building
against prebuilts.

e.g. The art-module-sdk_art.module.public.api.stubs module is a
duplicate of the art.module.public.api.stubs module created by the
art.module.public.api java_sdk_library_import. The former is added
because the art-module-public-api-stubs-system-modules depends on it.

A follow up change will avoid the component being added to the sdk
snapshot separately and instead cause the snapshot to use the
component created by the java_sdk_library_import in the snapshot.

Bug: 179354495
Test: m nothing
Merged-In: Ifdc1b4a5a7968db2ded3fdb7eb02f9cff77c7c3f
Change-Id: Ifdc1b4a5a7968db2ded3fdb7eb02f9cff77c7c3f
(cherry picked from commit 3302871b7d64ea1cfd5c56b7ac76f5c74db4e7fa)
2021-06-22 19:16:28 +01:00
Paul Duffin 0b5a143c32 Remove unused apiModuleName
Bug: 179354495
Test: m nothing
Merged-In: Id1dd09a11c63981b32af524cffcdbd177c8f0232
Change-Id: Id1dd09a11c63981b32af524cffcdbd177c8f0232
(cherry picked from commit 86fe8f851414d3e1ac6c19f3d16114fe318c8d10)
2021-06-22 19:16:28 +01:00
Paul Duffin 2a999332ef Fix monolithic hidden API processing with prebuilts
Prebuilt modules do not provide classesJars containing annotations.
Previously, the monolithic hidden API processing just used classesJars
from all the modules that provided them so when building against
prebuilts would have fewer classesJars than when building against
sources and so would produce different hidden API flags.

This change will generate the monolithic files from both classesJars
and files previously generated from hidden API processing. A fragment
that has performed hidden API processing will contribute its generated
files whereas standalone libraries and fragments which have not
performed hidden API processing will contribute classesJars.

Bug: 177892522
Test: m out/soong/hiddenapi/hiddenapi-flags.csv
      m SOONG_CONFIG_art_module_source_build=false out/soong/hiddenapi/hiddenapi-flags.csv
      - verify that the files are identical whether built from
        source or prebuilts.
Merged-In: I06f3c7df49626bec21a452bc9abf1bb9e7545e5c
Change-Id: I06f3c7df49626bec21a452bc9abf1bb9e7545e5c
(cherry picked from commit d061d40eb6ffbc9d7cece2945b7276fe2f6759d1)
2021-06-22 19:16:27 +01:00
Paul Duffin 4c2f78bff4 Make CheckHiddenAPIRuleInputs more reusable
Adds a message parameter and allows leading spaces in the expected file
string to allow them to be nicely indented.

Bug: 177892522
Test: m nothing
Merged-In: I33df26610738c48879fa0b8250dc377dd04bb07d
Change-Id: I33df26610738c48879fa0b8250dc377dd04bb07d
(cherry picked from commit 51d7da2c4e62eccc5f0fe11cfa8cdf1cf67aa7c7)
2021-06-22 19:16:27 +01:00
Paul Duffin 3ae9e2cef5 Use classpath elements in platform_bootclasspath
Use classpath elements in newMonolithicHiddenAPIInfo. That means the
method can collate information from both fragments and libraries rather
than just fragments. So, this change moves the collation of the
classesJars into the method.

Bug: 177892522
Test: m out/soong/hiddenapi/hiddenapi-flags.csv out/soong/hiddenapi/hiddenapi-index.csv
      - make sure that this change does not affect the contents.
Merged-In: I7c2a229fab60d02bd211438735a8d7303ed83386
Change-Id: I7c2a229fab60d02bd211438735a8d7303ed83386
(cherry picked from commit 89f570ac44af4bcf5b78fa8dad3d57f24cd3ca0e)
2021-06-22 19:16:27 +01:00
TreeHugger Robot 51020266da Merge "Fix bootDexJarByModule with UNSAFE_DISABLE_HIDDENAPI_FLAGS" into sc-dev am: 7b905a3f10
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15053545

Change-Id: I884120fe615e61797f16e3df1e16bbf516b9a7df
2021-06-22 16:30:45 +00:00
TreeHugger Robot 7b905a3f10 Merge "Fix bootDexJarByModule with UNSAFE_DISABLE_HIDDENAPI_FLAGS" into sc-dev 2021-06-22 16:05:09 +00:00
Paul Duffin 33854343f4 Simplify deapexer support am: 034196d9fe
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15043820

Change-Id: Ia458296066f43192d2a77b25cbaf1537410f53fc
2021-06-22 10:17:28 +00:00
Adrian Roos c618decdab Fix bootDexJarByModule with UNSAFE_DISABLE_HIDDENAPI_FLAGS
Fixes: 191652687
Test: UNSAFE_DISABLE_HIDDENAPI_FLAGS=true m
Change-Id: I7d85340681e54fbd0da69596b6846eb446c6ec6d
Merged-In: I7d85340681e54fbd0da69596b6846eb446c6ec6d
(cherry picked from commit e95a15e7c791028365f8360ad8915a851f09a3f0)
2021-06-22 12:05:55 +02:00
android-build-team Robot 117c34c592 Snap for 7479185 from 7290b77229 to sc-d2-release
Change-Id: If4715b1649fcfedcf48b92293e7f0a1b9f1f8494
2021-06-22 01:02:25 +00:00
Paul Duffin 7290b77229 Remove javalib special case in createDeapexerModuleIfNeeded am: 7db57e0a77
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15043819

Change-Id: I941a0c7dee7451996df31a16c2f216af9001348e
2021-06-21 12:05:46 +00:00
Paul Duffin 034196d9fe Simplify deapexer support
Uses the apex relative path to the file as the identifier that is used
to obtain the path to the corresponding file extracted from the apex.
That is instead of a special constructed string id.

Bug: 177892522
Test: m nothing
Merged-In: I5dc77c8fb272bac289b8891d1eac801e541af1f5
Change-Id: I5dc77c8fb272bac289b8891d1eac801e541af1f5
(cherry picked from commit b4bbf2ca10cc8509e3ae0ab104e9e3b55861831b)
2021-06-21 10:54:22 +01:00
Paul Duffin 7db57e0a77 Remove javalib special case in createDeapexerModuleIfNeeded
Removes the special case in createDeapexerModuleIfNeeded for handling
java libraries and just get the Import and SdkLibraryImport module
types to implement RequiredFilesFromPrebuiltApex instead.

Bug: 177892522
Test: m nothing
Merged-In: I5cc341b5b4168b8eb196f72273a00d498de6856f
Change-Id: I5cc341b5b4168b8eb196f72273a00d498de6856f
(cherry picked from commit fef5500a766d1f515ff19038e8e0e8f606e07287)
2021-06-21 10:54:22 +01:00
android-build-team Robot c749edc20a Snap for 7476082 from 952cf37aa4 to sc-d2-release
Change-Id: I2caf014e4f2d994fa3df13202cc3f8c72550e399
2021-06-20 23:01:05 +00:00
Paul Duffin 952cf37aa4 Merge "Add ClasspathElement support" into sc-dev am: 062838fcca
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15027225

Change-Id: Iddbe68633b0fbcc732f0629488cbab7bc1ee27ee
2021-06-20 18:29:14 +00:00
Paul Duffin f2e652126c Merge "Extract createEntriesForApexFile" into sc-dev am: 1970d6c5ce
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15027224

Change-Id: I5ea3c0f9f00d4018f41ab7f482298314c67dead4
2021-06-20 18:28:38 +00:00
Paul Duffin 062838fcca Merge "Add ClasspathElement support" into sc-dev 2021-06-20 18:06:03 +00:00
Paul Duffin 1970d6c5ce Merge "Extract createEntriesForApexFile" into sc-dev 2021-06-20 18:05:55 +00:00
android-build-team Robot 276e783275 Snap for 7475038 from ee7c4620dc to sc-d2-release
Change-Id: Ie26c341bf316bd7e92053ca7b8c664d4b6d648c5
2021-06-19 23:00:57 +00:00
android-build-team Robot 7b3675fb8f Snap for 7472272 from 161657b132 to sc-d2-release
Change-Id: I980b6987e7adb0676b1865cf1572984462d99fa2
2021-06-19 01:00:31 +00:00
Nikita Ioffe ee7c4620dc Merge "Set default value of generate_hashtree property to true" into sc-dev am: 5476c95e50
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15027218

Change-Id: I8ae27361d19783af8111e6e06cba07546ca0eeb7
2021-06-19 00:25:35 +00:00
Nikita Ioffe 5476c95e50 Merge "Set default value of generate_hashtree property to true" into sc-dev 2021-06-19 00:12:16 +00:00
Paul Duffin 1b147bfc33 Export boot image files from prebuilt_apex/apex_set am: b508405e08
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15027898

Change-Id: I11e607a2273eae85cfdf9600f8e4b6940648b9ee
2021-06-18 20:12:35 +00:00
Paul Duffin a4e76447e9 Copy boot dex jars from prebuilt art-bootclasspath-fragment if preferred am: a0089ec78c
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15027897

Change-Id: I181fc206673957d70b53ab6c14d9ebc491c76bb8
2021-06-18 20:12:21 +00:00
Paul Duffin 6be215cda7 Exclude jacocoagent from boot jars package check am: 4fd7dc7de0
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15027895

Change-Id: Id406b8cafdccbe69fac4e14127fce6f1d357afe9
2021-06-18 20:12:08 +00:00
Paul Duffin d5a0c20b8b Move boot jars package check into platform_bootclasspath am: e11254793d
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15027894

Change-Id: I8fbd2f3e533a926a07451c6b73a373117df2f06c
2021-06-18 20:12:07 +00:00
Paul Duffin ac924b5d7d Cleanup bootclasspathFragmentInitContentsFromImage am: 360f8359f3
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15027893

Change-Id: Ic9131f97aad43ec537684bf720b71fa66015c318
2021-06-18 20:11:44 +00:00