Commit graph

8619 commits

Author SHA1 Message Date
Aditya Kumar
d18128fa12 Merge "Add Wno-ambiguous-reversed-operator to get around the operator== lookup issue in clang" into main 2024-02-08 12:17:05 +00:00
AdityaK
839eda517e Add Wno-ambiguous-reversed-operator to get around the operator== lookup issue in clang
Bug: b/323152930
Change-Id: Iee1bc4dd9db9a0fe38d7cf871c34abb638abc092
2024-02-07 20:30:55 -08:00
Elliott Hughes
5897fd6a5e Merge "Remove __STDC_FORMAT_MACROS." into main 2024-02-07 23:50:37 +00:00
Elliott Hughes
1c80585cd6 Remove __STDC_FORMAT_MACROS.
Our mingw doesn't use this. (It does however still use
__STDC_CONSTANT_MACROS and __STDC_LIMIT_MACROS.)

Test: treehugger
Change-Id: I415017093b9ccffd21fd41f17a2f4387839a0f53
2024-02-07 20:45:25 +00:00
Elliott Hughes
ac43c55656 Remove macros that Darwin never used.
Test: treehugger
Change-Id: I4b31c1f40142c0346ac2d2c9e9b831954c4d9468
2024-02-07 18:30:22 +00:00
Ke-Yu Lu
196d9493c4 Merge changes from topic "revert-2925209-KVPWEBRQHT" into main
* changes:
  Revert "Convert AFDO mutators to TransitionMutator"
  Revert "Remove fdoProfileMutator"
2024-02-06 05:46:07 +00:00
Ke-Yu Lu
0be9d6034e Revert "Convert AFDO mutators to TransitionMutator"
Revert submission 2925209

Reason for revert: b/323975183

Reverted changes: /q/submissionid:2925209

Change-Id: Ie907d23081817d601a1a2083347b5f683829a36c
2024-02-06 02:15:03 +00:00
Ke-Yu Lu
351d36490d Revert "Remove fdoProfileMutator"
Revert submission 2925209

Reason for revert: b/323975183

Reverted changes: /q/submissionid:2925209

Change-Id: I33b2e71ba7b36e12e5c491e0ad14a7f7df3edd78
2024-02-06 02:15:03 +00:00
Kiyoung Kim
e5b8b97322 Merge "Reapply "Rename LOCAL_USE_VNDK"" into main 2024-02-06 00:57:21 +00:00
Colin Cross
6c392749d5 Merge changes Ied8fd7b5,Ib0584545 into main
* changes:
  Remove fdoProfileMutator
  Convert AFDO mutators to TransitionMutator
2024-02-05 23:03:49 +00:00
Kiyoung Kim
84b6508604 Reapply "Rename LOCAL_USE_VNDK"
Similar with aosp/2897612, rename LOCAL_USE_VNDK into
LOCAL_IN_VENDOR or LOCAL_IN_PRODUCT to make variable useful from
VNDK deprecation.

Bug: 316829758
Test: AOSP CF build succeeded
Change-Id: If7bead24add014ed9e0e9e1d265b0199b911be89
2024-02-05 10:31:23 +09:00
Aditya Kumar
b2a56627a2 Merge "Revert^2 "Update clang version to clang-r510928"" into main 2024-02-03 12:54:13 +00:00
Treehugger Robot
fe423e39fb Merge "Reduce warning spam from "unused-" flags in //external, //vendor, //hardware" into main 2024-02-03 03:25:58 +00:00
Aditya Kumar
ef7c121a6b Revert^2 "Update clang version to clang-r510928"
22686bab04

Change-Id: I1117546bb71548e1146c6ae43419b6aef772f812
2024-02-02 14:32:47 -08:00
Treehugger Robot
0e5f6e4e9f Merge "Revert "Rename LOCAL_USE_VNDK"" into main 2024-02-02 10:38:49 +00:00
Kiyoung Kim
ed63c02e9b Revert "Rename LOCAL_USE_VNDK"
Revert submission 2931430-local_use_vndk

Reason for revert: build fails with barbet targets

Reverted changes: /q/submissionid:2931430-local_use_vndk

Change-Id: Ic5b850e2905d1b93e8b4d08921106940991587b8
2024-02-02 08:06:52 +00:00
Aditya Kumar
14b5f6e05b Merge "Remove x86 specific flags from bpf target" into main 2024-02-02 06:05:20 +00:00
AdityaK
6cfd07e524 Remove x86 specific flags from bpf target
Test: cd external/bcc/libbpf-tools && mm

Bug: b/308826679

Change-Id: Ibb76832c4013360b6561a6d3676f35adc9ecde5f

