Commit Graph

42523 Commits

Author SHA1 Message Date
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 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 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 7b905a3f10 Merge "Fix bootDexJarByModule with UNSAFE_DISABLE_HIDDENAPI_FLAGS" into sc-dev 2021-06-22 16:05:09 +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
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
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
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 f23512fa58 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
Merged-In: I7a4adc67164a46079eb8ec0a17fc755044b4949d
Change-Id: I7a4adc67164a46079eb8ec0a17fc755044b4949d
(cherry picked from commit e245b61aa212e70acf0afc71aac03f8412ec5f9d)
2021-06-18 21:02:10 +01:00
Paul Duffin 9dc8c54fc4 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.
Merged-In: Ia063b513f758e1bbe73407c0441b72453f412acf
Change-Id: Ia063b513f758e1bbe73407c0441b72453f412acf
(cherry picked from commit 155c17779c5e5937fa987b81df6697fc3c23607e)
2021-06-18 21:02:10 +01:00
Nikita Ioffe cd3654f9fe Set default value of generate_hashtree property to true
Test: presubmit
Test: m
Bug: 190621617
Change-Id: I546730f168632c5d5d41c686853bde93a8ba7911
Merged-In: I546730f168632c5d5d41c686853bde93a8ba7911
(cherry picked from commit e261ae64e2d72f6b7fab29f513ba00ca50e2ba24)
2021-06-18 15:06:06 +01:00
Paul Duffin b508405e08 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.
Merged-In: I1d4d9545172d79282918130df6b9aa55471bffc1
Change-Id: I1d4d9545172d79282918130df6b9aa55471bffc1
(cherry picked from commit 5466a3699c550d1fa67066db48951b765156be4f)
2021-06-18 12:11:17 +01:00
Paul Duffin a0089ec78c 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.
Merged-In: I35b37355170546daf6ecac2134d1ca9a73d0e3bc
Change-Id: I35b37355170546daf6ecac2134d1ca9a73d0e3bc
(cherry picked from commit ce918b0278628afe4de73b09f73bac777d545b7e)
2021-06-18 12:11:17 +01:00
Paul Duffin 4fd7dc7de0 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.
Merged-In: If9eae254045bef9a0c0963213721fc12a9f463cb
Change-Id: If9eae254045bef9a0c0963213721fc12a9f463cb
(cherry picked from commit 7f8721618cbdcd169694d980cd598d0b80ef9629)
2021-06-18 12:11:17 +01:00
Paul Duffin e11254793d 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
Merged-In: Iba1a881c8f6b6919d5c0c0520eb3073658f3b8d2
Change-Id: Iba1a881c8f6b6919d5c0c0520eb3073658f3b8d2
(cherry picked from commit c8ead41ba9426a31c8ca3d7228991a45ccff6299)
2021-06-18 12:11:17 +01:00
Paul Duffin 360f8359f3 Cleanup bootclasspathFragmentInitContentsFromImage
Removes some unnecessary logic left over from previous changes.

Bug: 177892522
Test: m nothing
Merged-In: Id11e2ea8a647283af1b152b33757132e44dcd6c3
Change-Id: Id11e2ea8a647283af1b152b33757132e44dcd6c3
(cherry picked from commit 58e7586b3d8fffa63b869c421a36c69fdd30a264)
2021-06-18 12:11:17 +01:00
Paul Duffin c75bbcecdb Combine hidden API encoding with flag generation
Previously, the rules to perform hidden API encoding were generated
separately to the rules to perform hidden API flag generation. This
change combines them within the (renamed) produceHiddenAPIOutput()
method and makes the paths to the encoded dex files an output of the
generateHiddenAPIBuildActions method alongside the paths to the
generated flag files.

As encoded dex jars are now an output of the produceHiddenAPIOutput()
method which is implemented for both prebuilts and source
bootclasspath_fragment modules that necessitated the prebuilt also
providing paths to encoded dex files. That in turn required updates to
some of the tests to provide dex files from prebuilt_apex modules.

