Commit Graph

8901 Commits

Author SHA1 Message Date
Priyanka Advani
45d61d8b11 Merge "Revert "Switch host native tests to -Og"" into main 2024-07-15 23:06:52 +00:00
Liana Kazanova
b88279f3b8 Revert "Switch host native tests to -Og"
Revert submission 2695387-host-tests-Og

Reason for revert: Droidmonitor triggered revert due to build breakage in b/353353713. Will be verifying through ABTD before submission.


Reverted changes: /q/submissionid:2695387-host-tests-Og

Change-Id: Ia8c75f9476f52dfce959c424bdf6b483bdf95c9f
2024-07-15 23:04:09 +00:00
Treehugger Robot
9408e95521 Merge "Fix asan build for Macos" into main 2024-07-15 22:24:54 +00:00
Fabien Sanglard
4eea1b8e92 Fix asan build for Macos
Test: Continuous build once aosp/3169208 is merged again
Fixes: 349869396
Fixes: 349870640
Change-Id: I1d000aac10ce9842a1cd1c6d9eda0e02874f4d8a
2024-07-15 13:19:43 -07:00
Yi Kong
b3769fcd23 Merge "Switch host native tests to -Og" into main 2024-07-15 08:11:55 +00:00
Colin Cross
e1a8555581 Add IsAddingDependency to IncomingTransitionContext
Add an IsAddingDependency method to IncomingTransitionContext that
returns true if IncomingTransition is called after the transition
has already won while adding a new dependency.  This will be used
as part of the transition mutators to support an apex use case where
incoming dependencies during the initial apex mutator need to be
rewritten onto the platform variant for modules that don't support
the apex, but a later call to OtherModuleDependencyVariantExists
must not rewrite the requested apex variation onto the platform
variant.

This should be used sparingly, all uses will have to be removed in
order to support creating variants on demand.

Bug: 319288033
Test: TestIsAddingDependency
Flag: EXEMPT refactor
Change-Id: Ib8e419d35ff8f7cbff9667c1cd40d05ccfacab8b
2024-07-11 16:59:34 -07:00
Colin Cross
694fced1e3 Don't mutate non-property module fields
Setting sanitize and stl to nil in a mutator isn't valid, if any other
mutator creates a variant then the factory method will be called again
to create the new variants and will reset sanitize and stl to non-nil.
Add a property to sanitize and check it everywhere that checked for
sanitize != nil, and set the Stl property.

Bug: 319288033
Test: all soong tests pass
Flag: EXEMPT refactor
Change-Id: If99d5fa0f088ee4a73cc7dccdab4268618a6009f
2024-07-11 16:59:33 -07:00
Colin Cross
088123934b Merge "Remove test_per_src" into main 2024-07-11 20:32:23 +00:00
ELIYAZ MOMIN
52a4ae5744 Merge "Revert "Upgrade to clang-r530567"" into main 2024-07-11 12:38:30 +00:00
ELIYAZ MOMIN
9d00ea3e95 Revert "Upgrade to clang-r530567"
This reverts commit b4f05f1a05.

Reason for revert: <Potential culprit for b/352458178  - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.>

Change-Id: Idf6c69296c6537e8011c2ce5fcbdf45a29154acf
2024-07-11 12:35:41 +00:00
Pechetty Sravani
45ca89a4a2 Merge "Revert "Enable -Wfortify-source"" into main 2024-07-11 09:55:12 +00:00
Yabin Cui
295306f5f2 Merge "Upgrade to clang-r530567" into main 2024-07-11 04:01:25 +00:00
Liana Kazanova
852a98fd8c Revert "Enable -Wfortify-source"
This reverts commit cbf426fa50.

Reason for revert: Droidmonitor triggered revert due to build breakage in b/352395522. Will be verifying through ABTD before submission.

