Commit Graph

81513 Commits

Author SHA1 Message Date
Satoshi Niwa
b6d818dbf0 Replace goldmont-without-xsaves build with goldmont-without-sha-xsaves
For chromebooks, we need a new build variant whose target arch is
goldmont, but without SHA and XSAVES support (b/314243939#comment21)

Bug: 314243939
Test: Build an image with TARGET_ARCH_VARIANT:=goldmont-without-sha-xsaves
Change-Id: If73660b515b443d5c138ca367fa3d1c6f18485b5
2024-01-24 16:27:56 +09:00
Spandan Das
0b7089f134 Ensure sscp jars get copied to $OUT/soong/system_server_dexjars
(This was missed in aosp/2876756, which copied only the bcp jars)

This hardcoded location is used by dex2oat to compile the dexpreopt
artifacts. The copy rules are currently generated by java_(sdk)_library
for source builds, and their prebuilt counterparts in prebuilt builds.

After this change, the copy rule will be bifurcated between source and
prebuilt builds
1. For source builds, it will come from java_(sdk)_library
2. For prebuilt builds, it will come from the top-level prebuilt apex.
   Since there can be multiple prebuilt apexes in trunk stable,
   HideFromMake will be used to determine which deapexed jar to copy.

The bifurfaction is expected to be temporary. It is needed for now since
the `apex_contributions` which will be used for source vs prebuilt
selection have not been populated completely.

Test: Added a unit test
Test: Presubmits
Test: git_master-art-host:
art-gtest (https://android-build.corp.google.com/builds/abtd/run/L40800030001459791)
Test: git_main:art_standalone_tests
(https://android-build.corp.google.com/builds/abtd/run/L09000030001463855)

Bug: 308790457

Change-Id: I3105d3b3a7e5c41cb601d07806f4ea483a61b50a
2024-01-24 05:14:40 +00:00
Cole Faust
22e8abcaa6 Make hiddenAPIFlagFileCategory an int
hiddenAPIFlagFileCategory used to contain function pointers, and is
used in a provider. Providers must be serializable for incremental
soong support, so the function pointers must be removed.

Refactor hiddenAPIFlagFileCategory into a simple int.

Bug: 322069292
Test: m nothing --no-skip-soong-tests
Change-Id: I2bd50fa1b59979f30869b405314cbef16ee345f1
2024-01-23 18:01:47 -08:00
Jihoon Kang
91bf3dd4ac Error when WITHOUT_CHECK_API=true in from-text stub build
Given that WITHOUT_CHECK_API=true is incompatible with from-text stub
build, this change makes the module raise an error when the two
conflicting configurations are set.

This change also modifies the checkapi error message, that
DISABLE_STUB_VALIDATION does not bypass checkapi.

Test: m nothing --no-skip-soong-tests && WITHOUT_CHECK_API=true m nothing
Bug: 322060779
Change-Id: I597309baa8fcfbefa05863c7b392bfb8b6774cea
2024-01-24 01:21:47 +00:00
Treehugger Robot
7a6afde325 Merge "Really disable auto-vectorization." into main am: 1e33a311c6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2922685

Change-Id: I192096adfe4a5accaf156bae869e2900a3d5c78b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-23 19:09:18 +00:00
Treehugger Robot
1e33a311c6 Merge "Really disable auto-vectorization." into main 2024-01-23 17:46:58 +00:00
Ronald Braunstein
9a412422cc Merge "Add team property to all modules." into main am: 43f3b601e2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2883106

Change-Id: I4ec4d527ab773373b4b3640e7a03df5f8ca854f9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-23 16:30:03 +00:00
Elliott Hughes
ffbaa4063c Merge "Greatly reduce build warning spam." into main am: 45fd5175ff
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2923136

Change-Id: Ie2681ff051168cc48248c72c5be9937ac84ab18b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-23 16:29:50 +00:00
Ronald Braunstein
43f3b601e2 Merge "Add team property to all modules." into main 2024-01-23 16:00:58 +00:00
Elliott Hughes
45fd5175ff Merge "Greatly reduce build warning spam." into main 2024-01-23 15:43:10 +00:00
Yi-Yo Chiang
88960aa827 cc: Vendor modules should NOT derive its "SDK" level from VNDK
Although vendor modules can be built bundled, they are technially not
part of the "platform", as it cannot access platform libraries (system
partition) directly.
They can only link to a restricted set of platform libraries (LLNDK),
and access restricted set of APIs.
We used to derive the LLNDK API level from the VNDK version. However
after VNDK deprecation, there is no "VNDK version" anymore.
Instead we would just derive the value from platform SDK version:
* If building an in-development build, build vendor modules against the
  in-development "current" API level.
* If building a REL / Final build, vendor should target the latest
  stable API.

Bug: 320423828
Test: go test
Test: presubmit
Test: build and boot
Change-Id: I2c5ef6530e9046b2dcc282bc1f020d8a505eab15
2024-01-23 12:43:38 +08:00
Elliott Hughes
2ced4b5c66 Greatly reduce build warning spam.
No-one ever fixes unused-* or deprecated-* warnings in external/ (nor should they!).

-Wno-deprecated-enum-enum-conversion should probably have been added
next to -Wno-deprecated-anon-enum-enum-conversion when it was added,
since it's a major spam contributor, and equally unlikely that anyone
will clean them up.

-Wno-deprecated-dynamic-exception-spec is a weird special case because
it should be irrelevant after our next libc++ update, but in the
meantime -- because libc++ is used everywhere -- this is a massive spam
contributor that no-one on Android cares about because we don't use
exceptions (and the people seeing this can't fix libc++ anyway).

Test: local clean builds
Change-Id: I098202337e9e5026c4c5215dbf5a2abf1fbbdca8
2024-01-22 18:34:10 -08:00
Jihoon Kang
802f2238fb Merge "Rename apiScope.stubsTag" into main am: fbe572b064
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2921389

Change-Id: I65f5e4979d9d5e0d82b70972095b5b8df59be2a3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-23 01:58:15 +00:00
Jihoon Kang
fbe572b064 Merge "Rename apiScope.stubsTag" into main 2024-01-23 01:43:55 +00:00
Treehugger Robot
89d094c17e Merge "rustc-1.74.1 Build 11331546" into main am: 7f55a63222
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2920666

Change-Id: I3d3f023b5d712dc7cd57477bd53174f363cfec5b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-23 01:35:56 +00:00
Treehugger Robot
7f55a63222 Merge "rustc-1.74.1 Build 11331546" into main 2024-01-23 00:58:11 +00:00
Jihoon Kang
ee11328709 Prepare to generate "runtime" stubs in droidstubs
In order to prepare generating "runtime" stubs in droidstubs, this
change performs some cleanups, which are:

- Modify droidstubs providers methods to take a StubsType enum as an
  input, in order to remove exportable-specific providers. The methods
  are also modifed to return an error when the artifact is not provided
  for the input StubsType.

- Wrap droidstubs artifact to a struct. This removes artifacts common to
  all stubs types from being written out as a individual module property
  (e.g. exportableAnnotationsZip -> exportableArtifacts.annotationsZip)

Test: m nothing --no-skip-soong-tests
Bug: 319162970
Change-Id: I6d6c57c5417ca71eab5ddda7981b71fd84fa6ee1
2024-01-23 00:29:25 +00:00
LaMont Jones
b242ed2eee Merge "Add VisitDirectDepsIgnoreBlueprint" into main am: d19b214fa1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2920271

Change-Id: Ib2b5f317648a76b4f31e832c6c584435998d40a1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-22 23:06:42 +00:00
Elliott Hughes
6c93f6953f Really disable auto-vectorization.
The previous patch was insufficient. Craig Topper explains:

  -fno-vectorize only disables the loop vectorizer

  -fno-slp-vectorize only disables the SLP vectorizer

  The backend can also use vector instructions for memcpy/memset or
  combining multiple scalar loads and/or stores. That is independent
  of -fno-vectorize.

  -mllvm -vector-bits-min=0 will disable any use of fixed vectors. And
  will make attribute(vector_size) get scalarized.

  -mno-implicit-float will disable both vectorizers and
  prevent the backend for using vectors for memcpy/memset
  oor multiple scalar loads/stores. It will not affect
  attribute(vector_size). -mno-implicit-float also prevents scalar
  floating point instructions from being used for anything that didn’t
  use float/double/_Float16/etc. type in source, but I don’t think that
  happens on RISC-V today. 32-bit X86 can use a 64-bit x87 FP load as an
  atomic load for uint64_t, for example. Basically -mno-implicit-float
  is supposed to prevent the compiler from using FP or vectors when the
  source doesn’t explicitly use FP or vectors.

So -mno-implicit-float was what we were actually looking for here. I've
done a clean build with this change, and see only the expected
(hand-written assembler) vector code in bionic, and the ART
ClassLinker::LoadClass() issue is gone too. As far as I can tell, the
remaining vector code is all deliberate in that sense.

We may still end up back here again, to change "gcv" to "gc", but that
still requires some code changes just to build, and still makes it less
obvious that this is just a temporary workaround for a qemu bug
(specifically https://gitlab.com/qemu-project/qemu/-/issues/1976).

Bug: http://b/320416684
Test: objdump
Change-Id: Ibd104e4289d6d1aaf441efa0440fedc90e3da29a
2024-01-22 15:00:21 -08:00
LaMont Jones
d19b214fa1 Merge "Add VisitDirectDepsIgnoreBlueprint" into main 2024-01-22 22:21:42 +00:00
Jihoon Kang
b743155a26 Rename apiScope.stubsTag
The different roles of stubs (e.g. dependency to java modules,
hiddenapi, dist to sdk snapshot) are now split to different set of stubs
(everything, exportable and eventually runtime), while a single set of
stubs are responsible for all roles for the prebuilt stubs. Thus, the
stubs from source are depending different stubs tag (e.g.
everythingStubsTag, exportableStubsTag), while the prebuilt stubs
utilize stubsTag. Given that this tag is only used for the prebuilt
stubs, it can be renamed to `stubsTag`.

Test: m nothing --no-skip-soong-tests
Bug: 319162970
Change-Id: Iacdf434fab6a403482fd2f1de24e6f260ad80756
2024-01-22 19:40:08 +00:00
Pirama Arumuga Nainar
9bfb9d3685 [riscv64] disable vectorizer during LTO am: 5376892762
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2920412

Change-Id: I63d26768a93c455173b581ef0c98ed1b1870b02f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-20 04:53:11 +00:00
Pirama Arumuga Nainar
5376892762 [riscv64] disable vectorizer during LTO
With LTO, vectorization needs to be disabled separately in the linker flags as well.

Change-Id: I71d813974a9b7a40954d3dab5b1704baed610fd0
2024-01-19 23:02:01 +00:00
Treehugger Robot
d6e390c604 Merge "Don't set CC and CXX when running go build on mac" into main am: ed0e3cd911
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2920306

Change-Id: I4f900118e77506f2f250797fa9e7afaa02b44f4f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-19 22:32:56 +00:00
David Pursell
287d753573 Merge "avb_add_hash_footer: fix rollback_index format" into main am: 1fb7d7d5e5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2920276

Change-Id: If478a780927f65dd54ff77ee9f9100391eb89c98
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-19 22:32:48 +00:00
Treehugger Robot
ed0e3cd911 Merge "Don't set CC and CXX when running go build on mac" into main 2024-01-19 22:20:04 +00:00
David Pursell
1fb7d7d5e5 Merge "avb_add_hash_footer: fix rollback_index format" into main 2024-01-19 21:58:03 +00:00
Aditya Kumar
a3ce209c19 Merge "Pass jump-is-expensive flag both to compiler and linker" into main am: 4ebab14f2e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2919249

Change-Id: Iab8c348a588f36ee167a32e5bf9d70324039a5d0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-19 21:03:54 +00:00
David Pursell
0ebba6132a avb_add_hash_footer: fix rollback_index format
The --rollback_index value is interpreted as base 10 by default; fix the
avb_add_hash_footer rule to print values in base 10 rather than hex.

This doesn't affect any current build targets since all usages have
rollback_index < 10 at the moment so base 10 and hex are identical.

Test: a rollback_index of 12 failed build previously, now succeeds
Change-Id: Ib6cafacca02f8792a0bf3a1e733fc89ee16adebb
2024-01-19 12:55:09 -08:00
LaMont Jones
34314b7d15 Add VisitDirectDepsIgnoreBlueprint
This method allows dependencies on non-Android modules, which it ignores
in strict mode, rather than flagging the dependency as an error.

Bug: none
Test: manual
Change-Id: I9575e46638fa8ffc69c8935b1b65aab37ceab3c3
2024-01-19 20:22:10 +00:00
Aditya Kumar
4ebab14f2e Merge "Pass jump-is-expensive flag both to compiler and linker" into main 2024-01-19 20:18:25 +00:00
Cole Faust
534ca54383 Merge "Remove SymlinkOutputs" into main am: b64c070edf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2918066

Change-Id: I5f8570fd56bbf6947278916e51ea6a4e4337f4ba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-19 19:59:24 +00:00
Cole Faust
b64c070edf Merge "Remove SymlinkOutputs" into main 2024-01-19 19:38:55 +00:00
Colin Cross
84caaef55c Don't set CC and CXX when running go build on mac
Setting CC and CXX to point to our clang prebuilts on mac fails to build with:
_cgo_export.c:3:10: fatal error: 'stdlib.h' file not found

Skip setting CC and CXX on mac to go back to using the host linker.

Change-Id: I9bab4cda961874c381eacc34397cc67f62fd4730
Test: treehugger
2024-01-19 19:32:56 +00:00
AdityaK
431c0b9c8e Pass jump-is-expensive flag both to compiler and linker
Change-Id: I89e30f98188aed4c5076a34f150e80386fc63f48
2024-01-19 07:32:59 -08:00
Paul Duffin
ba810e39c7 Merge "Pretty print SBox manifest files to make them easier to read" into main am: 169cffe526
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2786461

Change-Id: Iae5841a6ada5836945933a71c480bd780526ed5a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-19 10:44:01 +00:00
Paul Duffin
169cffe526 Merge "Pretty print SBox manifest files to make them easier to read" into main 2024-01-19 10:09:11 +00:00
Chris Wailes
c0f587029a rustc-1.74.1 Build 11331546
Bug: https://issuetracker.google.com/issues/310977762
Test: m rust
Change-Id: Ia3a5bcd1c63e09d1fd4e399598d4ab25245b7af4
2024-01-19 01:40:19 -08:00
Paul Duffin
4a3a0a5412 Pretty print SBox manifest files to make them easier to read
When debugging problems with, or just modifying a ninja rule that uses
the SBox it is often necessary to read the manifest file. This change
makes them easier to read by pretty printing them onto multiple lines
with a small but clear indent.

This increased the size of the following file by abot 6% from 66K to
70K bytes:
    out/soong/.intermediates/packages/modules/Wifi/framework/framework-wifi.stubs.source.system/android_common/metalava.sbox.textproto

Test: m out/soong/.intermediates/packages/modules/Wifi/framework/framework-wifi.stubs.source.system/android_common/metalava.sbox.textproto
      less out/soong/.intermediates/packages/modules/Wifi/framework/framework-wifi.stubs.source.system/android_common/metalava.sbox.textproto
Change-Id: Icfadeaad1c6334bd0010128f4437669f35822850
2024-01-19 00:57:16 +00:00
Colin Cross
1daa25e492 Merge "Run soong tests in presubmit with the race detector enabled" into main am: d9e4b24877
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2917907

Change-Id: Idb095dc4998737ea33c58840703583e54052fd89
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-19 00:48:43 +00:00
Colin Cross
45ff0a0d47 Merge changes from topic "soong-tests-presubmit" into main am: 1b1b9a937b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2917906

Change-Id: I94da5023f41dd8509085274bdd026218bc5c75d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-19 00:26:32 +00:00
Colin Cross
23084506c2 Disable TestVariantSingletonModule when go test -short is used am: 74dc598a71
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2913033

Change-Id: Id49d4173e658e2188d4a4f9fdc5b70c3da67f6cb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-19 00:26:29 +00:00
Colin Cross
e2f1b79768 Fix data race in propagateRROEnforcementMutator am: 7e6a9012c0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2913032

Change-Id: I8e425838331f483e4a644a8c7b547a250c4d9114
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-19 00:26:27 +00:00
Colin Cross
e7c93c7e1c Fix data race in finder_test.go am: b828213402
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2913031

Change-Id: Ie055a2bdfb3b4deb3a3599cdc98ac7ecdd5f5213
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-19 00:26:24 +00:00
Colin Cross
85426ee04f Fix data race in dex_bootjars am: 84ed511ceb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2913030

Change-Id: Ie025407c0baf94615c7cbb7a5bcbecabcf4c216e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-19 00:26:21 +00:00
Colin Cross
4e3033e6aa Fix race CommonGlobalCflags when running tests in parallel. am: bcf53701b7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2913029

Change-Id: Ib7e0847e613c642940eef711d40e4b35390cb860
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-19 00:26:18 +00:00
Colin Cross
68ef09a266 Fix data race in snapshot singletons when running parallel tests am: 6c7e8ff86f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2913028

Change-Id: I19bc3dc5b5f2d249450f887b4d3fc57a892efd15
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-19 00:26:15 +00:00
Colin Cross
d9e4b24877 Merge "Run soong tests in presubmit with the race detector enabled" into main 2024-01-19 00:16:02 +00:00
Colin Cross
1b1b9a937b Merge changes from topic "soong-tests-presubmit" into main
* changes:
  Add script to run Soong tests with go tools
  Disable TestVariantSingletonModule when go test -short is used
  Fix data race in propagateRROEnforcementMutator
  Fix data race in finder_test.go
  Fix data race in dex_bootjars
  Fix race CommonGlobalCflags when running tests in parallel.
  Fix data race in snapshot singletons when running parallel tests
2024-01-18 23:58:45 +00:00
Treehugger Robot
293f434f62 Merge "Skip strict updatability linting on more apexes" into main am: 4509f502e5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2918065

Change-Id: Icc50d812b3e0f8e00e025e7339f4cdf94a426d57
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-18 22:34:16 +00:00