Commit Graph

8934 Commits

Author SHA1 Message Date
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
Pechetty Sravani
f80ffa8b86 Merge "Revert "Enable -Wfortify-source"" into main 2024-06-19 13:15:28 +00:00
Pechetty Sravani
55748021b0 Revert "Enable -Wfortify-source"
This reverts commit 25e9e900f1.

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

Change-Id: Ia18f83e9261e395cf5f76669523bd6f4a5e9ba49
2024-06-19 11:47:27 +00:00
Maciej Żenczykowski
d957a9bd70 Merge "Enable -Wfortify-source" into main 2024-06-19 10:09:21 +00:00
Aditya Kumar
25e9e900f1 Enable -Wfortify-source
This reverts commit 32e35e416e.

Reason for revert: Fixed the failing builds

Change-Id: I919c292e4802a795771c499a830381ca4c761e18
2024-06-18 21:17:12 +00:00
Cole Faust
ecdb25e674 Merge "Make required a configurable property" into main 2024-06-18 18:05:41 +00:00
mrziwang
f95cfa6087 Use OutputFilesProvider on cc_cmake_snapshot
In the context of incremental soong, the output files
inter-module-communication will be through OutputFilesProvider.
The OutputFileProducer interface will be deprecated.

Test: CI
Bug: 339477385
Change-Id: I38d9b2a953296134490a4347ecd024dac2dd4757
2024-06-18 10:11:39 -07:00
Treehugger Robot
d6352efd1a Merge "Use --lto-O0 for optimizeForSize targets" into main 2024-06-17 21:18:00 +00:00
Cole Faust
43ddd08bd2 Make required a configurable property
So that users can use select statements with it.

Fixes: 347605145
Bug: 342006386
Test: m nothing --no-skip-soong-tests
Change-Id: Ica0ca6d1725b000b3748c0293e5a9f9b38ed87f9
2024-06-17 12:32:40 -07:00
Xin Li
f9fc13dd78 Merge "Merge Android 14 QPR3 to AOSP main" into main 2024-06-17 18:51:33 +00:00
Maciej Żenczykowski
32e35e416e Revert "Enable -Wfortify-source"
This reverts commit ca5e3eb407.

Reason for revert: falcon and seahawk build failures on git_main.

Change-Id: Ib48e33dbb1649641223013739bb85934342a067a
2024-06-17 09:55:36 +00:00
Yi Kong
ae870727b5 Use --lto-O0 for optimizeForSize targets
This is another place where we can trade performance for additional
binary size savings.

Test: presubmit
Change-Id: Icf9600ef2ca4092e4adccc0c26465b542b038f7b
2024-06-16 13:05:05 +09:00
Aditya Kumar
ca5e3eb407 Enable -Wfortify-source
This reverts commit 885f2eec3c.

Reason for revert: Fixed the error reported in post-submit

Change-Id: I152494403e6d6937413d0e5d2637d426c2f54009
2024-06-15 12:07:06 +00:00
Pirama Arumuga Nainar
52436e1574 Merge "Revert^4 "Enable full LTO optimization by default"" into main 2024-06-14 21:54:50 +00:00
Cole Faust
7dc42aa7af Merge "Remove debug/release cflags" into main 2024-06-14 21:15:15 +00:00
Xin Li
c2b69f7fad Merge Android 14 QPR3 to AOSP main
Bug: 346855327
Merged-In: I03a00bfb541769e6aa877a184ce7efa2a03d0f59
Change-Id: I1e408cbdaa040643c946fe92a1da4675232fa667
2024-06-14 10:45:54 -07:00
Aleks Todorov
274b3c9521 Merge "cc: Make generated_headers configurable" into main 2024-06-14 17:25:07 +00:00
Aleks Todorov
36187c371e Merge "cc: Make cc_genrule defaultable" into main 2024-06-14 17:17:17 +00:00