Change-Id: Ibb76832c4013360b6561a6d3676f35adc9ecde5f
2024-02-01 20:51:48 -08:00
Hsin-Yi Chen
c9d4eab9fe Merge "Separate LLNDK from the platform library dumps" into main 2024-02-02 04:34:50 +00:00
Treehugger Robot
838b29ebc7 Merge "Rename LOCAL_USE_VNDK" into main 2024-02-02 02:48:35 +00:00
Treehugger Robot
b370adbdcc Merge "Build VNDK with VNDK prebuilts without BOARD_VNDK_VERSION" into main 2024-02-02 01:06:37 +00:00
Kalesh Singh
f4ffe0a026 soong: Add crt_pad_segment to .so's
crt_pad_segment adds a NOTE to the ELF which is used by the binoic
loader to determine whether it should pad segments when mapping them
into the virtual address space, such that there are no gaps between
mappings of consecutive segments. This avoids an increase in
unreclaimable kernel slab memory usage for VMAs on devices where the
runtime-page-size > elf-segment-p_align.

Since -fandroid-pad-segment [1] respects -nostdlib used in android
platform builds, soong must link in crt_pad_segment to platform shared
libraries.

For simplicity, link crt_pad_segment everywhere that crtend_so is
applicable, ignoring nocrt property, as there is no other reason
to track these separately.

Example:

❯ readelf -WS /system/lib64/libc++.so [Output simplified]

...
Section Headers:
  [Nr] Name              Type            Address          Off    Size   ES Flg Lk Inf Al
...
  [ 2] .note.android.pad_segment NOTE            0000000000000288 000288 000018 00   A  0   0  4
...

[1] https://github.com/llvm/llvm-project/pull/77244

Bug: 316403210
Test: readelf -WS <lib>.so
Change-Id: Icc06611376cfd5ee4de7281b4134f9f8ffe7ca60
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
2024-01-31 19:42:31 -08:00
Kiyoung Kim
0fcadd89e2 Build VNDK with VNDK prebuilts without BOARD_VNDK_VERSION
Current VNDK prebuilts are disabled if BOARD_VNDK_VERSION is not set,
but VNDK prebuilts should be enabled even BOARD_VNDK_VERSION is not set
because VNDK APEXes should be available from VNDK deprecation. This
change removes some restrictions on VNDK prebuilts to enable those from
VNDK deprecation.

Bug: 316829758
Test: AOSP Cuttlefish build succeeded without BOARD_VNDK_VERSION
Change-Id: Id780811dab26f2125097c3efc5b2b4a59416b826
2024-02-01 11:20:14 +09:00
Hsin-Yi Chen
50884dce3c Separate LLNDK from the platform library dumps
LLNDK will not be finalized at the same time with NDK and APEX
libraries. The ABI dumps need to be generated and stored separately.
In lsdump_paths.txt, each dump path is tagged with LLNDK, NDK, etc. A
library may have multiple dumps with different tags. The finalization
scripts will read lsdump_paths.txt and select the dumps for LLNDK.

LLNDK versioning for trunk stable has not been implemented. Currently
the dumps for LLNDK, APEX, NDK are identical.

Bug: 314010764
Test: make out/target/product/generic_x86_64/lsdump_paths.txt
Change-Id: Ia8eed555dc176b221e67b3b049dd3db76f9bc658
2024-01-31 11:21:13 +00:00
Pirama Arumuga Nainar
22686bab04 Revert "Update clang version to clang-r510928"
Revert submission 2804373-clang_r510928

Bug: http://b/301328082

Reason for revert: Broke aosp-main/aosp_x86-next-userdebug

Reverted changes: /q/submissionid:2804373-clang_r510928

Change-Id: I6802b329e8dbd9dce5a75aab76c43960765a8594
2024-01-31 06:51:49 +00:00
AdityaK
0790ce2e56 Update clang version to clang-r510928
Bug: b/301328082
Test: N/A
Change-Id: Ied250c42c33d9e2d8bd9b9161b9028874540addb
2024-01-30 15:09:29 -08:00
Prashanth Swaminathan
13b063730a Reduce warning spam from "unused-" flags in //external, //vendor, //hardware
Some clang unused-* warnings are not covered by "-Wno-unused". Add them
explicitly to avoid noise from these warnings, given that they don't
generally get fixed.

Test: Local clean builds.
Change-Id: I13f5089fd68f1a67a11be14fa41807688d803ba3
2024-01-30 20:31:25 +00:00
Hsin-Yi Chen
7acf94b221 Merge "Find LLNDK dumps in prebuilts/abi-dumps/vndk" into main 2024-01-30 09:05:16 +00:00
Kiyoung Kim
1132b8cdaa Rename LOCAL_USE_VNDK
Similar with aosp/2897612, rename LOCAL_USE_VNDK into
LOCAL_IN_VENDOR or LOCAL_IN_PRODUCT to make variable useful from
VNDK deprecation.

