Commit Graph

8912 Commits

Author SHA1 Message Date
Spandan Das
2f68f1903a Drop module sdk MakeUninstallable special case
Platform variants of module sdk libraries were marked as uninstallable
originally in https://r.android.com/1974259. This special case is no
longer necesssary - android.MutateApexTransition will call
MakeUninstallable on the platform variant on both the source and
prebuilt soong modules when the following conditions are met
- //apex_available:platform is not listed in apex_available (explicitly
  or via the default implicit)
- the soong module is included in an apex that exists in the tree
  (listed in native_shared_libs)

Since MakeUninstallable is set by apex specific mutators, the relevant
unit test has been moved to the apex package. The Android.bp of the test
has also been extended with an apex that includes the shared library.

Test: m nothing --no-skip-soong-tests
Test: no diff in out/soong/Android-$product.mk
Test: added prebuilt_libdexfile to art's apex_contributions locally, no
diff in out/soong/Android-$product.mk

Bug: 220898484
Change-Id: I43a324882d486451bb921028853508d7ec3d76bf
2024-07-22 23:13:20 +00:00
Colin Cross
ea1b3b78b8 Merge changes from topic "elide_empty_variants" into main
* changes:
  Convert sdk mutator to TransitionMutator
  Convert link mutator to TransitionMutator
  Convert version mutator to TransitionMutator
  Convert python_version mutator to TransitionMutator
  Convert rust_libraries and rust_stdlinkage mutators to TransitionMutators
2024-07-18 17:37:38 +00:00
Colin Cross
ac57a6c6df Convert sdk mutator to TransitionMutator
Replace cc.sdkMutator with a TransitionMutator.

Bug: 319288033
Flag: EXEMPT refactor
Test: all soong tests pass
Change-Id: If9034ff73e02f1e6ee08bc3afc9a0576e0641651
2024-07-17 15:50:36 -07:00
Colin Cross
767819fede Convert link mutator to TransitionMutator
Replace cc.linkageMutator with a TransitionMutator.

Bug: 319288033
Flag: EXEMPT refactor
Test: all soong tests pass
Change-Id: I776515ab58a35c4a0a8e06cb9d0a256f8fb2ac5e
2024-07-17 15:50:36 -07:00
Colin Cross
add04a8c94 Convert version mutator to TransitionMutator
Replace cc.versionMutator with a TransitionMutator.

Bug: 319288033
Flag: EXEMPT refactor
Test: all soong tests pass
Change-Id: Idfd4157115d6f03997a339b43b3da9c2dfe2418d
2024-07-17 15:50:36 -07:00
Sean Hua
cd5c7d757a Merge "Use default fallback when generating cc deps" into main 2024-07-17 22:44:19 +00:00
Yabin Cui
96fbf8ba93 Merge "Reapply "Upgrade to clang-r530567"" into main 2024-07-17 16:13:19 +00:00
Treehugger Robot
6485cf11dc Merge "Add libdexfiled to the stub library multi APEX exception list." into main 2024-07-17 13:35:50 +00:00
Sean Hua
e783ed59a5 Use default fallback when generating cc deps
The current logic enforces a device arch match and omits a module
altogether if none is found. To collect a more comprehensive list
of cc deps for IDE (ASfP) project setup, we introduce a fallback
that defaults to an arbitrary (first-processed) variant.

Bug: 322369312
Test: refreshmod
Change-Id: Ic5e1fd39e569735ff90b5c71ab1395632cca9af7
2024-07-16 23:28:14 +00:00
Yabin Cui
8c69b7852b Reapply "Upgrade to clang-r530567"
Reapply after fixing existing build and test failures.
This reverts commit 8e2c5c22be.

Bug: 342023558
Test: presubmit
Change-Id: I4d36bab7015f401e7580c6287b7f94ffa25c74fc
2024-07-16 16:15:26 -07:00
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
Martin Stjernholm
7559803b12 Add libdexfiled to the stub library multi APEX exception list.
We need to add stubs to it to produce a correct linker config for the
ART debug APEX in eng builds.

We should be able to clean up all the ART exceptions when the debug
APEX is removed. Add a TODO reference to the ticket tracking that.

Test: See the other CL in the topic.
Bug: 349767294
Change-Id: Ida7ea96ccc3e29c2899d5ec12c4e8c8ae983a355
2024-07-12 19:33:43 +01: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