Commit Graph

37764 Commits

Author SHA1 Message Date
Treehugger Robot
15d73e9a88 Merge "Allow disabling errorprone even when RUN_ERROR_PRONE is true" am: d430ddd0c5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1741654

Change-Id: I8666e08ac5c4cb6f88a245f8f489bbbfbbe4370a
2021-06-18 21:57:45 +00:00
Treehugger Robot
d430ddd0c5 Merge "Allow disabling errorprone even when RUN_ERROR_PRONE is true" 2021-06-18 21:37:39 +00:00
Cole Faust
2b1536e4db Allow disabling errorprone even when RUN_ERROR_PRONE is true
Some modules use -XepDisableAllChecks to disable errorprone.
However, this still causes them to be compiled twice when
RUN_ERROR_PRONE is true. Allow the new enabled property to
be set to false to disable errorprone entirely, so that those
modules are only compiled once.

Bug: 190944875
Test: New unit tests
Change-Id: Ie68695db762fffcaf11bbbcb0509c4fcab73f5c5
2021-06-18 12:34:51 -07:00
Treehugger Robot
f851acaf48 Merge "[cc/pgo] Mark pgo.sampling property as an arch-variant" am: 79c4bdb3fe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1740440

Change-Id: I0074793ac2698a37240e8a54eefcdb979d8c0559
2021-06-18 19:27:59 +00:00
Treehugger Robot
79c4bdb3fe Merge "[cc/pgo] Mark pgo.sampling property as an arch-variant" 2021-06-18 19:09:26 +00:00
Paul Duffin
10a66e1dee Merge "Add ClasspathElement support" am: e6aefedeba
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1738974

Change-Id: I96319f285755414f01b24a65686399452c2797ab
2021-06-18 18:30:56 +00:00
Paul Duffin
e6aefedeba Merge "Add ClasspathElement support" 2021-06-18 18:13:06 +00:00
Pirama Arumuga Nainar
8195cdf8e3 [cc/pgo] Mark pgo.sampling property as an arch-variant
Bug: http://b/189438896

This allows disabling sampling PGO for some arches.

Test: Build this topic.
Change-Id: Ib6ddca6685c2e53092afd440ad95ec42d3a9538b
Merged-In: Ib6ddca6685c2e53092afd440ad95ec42d3a9538b
(cherry picked from commit 19a5aae35e)
2021-06-18 11:11:46 -07:00
Inseob Kim
639a38f615 Merge changes from topic "init_first_stage_soong" am: 957ef7a648
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1738296

Change-Id: I2feb373278e3e2c1cbc56374b899fdfe0e104b53
2021-06-18 17:57:42 +00:00
Inseob Kim
1ecba62ff2 Add ramdisk_available to sysprop_library am: 9da1f81382
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1736434

Change-Id: I4de76d36e9317624d649237ecb2014f4f19b44ae
2021-06-18 17:57:37 +00:00
Inseob Kim
6fa77e896d Add install_in_root to cc_binary am: 800d114003
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1736433

Change-Id: If0fc578582e5cb43077251f37b6887f218708848
2021-06-18 17:57:28 +00:00
Paul Duffin
f86a697730 Merge "Extract createEntriesForApexFile" am: e91f1537e2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1738978

Change-Id: Ide16145fb2292a57917b44377a824fc4c9aa0b89
2021-06-18 17:54:57 +00:00
Inseob Kim
957ef7a648 Merge changes from topic "init_first_stage_soong"
* changes:
  Fix ndk and aml arch order
  Add ramdisk_available to sysprop_library
  Add install_in_root to cc_binary
2021-06-18 17:12:23 +00:00
Paul Duffin
e91f1537e2 Merge "Extract createEntriesForApexFile" 2021-06-18 17:11:29 +00:00
Nikita Ioffe
59b8d28cf6 Merge "Set default value of generate_hashtree property to true" am: f932613c3f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1736785

Change-Id: Ie1f9147e02f79062d1a17dca5f61ff518a2ae5a6
2021-06-18 13:27:46 +00:00
Nikita Ioffe
f932613c3f Merge "Set default value of generate_hashtree property to true" 2021-06-18 13:14:22 +00:00
Paul Duffin
e245b61aa2 Add ClasspathElement support
The configuration of the bootclasspath, e.g. PRODUCT_BOOT_JARS,
includes libraries that are standalone and libraries that are part of
an APEX. All libraries that are part of an APEX must also be part of a
bootclasspath_fragment. Currently, the libraries and fragments are
handled separately but that is limiting as it does not make it easy to
process all the libraries while treating those from fragments
differently to standalone libraries. That is needed for hidden API
processing as it needs to use classesJars from standalone libraries
but pre-generated flag files from fragments.

This change adds support for ClasspathElements which is represents the
classpath as a whole while differentiating between standalone libraries
and fragments.

Bug: 177892522
Test: m nothing
Change-Id: I7a4adc67164a46079eb8ec0a17fc755044b4949d
2021-06-18 11:46:52 +01:00
satayev
6ea9e45d9c Merge "Add classpath fragment property to skip proto generation." am: f45966f35b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1738336