Similarly, as the produceHiddenAPIOutput() method may not be called
for some bootclasspath_fragment modules as they do not yet provide all
the information needed to perform hidden API encoding then it is
necessary to extract the encoded dex files produced by the modules
themselves. That also required a few changes to tests that did not
previously provide dex files.

Bug: 177892522
Test: m com.android.art
      - check that this change does not change the contents of the apex
        file, i.e. is byte-for-byte identical.
Merged-In: I60996a34d06ed1c87ed244ab3509621999ad86ec
Change-Id: I60996a34d06ed1c87ed244ab3509621999ad86ec
(cherry picked from commit e521881bd45de0306bc2e80d5c746ae361d6ffe2)
2021-06-18 12:11:17 +01:00
Paul Duffin fd53e21098 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.
Merged-In: I05ecf652535ec097125fb76d6ca80fee6587f98d
Change-Id: I05ecf652535ec097125fb76d6ca80fee6587f98d
(cherry picked from commit 85fa344d09ef79a1449a524ecd605ea2333e7cad)
2021-06-18 12:11:17 +01:00
Paul Duffin c30aea20a0 Make apex variants of prebuilt apex exported modules available in make
Previously, the apex variants of modules exported from prebuilt_apex
and apex_set modules were not exported to make. Neither by the modules
themselves or by the prebuilt apex module. The master-art build relied
on the platform variants of the conscrypt and core-icu4j libraries
being exported to make so that they could be used by vogar.

Unfortunately, a change to export the prebuilt_bootclasspath_fragment
modules that contain the conscrypt and core-icu4j prebuilt libraries
from the corresponding prebuilt_apex prevented the platform variants
of those libraries from being exported at all which broke the
master-art builds as it only has prebuilts of those modules. It did not
break the aosp/master build as that has source modules.

The difference between the two builds is that the apex module type
makes its contents available in make but the prebuilt_apex/apex_set
module types do not.

This change causes the prebuilt_apex/apex_set module types to behave
more like the apex module type by making its exported libraries
available in make.

Bug: 179354495
Test: m droid
      - in aosp/master
      art/tools/buildbot-build.sh --target --installclean
      - in master-art and aosp/master
Merged-In: I57537d17d4920d37d896ed491c6aaa15302cb25d
Change-Id: I57537d17d4920d37d896ed491c6aaa15302cb25d
(cherry picked from commit a35f8db1271a924b6c0c1d0ee8fd46a36aa1bcd9)
2021-06-18 12:10:32 +01:00
Paul Duffin 5ec165d755 Create APEX variant for prebuilt_apex/apex_set
Previously, the prebuilt_apex/apex_set did not have an apex specific
variant created which meant that they depended upon the platform
variant of the modules it depended upon. This change creates an
apex variant for them just as is done for the apex module type which
causes it to depend upon the apex specific variant of the modules it
depends upon.

Test: m droid
Bug: 179354495
Merged-In: I7d6f3609c267b3e90b90b9befe7d76f351a0c2bd
Change-Id: I7d6f3609c267b3e90b90b9befe7d76f351a0c2bd
(cherry picked from commit 6717d88f465a96537cf0c3e74c1d060d6a739752)
2021-06-18 12:02:43 +01:00
Pirama Arumuga Nainar 95a4bedc68 Merge changes from topic "libbinder.stable.abi" into sc-dev
* changes:
  [cc/pgo] Mark pgo.sampling property as an arch-variant
  Disable TestCcLibraryBp2Build in sc-dev
  Mark more fields in BaseLinkerProperties as arch variant