Bug: 316829758
Test: AOSP CF build succeeded
Change-Id: I76741e45a2d80000adec6abfd8e9d6ee97c4ea23
2024-01-30 16:52:10 +09:00
Treehugger Robot
a8a5f64222 Merge "Support mechanism to select a specific version of module sdk prebuilt" into main 2024-01-29 19:22:57 +00:00
Colin Cross
04a59937d2 Merge "Convert orderfile mutators to TransitionMutator" into main 2024-01-29 18:57:28 +00:00
Hsin-Yi Chen
704c12d0bb Find LLNDK dumps in prebuilts/abi-dumps/vndk
LLNDK will not be finalized at the same time as APEX and NDK. The
dumps have to be placed in a different directory. The new LLNDK dumps
will be created in "vndk" directory.

Test: lunch aosp_x86_64-next-eng ; make
Bug: 314010764
Change-Id: I0726e3eabcfdbfb94a10f01ddd6dfb971552bd50
2024-01-29 16:15:29 +08:00
Yi-Yo Chiang
c21f548fd4 Merge "cc: Vendor modules should NOT derive its "SDK" level from VNDK" into main 2024-01-29 03:14:22 +00:00
Aditya Kumar
03dcd93ea0 Merge "Disable shrink-wrap optimization for arm32 devices Bug: b/319464283 Bug: b/322359235" into main 2024-01-27 03:47:22 +00:00
Spandan Das
2b6dfb554d Support mechanism to select a specific version of module sdk prebuilt
This CL is scoped to cc_* module types. With trunk stable, we will have
multiple prebuilts of the cc modules in
prebuilts/module_sdk/art/<v>/host-exports/, and this CL introduces a
mechanism to use apex_contributions to select a specific versioned
prebuilt when building.

If a soong module is selected using apex_contributions, all rdeps will
get that soong module, which includes
- rdep soong modules which might be depending on it via Android.bp
- Soong's rule builder HostToolPath API

Implementation details: Create a new source_module_name property to
identify the root module. rdeps referring to the root module will get
redirected if necessary. This property also
becomes the stem, if `stem` is not set explicitly.

Bug: 322175508

Test: Added a unit test

Change-Id: Ic8725602c81999621fcb33ce2a57fe4b9751baa8
2024-01-26 23:32:13 +00:00
AdityaK
c4b7a18ffc Disable shrink-wrap optimization for arm32 devices
Bug: b/319464283
Bug: b/322359235

Change-Id: Ia720f88a8967d00c7fc3ac7d690d4d37123818f1
2024-01-26 21:55:19 +00:00
Colin Cross
5d6c1eee0d Merge "Convert LTO mutators to TransitionMutator" into main 2024-01-26 20:34:30 +00:00
Colin Cross
943aa5c862 Remove fdoProfileMutator
Add the dependency on the fdo_profile module in afdoTransitionMutator
and read the provider in GenerateAndroidBuildActions.

Bug: 319288033
Test: afdo_test.go
Change-Id: Ied8fd7b52d5694a3691652318e87b8fe14dda126
2024-01-26 11:09:25 -08:00
Colin Cross
a6b407fbf5 Convert AFDO mutators to TransitionMutator
Convert afdoDepsMutator and afdoMutator to a TransitionMutator as a
step towards variants-on-demand.

Bug: 319288033
Test: afdo_test.go
Change-Id: Ib05845455ccf43a07b3915a0d7b0a95896062f13
2024-01-26 11:08:32 -08:00
Colin Cross
33e0c81093 Convert orderfile mutators to TransitionMutator
Convert orderfileDepsMutator and orderfileMutator to a TransitionMutator
as a step towards variants-on-demand.

Bug: 319288033
Test: orderfile_test.go

Change-Id: I27df65b7264a5b059a900e7ea04c18dfb2787a84
2024-01-26 11:06:45 -08:00
Colin Cross
6ac83a8f85 Convert LTO mutators to TransitionMutator
Convert ltoDepsMutator and ltoMutator to a TransitionMutator as a
step towards variants-on-demand.

Bug: 319288033
Test: lto_test.go
Change-Id: I2c9af73fd526adf58ff626831ababea466338205
2024-01-26 11:06:45 -08:00
Colin Cross
e28cdf362e Merge "Convert coverageMutator to a TransitionMutator" into main 2024-01-25 23:19:29 +00:00
Treehugger Robot
471e181f92 Merge "Replace goldmont-without-xsaves build with goldmont-without-sha-xsaves" into main 2024-01-25 08:11:40 +00:00
Treehugger Robot
2a7e184383 Merge "Export clang coverage flags" into main 2024-01-25 06:18:23 +00:00
Colin Cross
f5f4ad3db6 Convert coverageMutator to a TransitionMutator
Convert coverageMutator to a TransitionMutator as a step towards
variants-on-demand.

Bug: 319288033
Test: coverage_test.go
Test: treehugger coverage builds
Change-Id: Ic50c0040dea8b42c36b5d784221daa00b7b0d379
2024-01-24 10:17:10 -08:00
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
Treehugger Robot
1e33a311c6 Merge "Really disable auto-vectorization." into main 2024-01-23 17:46:58 +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
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