Change-Id: I153af3111b835ce3bbfb56b9d91cf43269285ee4
2021-06-18 10:29:26 +00:00
satayev
f45966f35b Merge "Add classpath fragment property to skip proto generation." 2021-06-18 10:17:50 +00:00
Paul Duffin
c4a3e6d2f3 Export boot image files from prebuilt_apex/apex_set am: 5466a3699c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1736777

Change-Id: I1cf84ff519ca6865d3a87ae75b1f48fc6ed1e3f4
2021-06-18 06:48:21 +00:00
Paul Duffin
56a6834640 Copy boot dex jars from prebuilt art-bootclasspath-fragment if preferred am: ce918b0278
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1736226

Change-Id: I116ef8467e180b691ba6e6f2bcf38cd275f6ecba
2021-06-18 06:47:41 +00:00
Paul Duffin
155c17779c Extract createEntriesForApexFile
While this seems like a simple refactoring it does actually fix an
issue. Previously, when the ExtraEntries func was being defined inline
within the for ... loop it used the loop variable "fi". Unfortunately,
that meant that the func created on each iteration ended up using the
value for "fi" that was set on the last iteration.

Extracting the creation of the entry into a separate method means that
each func created gets its own "fi" variable with the correct values.

Bug: 177892522
Test: m SOONG_CONFIG_art_module_source_build=false nothing
      - without this change it reported duplicate rules for apache-xml.jar
        which is the last entry in the art-bootclasspath-fragment. With
        this change it works fine.
Change-Id: Ia063b513f758e1bbe73407c0441b72453f412acf
2021-06-18 07:43:32 +01:00
Xin Li
ea50a05063 DO NOT MERGE - Mark RQ3A.210410.001 as merged
Bug: 190855093
Merged-In: I33b074204ffba5aa2bf83bbbe350d744ee9d8c57
Change-Id: I50911f727ba98df1035500dbbf467b849be8d6c2
2021-06-17 22:43:25 -07:00
Inseob Kim
5219c0e4bf 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
2021-06-18 05:26:39 +00:00
Inseob Kim
9da1f81382 Add ramdisk_available to sysprop_library
Bug: 187196593
Test: build
Change-Id: Ib8d92904a9004ccbc18634a97f9d75c2093ac2ae
2021-06-18 05:26:33 +00:00
Inseob Kim
800d114003 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
2021-06-18 05:25:44 +00:00
TreeHugger Robot
aee99b3a13 Merge "DO NOT MERGE - Merge ab/7272582" into stage-aosp-master 2021-06-18 00:30:18 +00:00
Paul Duffin
5466a3699c Export boot image files from prebuilt_apex/apex_set
Previously, the prebuilt art-bootclasspath-fragment did not provide any
boot image files. That meant it was impossible to build any module that
requires access to those files from prebuilts, e.g. any module that
needs to be dexpreopt-ed.

This change enables that module to retrieve those files from the
prebuilt_apex.

Bug: 177892522
Bug: 189298093
Test: m nothing
      m droid SOONG_CONFIG_art_module_source_build=false SKIP_BOOT_JARS_CHECK=true
      - the previous command does not work but this change does fix one
        of the issues reported.
Change-Id: I1d4d9545172d79282918130df6b9aa55471bffc1
2021-06-17 23:05:43 +01:00
Paul Duffin
ce918b0278 Copy boot dex jars from prebuilt art-bootclasspath-fragment if preferred
Previously, the boot dex jars were only copied to the predefined
locations used by the build from the source art-bootclasspath-fragment
if it was preferred, otherwise no files were copied. That caused build
failures when attempting to build with ART prebuilts. This change
copies the files from prebuilts too.

Bug: 177892522
Bug: 189298093
Test: m nothing
      m droid SOONG_CONFIG_art_module_source_build=false SKIP_BOOT_JARS_CHECK=true
      - the previous command does not work but this change does fix one
        of the issues reported.
Change-Id: I35b37355170546daf6ecac2134d1ca9a73d0e3bc
2021-06-17 23:05:43 +01:00
Xin Li
007875cd10 DO NOT MERGE - Merge ab/7272582
Bug: 190855093
Merged-In: I0f5da13644fd2ec7b0472fe82918e3c6a72d953c
Change-Id: I33b074204ffba5aa2bf83bbbe350d744ee9d8c57
2021-06-17 21:41:17 +00:00
Paul Duffin
d11c1c8fa4 Merge "Copy implementation and header jars to make when possible" am: 94b2e705d1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1740074

Change-Id: I5faab59bcde87b6be2e1b21ec9e85bdd75a5f687
2021-06-17 20:46:57 +00:00
Paul Duffin
eaae506467 Exclude jacocoagent from boot jars package check am: 7f8721618c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1739993