Change-Id: I214aa6e2a707ed22aac901db988a33affc37e269
2024-07-10 22:10:08 +00:00
Aditya Kumar
05f3927c09 Merge "Enable -Wfortify-source" into main 2024-07-10 21:07:26 +00:00
Yi Kong
12bebf9567 Switch host native tests to -Og
This helps to reduce build artifact size significantly, by 1.33GB for
`m cts` in the `out` directory on aosp-main. This should also make them
a lot faster to run.

Also turns off unused-result warning. This analysis is not run on -O0,
leaving behind a ton of code that triggers this warning. Since it is not
an important warning for tests anyway, turn it off by default for tests.

Right now, -Og is just an alias for -O1 in Clang. If the debuggability
is affected due to this change, we can identify and disable the relevant
optimization pass in -Og.

Change-Id: I84383cbc05a53d89c322ecb3679320f1338542e6
Bug: 294796809
Test: presubmit
2024-07-10 12:33:46 +00:00
Zi Wang
aee299e9f3 Merge "Remove OutputFiles method from llndk_libraries_txt and sanitizer_libraries_txt" into main 2024-07-09 19:30:39 +00:00
Treehugger Robot
72be248e10 Merge "cc_cmake_snapshot: drop Modules field" into main 2024-07-09 01:01:44 +00:00
Treehugger Robot
8359e6e0c3 Merge "Relax cflag checks for -Xclang and -target*" into main 2024-07-09 00:05:44 +00:00
Alyssa Ketpreechasawat
07bceec1fd Merge "Add "strip: {none: true}" for cc_prebuilt_library_shared in sdk snapshot." into main 2024-07-08 20:39:59 +00:00
Colin Cross
7c4a40a2f6 Relax cflag checks for -Xclang and -target*
Allow flags in cflags that start with "-target".

Allow "-Xclang <arg>" in cflags.

Bug: 350058746
Test: builds
Flag: EXEMPT bugfix
Change-Id: I1bf64268047949d747f53d8b111fc26298aee958
2024-07-08 10:50:16 -07:00
Tomasz Wasilczyk
bd83c74485 cc_cmake_snapshot: drop Modules field
Use Modules_host, Modules_system or Modules_vendor instead

Also, fix test by adding libc++demangle to the ignored list.

Bug: 285204695
Test: m binder_sdk
Test: cd build/soong/cc && go test
Change-Id: I6c3eda83584bc910f8b73ffa0f36c3d7fce5f10b
2024-07-08 10:22:24 -07:00
Alyssa Ketpreechasawat
59ec0fac0a Add "strip: {none: true}" for cc_prebuilt_library_shared in sdk snapshot.
Prebuilt cannot be stripped in older platform. Therefore, we set
stripper to none to skip the call to strip.sh.

Bug: 350050115
Test: SOONG_SDK_SNAPSHOT_TARGET_BUILD_RELEASE=Tiramisu m art-module-sdk
Test: Create module sdk from this and drop into tm-dev
Change-Id: I911ce24ca18435f95395c43fc5e73110a50b3067
2024-07-05 16:12:17 +00:00
Aditya Kumar
2c9b95000e Merge "Remove -mo-strict-align as it is enabled by default in clang-r522817" into main 2024-07-03 00:57:58 +00:00
Aditya Kumar
cbf426fa50 Enable -Wfortify-source
This reverts commit 55748021b0.

Reason for revert: Remaining errors were fixed.

Change-Id: I5b947d1e0853d55122673732752ccef7ab2d735e
2024-07-03 00:21:40 +00:00
Tomasz Wasilczyk
41dfb90ed0 Merge "cc_cmake_snapshot: Allow selecting modules from system and vendor" into main 2024-07-02 22:01:19 +00:00
mrziwang
17cc6dd1a9 Remove OutputFiles method from llndk_libraries_txt and sanitizer_libraries_txt
These 2 module types implement interface PrebuiltEtcModule,
which no longer implements OutputFiles method.