2021-06-17 22:49:35 +00:00
Pirama Arumuga Nainar 19a5aae35e [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
2021-06-16 22:01:41 -07:00
Pirama Arumuga Nainar 12066c6542 Disable TestCcLibraryBp2Build in sc-dev
Bug: http://b/191166471
Bug: http://b/189438896

This test fails in sc-dev with aosp/1737314.  It passes in AOSP and
internal main branch with this change though.

Test: cherry-pick aosp/1737314 and `m nothing`
Change-Id: I4837300b42e2d62a77c698eb04b2f161f693747a
Merged-In: I47e7afeaee3c9124f4231bf0eece7b6844b5313d
2021-06-16 22:01:31 -07:00
Paul Duffin b1cba21529 Merge "Avoid passing around []hiddenAPIModule" into sc-dev 2021-06-16 13:25:27 +00:00
Paul Duffin a49f6b9138 Merge "Dedup apex/Prebuilt and apex/ApexSet" into sc-dev 2021-06-16 12:38:37 +00:00
Paul Duffin ef6b69558a Dedup apex/Prebuilt and apex/ApexSet
Moves common properties, fields and method into the prebuiltCommon
type.

One slight change is that this change causes the Prebuilt module to use
the outputApex when generating the AndroidMkEntries instead of the
inputApex that it used before. They are the exact same files as the
inputApex is simply copied to the outputApex. The only impact will be
on build time as some rules now depend on the cp rule being run when
they did not before and the base name of the file may be different.

Test: m droid
      - check generated out/soong/Android...mk file before and after
        to make sure the only difference is due to switching from the
	inputApex to outputApex.
Bug: 179354495
Change-Id: I8437af00d6bb7d0d339f25b3b02cd1cf67d6938a
Merged-In: I8437af00d6bb7d0d339f25b3b02cd1cf67d6938a
2021-06-16 11:56:14 +00:00
Paul Duffin 98ea0d4926 Avoid passing around []hiddenAPIModule
Previously, an []android.Module was converted to an []hiddenAPIModule
that was then used to retrieve boot dex jars. That was ok when
obtaining the dex jar files from source modules for
bootclasspath_fragment but does not work well for other use cases as
it would require doing that conversion in multiple places.

This change pushes the use of hiddenAPIModule down to the methods that
retrieve information from it which makes the methods more flexible and
easier to reuse.

Bug: 177892522
Test: m nothing
Change-Id: Ib84aaf03d8f5a63b48232036fe4589646fc23352
Merged-In: Ib84aaf03d8f5a63b48232036fe4589646fc23352
(cherry picked from commit dd5993f6d41efa932c06afef71c40af446c85b4e)
2021-06-16 11:07:58 +01:00
Paul Duffin 973c907708 Improve error reporting when a rule cannot be found
Outputs the list of available rules on separate lines.

Bug: 179354495
Test: m nothing
Merged-In: I845064e032f0a47d00883ff775c4f7b4fee7631e
Change-Id: I845064e032f0a47d00883ff775c4f7b4fee7631e
(cherry picked from commit 4dbf6cfbaec8b6ce7c6638cd455da89879d61d40)
2021-06-16 10:03:21 +00:00
Paul Duffin 3e2db5c10b Make copyBootJarsToPredefinedLocations simpler and less fragile
Previously, copyBootJarsToPredefinedLocations relied on all its
parameters having the same length and the same order. That made it
quite fragile as changes to one of the parameters without corresponding
changes to the other would cause failures. It also combined the
retrieval of the boot dex jars from the modules, handling of missing
boot dex jar files and the generation of the rules to copy the files.

This change separates the retrieval of boot dex jars and handling of
missing files from the copying of those files while at the same time
making the function less fragile by replacing the three ordered
parameters with two maps that shared common keys.

Bug: 179354495
Test: m nothing
Merged-In: Idbcd24a7e8af89f7895a20aeddc58502dcbaad03
Change-Id: Idbcd24a7e8af89f7895a20aeddc58502dcbaad03
(cherry picked from commit 5f148ca7cf2e9a9478922577b7ed70b1caacb55e)
2021-06-16 03:06:35 +01:00
Paul Duffin 8c666a3665 Ensure primary boot image files are created before they are used
Previously, when building a framework boot image variant it added an
implicit dependency onto the first file in the primary boot image
variant to ensure that the primary boot image variant files that the
dex2oat command needs have been created. That works when generating
from source as in that case all the files for a boot image variant are
created by a single command. However, it does not work for prebuilts as
each prebuilt file will be copied into the required location by
separate copy commands.

This change adds all the files that the dex2oat command uses implicitly
when building an extension boot image as implicit dependencies.

Bug: 177892522
Test: m SOONG_CONFIG_art_module_source_build=false droid
      - the previous command only works in combination with a number of
        other build changes.
Merged-In: I183748fd17f8f3003890675b8c6bb9fcab331443
Change-Id: I183748fd17f8f3003890675b8c6bb9fcab331443
(cherry picked from commit bff50e2b803ede32c9b17b6b7bf3054424703bf5)
2021-06-16 03:06:35 +01:00
Paul Duffin bfeb714333 Make bootclasspath_fragment_sdk_test.go tests more realistic
In the input test fixture this makes sure that every
bootclasspath_fragment is part of an apex and every content module for
the fragment is listed in the appropriate boot jars config property. It
also adds a platform_bootclasspath fragment that references the
fragment.

In the snapshot test fixtures this adds a prebuilt_apex that exports
the fragment so that the platform_bootclasspath has access to the dex
implementation files.

Bug: 177892522
Test: m nothing
Merged-In: I6c73651a359052858232b06229b4433799dd94db
Change-Id: I6c73651a359052858232b06229b4433799dd94db
(cherry picked from commit 7c47515c7f573bdfeafb9b04f240383d1dea1731)
2021-06-16 03:06:34 +01:00
Paul Duffin 0c70a7a0b0 Make TestPlatformBootclasspath_Fragments more realistic
Move the bootclasspath_fragment to be part of an apex to match how they
are expected to be used. Also adds the bar library to the boot jars
config as every module in a bootclasspath_fragment that is referenced
from a platform_bootclasspath module is expected to be in the config.

Bug: 179354495
Test: m nothing
Merged-In: I6f826dce9c006d630ee31d4171fe6fb458cc9442
Change-Id: I6f826dce9c006d630ee31d4171fe6fb458cc9442
(cherry picked from commit dc3f9566a2ab5f23f2e9f0fd7e22820d4e3c53b5)
2021-06-16 03:06:34 +01:00
Paul Duffin 5991ba5119 Move TestPlatformBootclasspath_Fragments to apex package
This test checks that fragments which are referenced from a
platform_bootclasspath module contribute their hidden API flags to those
used by platform_bootclasspath module. Previously, it was unrealistic
because the bootclasspath_fragment does not belong in an APEX.

This change moves the test from the java package to the apex package to
allow it to be modified to make the bootclasspath_fragment part of an
apex.

Bug: 179354495
Test: m nothing
Merged-In: Icb57f2e1eaea4b14aab5f47f3af7d05ea0555816
Change-Id: Icb57f2e1eaea4b14aab5f47f3af7d05ea0555816
(cherry picked from commit ffa8375f072bab79666eb1e0f313ec1689dcc92b)
2021-06-16 03:06:34 +01:00
Paul Duffin c45a86a65d Export hidden api related types and fields
This will export some hidden api related types and fields so they can
be used from outside the java package. This is needed to allow a follow
up change to move the TestPlatformBootclasspath_Fragments from the java
to the apex package.

Bug: 179354495
Test: m nothing
Merged-In: Ib69eea9d79cc83b8e3fc29919a29f071e1ec17b5
Change-Id: Ib69eea9d79cc83b8e3fc29919a29f071e1ec17b5
(cherry picked from commit 524c82c01acbd1f45a401d3444354cd69dd342e3)
2021-06-16 03:06:33 +01:00
Paul Duffin 2aae98f029 Maintain header order in merge_csv
Previously, if the --header property was not specified then merge_csv
would use a header constructed by sorting all the fields in the input
files. That required that any use of merge_csv which did not already
have headers in the required order would have to explicitly specify the
headers. That made it harder to use merge_csv as a generic tool as each
invocation needed to be aware of what headers were exported in the
output.

This change causes merge_csv to simply use the headers in the order in
which they are encountered in the input files. That removes the need to
specify the --header option when generating the index files.

Bug: 179354495
Test: m out/soong/hiddenapi/hiddenapi-index.csv out/soong/hiddenapi/hiddenapi-unsupported.csv
      - make sure that they are not changed by this change.
Merged-In: I420b7d07aea85af6372cd7580a8be5e2cc82a513
Change-Id: I420b7d07aea85af6372cd7580a8be5e2cc82a513
(cherry picked from commit 84c1cdf31f8f888ee9c0beb201d35ad9d293c341)
2021-06-16 03:06:33 +01:00
Pirama Arumuga Nainar 28bc9698ef Mark more fields in BaseLinkerProperties as arch variant
Bug: http://b/189438896

This allows setting a different version script for vendor and
platform variants.

Test: The following blueprint snippet builds:
      target: { android_arm64: {
        target: vendor: {
            version_script: "..." } } }
(cherry picked from commit 250c5217a264fb3bd53f02339d0b382d70da3fee)
Change-Id: Id0df2e89f87fb2b19e71d529cf00727e6b80b1c7
Merged-In: I47e7afeaee3c9124f4231bf0eece7b6844b5313d
2021-06-15 14:28:26 -07:00
Jeff Sharkey 930610f64b Merge "Revert "Hacky workaround for half-finalized builds."" into sc-dev 2021-06-15 03:51:41 +00:00
Jeff Sharkey 46d18dbd7a Revert "Hacky workaround for half-finalized builds."
This reverts commit 05597c0cc4.

Bug: 171506470
Test: Build
Change-Id: Id45b2eec2c9c1ba1a33ba35232229004d67c026c
2021-06-13 18:15:26 -06:00
Colin Cross fb618c387a Always propagate some environment variables to RBE
Always propagate LANG, LC_MESSAGES and PYTHONDONTWRITEBYTECODE
to RBE to get more consistent behavior between local actions and
RBE.

Bug: 182415460
Bug: 190593001
Test: treehugger
Change-Id: I726e6f02fd3ef77e158baf6fde77ffb7247a1375
Merged-In: I726e6f02fd3ef77e158baf6fde77ffb7247a1375
2021-06-11 12:54:36 +01:00
Nikita Ioffe dce0713739 Merge "Rename test_only_no_hashtree to generate_hashtree" into sc-dev 2021-06-10 16:11:38 +00:00
Anton Hansson e7db515506 Merge changes from topic "met-html" into sc-dev
* changes:
  Remove sourcepath argument from metalava invocations
  Stop filtering html files from droidstubs input
2021-06-10 12:22:17 +00:00
TreeHugger Robot f524f1f957 Merge "Add exemption for framework-sdkextensions-classpaths boot jar." into sc-dev 2021-06-10 10:40:52 +00:00
Nikita Ioffe da6dc31389 Rename test_only_no_hashtree to generate_hashtree
In order not to introduce any changes in the system image default value
of generate_hashtree is currently set to false. Once all the APEXes that
shouldn't have hashtree enable (i.e. non-updatable ones) explicitly set
`generate_hashtree: false` default value will be switched to true.

Test: checked that are no diffs between ${OUT}/system/apex without this
  change and with this change.
Test: m
Bug: 190621617
Change-Id: I5a3144f8f6ea7dee25678af43e2b07a8c85daa9e
2021-06-09 19:43:46 +01:00