Change-Id: I83ba8899b202dd89ee613543eead69ab1f88ac4c
2021-06-17 20:37:45 +00:00
Paul Duffin
94b2e705d1 Merge "Copy implementation and header jars to make when possible" 2021-06-17 20:34:49 +00:00
Paul Duffin
85fa344d09 Copy implementation and header jars to make when possible
Fixes test issues caused by a jar containing a classes.dex file was
copied to a place that was expected a jar containing class files.

Bug: 191360201
Test: - in master-art
      find out/ -name \*core-icu4j\* | xargs rm -fr
      art/tools/buildbot-build.sh --target --installclean
      art/tools/bootjars.sh --path --core
      - examine file output from previous script for core-icu4j,
        before this change it contained classes.dex file after this
        change it contained *.class files.
Change-Id: I05ecf652535ec097125fb76d6ca80fee6587f98d
2021-06-17 20:33:54 +01:00
Paul Duffin
7f8721618c Exclude jacocoagent from boot jars package check
This replicates the previous behavior when the boot jars package check
was performed by a singleton. When the singleton was removed and the
check was performed by the platform-bootclasspath the logic to exclude
jacocoagent from the list was lost. This change replaces it.

Bug: 191377804
Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true check-boot-jars
      - fails without this change passes with this change.
Change-Id: If9eae254045bef9a0c0963213721fc12a9f463cb
2021-06-17 19:33:24 +01:00
Paul Duffin
55e9321255 Merge "Move boot jars package check into platform_bootclasspath" am: 4aea00ec18
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1737753

Change-Id: I4d85e0f1abac976520b0127f314566348fbc33ee
2021-06-17 16:23:08 +00:00
Paul Duffin
57f3d6c870 Merge "Cleanup bootclasspathFragmentInitContentsFromImage" am: 909a2fd055
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1737754

Change-Id: Id717912bdc2b89154ab8a2a44d1e15b26010f6ee
2021-06-17 16:22:59 +00:00
Paul Duffin
b9b5bcf0e3 Merge "Combine hidden API encoding with flag generation" am: 975e757232
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1736225

Change-Id: I16158c1f154b52e29482d9b35b87d8828b92b58b
2021-06-17 16:22:10 +00:00
Paul Duffin
4aea00ec18 Merge "Move boot jars package check into platform_bootclasspath" 2021-06-17 16:06:51 +00:00
Paul Duffin
909a2fd055 Merge "Cleanup bootclasspathFragmentInitContentsFromImage" 2021-06-17 16:03:51 +00:00
Paul Duffin
975e757232 Merge "Combine hidden API encoding with flag generation" 2021-06-17 16:03:22 +00:00
satayev
b98371cc13 Add classpath fragment property to skip proto generation.
This must always be true for updatable apexes, but is not necessary
for non-updatable apexes like com.android.i18n.

In a follow up this will be used to figure out whether apex boot jars
should be bundled into platform_bootclasspath.

Bug: 191127295
Test: atest CtsClasspathsTestCases derive_classpath_test
Change-Id: Ib7dc5b057cb24955222fb97f3ff9da079f30ed77
2021-06-17 12:59:33 +01:00
Lukács T. Berki
288dc903aa Merge "Make the IsSdkVariant field and method the same." am: 419117ee89
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1738338

Change-Id: I8a0874b1477059293612333de68459592752a6d3
2021-06-17 11:56:40 +00:00
satayev
46a327565f Merge "Rename ClasspathFragmentToConfiguredJarList methods to configuredJars." am: 68c8dd019c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1738335

Change-Id: I877ff28de478172f66cef3fd5cd44cb5058ff193
2021-06-17 11:55:43 +00:00
Lukács T. Berki
419117ee89 Merge "Make the IsSdkVariant field and method the same." 2021-06-17 11:48:00 +00:00
satayev
68c8dd019c Merge "Rename ClasspathFragmentToConfiguredJarList methods to configuredJars." 2021-06-17 11:43:37 +00:00
Treehugger Robot
2009a3d70d Merge "Use IsEnvTrue for USE_BAZEL_ANALYSIS check." am: 2d16ec5af7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1738873

Change-Id: Ice8ab71e72469b84e8af5b38ae537bd71fe71783
2021-06-17 11:01:12 +00:00
Treehugger Robot
2d16ec5af7 Merge "Use IsEnvTrue for USE_BAZEL_ANALYSIS check." 2021-06-17 10:48:59 +00:00
Paul Duffin
c8ead41ba9 Move boot jars package check into platform_bootclasspath
Bug: 177892522
Bug: 189298093
Test: m check-boot-jars
      m SOONG_CONFIG_art_module_source_build=false check-boot-jars
      - Ran both commands with and without java.lang in the
        package_allowed_list.txt
Change-Id: Iba1a881c8f6b6919d5c0c0520eb3073658f3b8d2
2021-06-17 10:54:27 +01:00
Paul Duffin
58e7586b3d Cleanup bootclasspathFragmentInitContentsFromImage
Removes some unnecessary logic left over from previous changes.

Bug: 177892522
Test: m nothing
Change-Id: Id11e2ea8a647283af1b152b33757132e44dcd6c3
2021-06-17 10:54:27 +01:00