Test: CI
Bug: 339477385
Change-Id: Ic531432b24da9f1d03910c57ba6e45802f8ea967
2024-07-02 12:05:09 -07:00
Treehugger Robot
66b451b8ae Merge "AFDO: Do not mutate on disabled modules" into main 2024-07-02 18:00:57 +00:00
Tomasz Wasilczyk
d38d14056c cc_cmake_snapshot: Allow selecting modules from system and vendor
Bug: 285204695
Test: m binder_sdk
Change-Id: I47836dcfa74d48f74e3e7cf0293a8eeb9206be4c
2024-07-02 10:43:02 -07:00
Tomasz Wasilczyk
cd674738c0 cc_cmake_snapshot: refine link and compile flags
Also, move some AIDL detection logic to the AIDL library extension

Bug: 341997808
Test: m binder_sdk
Change-Id: I7776d2a967f547b305b0fa3a68dbe8cba5111534
2024-07-02 10:43:02 -07:00
Yi Kong
f885689227 AFDO: Do not mutate on disabled modules
If a module is implicitly disabled due to compile_multilib: "64" on a
32-bit only device, we would insert a dependency to a non-existant AFDO
profile variation.

Test: presubmit
Bug: 350641338
Change-Id: I82851c4bc943405e48f7f35b3484fac2e509bfe5
2024-07-02 17:07:02 +00:00
Tomasz Wasilczyk
7cec7e6753 Ignore musl libc depencencies
Bug: 349070246
Test: TARGET_SKIP_OTA_PACKAGE="true" TARGET_RELEASE=trunk_staging ./art/tools/build-linux-x86-host-tools.sh
Change-Id: I5393cf33d84eb406399378119ed8734dd7d8c37f
2024-07-01 11:33:25 -07:00
Colin Cross
3a02c7ba1a Remove test_per_src
Remove test_per_src, it never worked well and is incompatible
with all of the test infrastructure.  Uses in the platform have
been removed, generally by replacing them with individual cc_test
modules.

Test: builds
Flag: TEST_ONLY
Change-Id: I257c035da35ca8358ae9423b46453878f54efeb1
2024-06-28 10:31:05 -07:00
Ivan Lozano
a8a6f549ee Merge "cc/rust: Alias ffi rlib variant for static_libs" into main 2024-06-28 14:44:49 +00:00
Treehugger Robot
fb5251d50d Merge "disable rtti by default even for non-bionic builds" into main 2024-06-27 22:59:08 +00:00
Treehugger Robot
c78f893938 Merge "cc_cmake_snapshot: don't hardcode for linux_glibc:x86_64 hosts" into main 2024-06-27 20:37:01 +00:00
Tomasz Wasilczyk
9288b512ce cc_cmake_snapshot: don't hardcode for linux_glibc:x86_64 hosts
Bug: 349070246
Test: m binder_sdk
Change-Id: Ia1083159d4585d5a699d62face8026b0d49df887
2024-06-27 09:28:56 -07:00
Aditya Kumar
189d5c8283 Remove -mllvm -jump-is-expensive=false from riscv64_device.go
Latest toolchain has this by default.

Change-Id: I920146aee8d5512377bae81b2cba77b7f56b040a
Related: https://github.com/google/android-riscv64/issues/124
Bug: 330200010
2024-06-26 18:55:22 +00:00
Aditya Kumar
e21f1f58df Remove -mo-strict-align as it is enabled by default in clang-r522817
Cherry-picked in aosp/3009313
Related: https://github.com/google/android-riscv64/issues/111
Bug: 327307773
Change-Id: I996378fad09ce50fb432e1b4506ed273e3ec7019
2024-06-26 18:50:23 +00:00
Colin Cross
e5ef3e0ba0 Merge "Make cmake_snapshot output reproducible" into main 2024-06-26 18:09:04 +00:00
Ivan Lozano
fd47b1ab6a cc/rust: Alias ffi rlib variant for static_libs
Alias the rlib variant to "link: static". This allows declaring
rust_ffi_rlib modules in static_libs. This effectively removes any
distinction between rust_ffi_static and rust_ffi_rlib. Removing the
functionality for building Rust staticlib modules will be cleaned up in
a follow-on CL.

This should have the effect of changing the default linkage for all rust
modules in static_libs from linking individual staticlibs to building a
single staticlib that includes all rust_ffi rlib dependencies.

This removes the static_rlibs property, as we're now handling
the choice dynamically. This also makes rlibs only propagate through
cc_library_static modules if the rlib is included in
whole_static_lib. This both mirrors the expected behavior of
cc libraries and helps control which version of a crate ends up in the
final link (e.g. libdoh_ffi vs libdoh_ffi_for_test).

Bug: 254469782
Test: m
Test: m blueprint_tests
Change-Id: I2925f67f6dc9329dae3dcccafb8560900ac8a6fc
2024-06-26 01:35:41 +00:00
Colin Cross
7de1db7f2c Make cmake_snapshot output reproducible
Sort the outputs from cmake_snapshot to make the build.ninja file
reproducible.

Test: cmake_snapshot_test.go
Flag: EXEMPT refactor
Change-Id: I621e0dc9da7ad4c94234e0811f64d347024e3295
2024-06-25 22:55:59 +00:00
mrziwang
abdb293492 Update outputFilesForModuleFromProvider
This CL includes following changes:
1. Added the ability to differentiate the cases that module never
   sets OutputFilesProvider and that module sets the provider with
   a nil value.
2. Updated GenerateTaggedDistFiles to use outputFilesForModuleFromProvider.
3. Updated on cc module to use OutputFilesProvider.

Test: CI
Bug: 339477385
Change-Id: Ib5663a947315f6a90a81b7f073cf8dd22fbb1e05
2024-06-25 15:37:09 -07:00
Yabin Cui
b4f05f1a05 Upgrade to clang-r530567
Bug: 342023558
Test: presubmit
Change-Id: If9b6f9017965842ff6ff3ea5d537afbbb77f7e30
2024-06-25 10:57:14 -07:00
Wei Li
a1aa297518 Export Soong modules and build a database from metadata from Make and Soong.
Bug: 324465531
Test: CIs
Test: m compliance-metadata.db
Change-Id: Ia1c9ab0ae874dd47969555ddbfb93405b57a651f
2024-06-24 17:20:59 -07:00
Jihoon Kang
79b0eef5a1 Merge "Move vendor and product variant generation logic from cc package to android package" into main 2024-06-21 18:16:31 +00:00
Jihoon Kang
47e918450f Move vendor and product variant generation logic from cc package to android package
Although image variation generation logic has moved out of cc package to
the android package, the vendor and product partition variants
generation logic is still specific to cc package. Therefore, in order to
create a product or vendor variant, they have to specified in
`ExtraImageVariants`. In order to avoid such confusing behaviors and
enforce modules to specify product and vendor installation rules, this
change moves the vendor and product variant generation logic to
android.ImageInterface.

Test: m nothing --no-skip-soong-tests && diff contents of out/soong/Android-{product}.mk
Change-Id: I9e14f3739d9dea94167ee6a91e92b2f942055aba
2024-06-21 07:45:09 +00:00
Treehugger Robot
14a77d3a7f Merge "Minor cc_cmake_snapshot touch-ups" into main 2024-06-20 23:58:00 +00:00
Tomasz Wasilczyk
2493fcc7b5 Minor cc_cmake_snapshot touch-ups
- Partial support for arm64 hosts (no prebuilts yet)
- Replace incorrect template function use MATCHES with STREQUAL
- Add more ignored system libs
- No need to explicitly add libc++ prebuilt

Bug: 285204695
Test: m binder_sdk
Change-Id: Id6508cc9f9ee6328c95c2821c325629f84eda138
2024-06-20 15:30:09 -07:00
Elliott Hughes
b3b05ba84d Remove an out of date comment.
libandroid_support no longer exists.

Change-Id: I6e66f3e0fd5c58bff3c91563a33e0afc8614488c
2024-06-20 16:34:19 +00:00
Zi Wang
26faf1b321 Merge "Use OutputFilesProvider on cc_cmake_snapshot" into main 2024-06-20 16:18:16 +00:00