Commit graph

8813 commits

Author SHA1 Message Date
Pirama Arumuga Nainar
b2fa85de8c Merge "Revert^8 "Upgrade to clang-r522817"" into main am: 658bd0540e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3122593

Change-Id: Ib620d6f7dcaf6ceca09d5e554580b64020ba4d03
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-11 16:27:21 +00:00
Tomasz Wasilczyk
273ee50904 Merge "cc_cmake_snapshot: fix cc_test and cc_benchmark" into main am: e07a19bc63
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3107165

Change-Id: I67ae035ef0f008bd5211f6d53543dfb3ab175b3c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-11 16:26:59 +00:00
Pirama Arumuga Nainar
658bd0540e Merge "Revert^8 "Upgrade to clang-r522817"" into main 2024-06-11 16:25:58 +00:00
Tomasz Wasilczyk
e07a19bc63 Merge "cc_cmake_snapshot: fix cc_test and cc_benchmark" into main 2024-06-11 16:04:36 +00:00
Aleks Todorov
02de5bbcdb Merge "cc: Make export_include_dirs configurable" into main am: ef0024775f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3121811

Change-Id: Ib96a58e5b518dfbce6697a9b04de8262dceb3c2b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-11 10:11:19 +00:00
Aleks Todorov
ef0024775f Merge "cc: Make export_include_dirs configurable" into main 2024-06-11 09:09:30 +00:00
Yi Kong
cf31e84a70 Merge changes from topic "optimize_for_size" into main am: cdb8501c1e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3117077

Change-Id: Iae0bf8dac76fcf99171d08e5ac4279c0ddb16586
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-11 06:11:15 +00:00
Yi Kong
80064849a9 Add "Optimize_for_size" build property am: 5786f5cf1d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3104777

Change-Id: Ieab64511ca45501f0d3798ec66f3a0ec2a7922e0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-11 06:11:11 +00:00
Yi Kong
cdb8501c1e Merge changes from topic "optimize_for_size" into main
* changes:
  Enable MLGO inliner optimization for optimize_for_size cases
  Add "Optimize_for_size" build property
2024-06-11 05:38:13 +00:00
Kiyoung Kim
d605f683ef Merge "Remove VNDK related code from Soong" into aosp-main-future 2024-06-11 00:28:41 +00:00
Frederick Mayle
ce1fafd6e8 Merge "allow arch_variants for C++'s rtti option" into main am: 61d180ac27
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3120062

Change-Id: Ic1e9448bc71aec8fc92741b0720f3dd7346642df
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-10 20:31:01 +00:00
Chris Wailes
ffebc5b71f Revert^8 "Upgrade to clang-r522817"
This reverts commit 8c27af2136.

Reason for revert: Re-land the Rust 1.78.0 and Clang r522817 updates

Change-Id: Id1fe3790c9688f2c204ca26b5638e1a245cc65f4
2024-06-10 18:06:52 +00:00
Aleks Todorov
c9becde031 cc: Make export_include_dirs configurable
Bug: 325444956
Test: m
Test: m [custom cc_library_headers with select]
Change-Id: Iebd66bb3f322276ff0f16dc7765257ea309b081f
2024-06-10 18:37:22 +01:00
Frederick Mayle
7833af17f9 allow arch_variants for C++'s rtti option
Currently, the RTTI setting is ignored for host builds, but we want to
change that. As a prereq, we need a way to explicitly enable/disable it
for host builds.

Bug: 341341056
Test: m
Change-Id: Ie503218181cec4f4ef70063caaa4832f748a8eb5
2024-06-07 16:06:46 -07:00
Dmitrii Ishcheikin
8dc9c8028f Revert^7 "Upgrade to clang-r522817" am: 8c27af2136
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3119653

Change-Id: I96caa5de0b1981e727c739fa2de9cc5906e5630a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-07 14:06:39 +00:00
Dmitrii Ishcheikin
8c27af2136 Revert^7 "Upgrade to clang-r522817"
36c6af6bd2

Change-Id: Id3320a7862f1ebbfe49bfa4caa36e7ccfd515524
2024-06-07 13:06:19 +00:00
Chris Wailes
ba241b58c1 Merge "Revert^6 "Upgrade to clang-r522817"" into main am: 86cbd9e46d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3112925

Change-Id: I736546eb7f971c60a7b177af13ea9f618257b340
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-07 03:47:03 +00:00
Chris Wailes
86cbd9e46d Merge "Revert^6 "Upgrade to clang-r522817"" into main 2024-06-07 03:31:39 +00:00
Yi Kong
2cd77d671c Enable MLGO inliner optimization for optimize_for_size cases
This helps reduce binary size for these projects by ~3%.

Test: presubmit
Bug: 342090838
Change-Id: Ie1e0586ddf5f40aa1e81fc2628a6499093de9699
2024-06-06 15:01:59 +09:00
Yi Kong
5786f5cf1d Add "Optimize_for_size" build property
Projects with this property will be aggresively optimized for size. This
is useful for large binaries that are rarely executed and performance
insensitive (e.g. debugging tools, deprecated libraries).

This changeset reduces total system native binary size by 1.1%.

Test: presubmit
Bug: 342090838
Change-Id: I46a1db0c44e2e7d482b14eca1299f8ad48661d2d
2024-06-06 14:42:06 +09:00
Tomasz Wasilczyk
6e2b8c022c cc_cmake_snapshot: fix cc_test and cc_benchmark
Bug: 341997808
Test: aosp/3083875
Change-Id: Id6c2c5032a9963b74485fbfe40c0f2bde1dae5a4
2024-06-05 14:07:24 -07:00
Kiyoung Kim
9f26fcf88c Remove VNDK related code from Soong
As VNDK definition is fully removed from Android.bp, VNDK related code
can be removed from Soong. This change removes VNDK related code except
VNDK prebuilt which is required to build former versions of VNDK APEX
with prebuilts.

Bug: 330100430
Test: AOSP CF build succeeded
Ignore-AOSP-First: Resolve Conflict
Change-Id: Id9c8993343221c8464c97296bde0ff40b14b9b0b
2024-06-05 01:22:58 +00:00
Treehugger Robot
932414b0ad Merge "Ignore_max_page_size option." into main am: 2e264ce8e1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3112601

Change-Id: Id02367f2a210457d8fef0781dcfcb2f7c039fbe8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-04 21:47:36 +00:00
Yi Kong
36c6af6bd2 Revert^6 "Upgrade to clang-r522817"
This reverts commit 55d4abde48.

Reland after fixes

Change-Id: Ic22c58cd4735c737849379de86097605fccc2036
2024-06-04 16:54:06 +00:00
Steven Moreland
dabe2d4336 Ignore_max_page_size option.
Option for specific prebuilts to opt out of
the prebuilt page size check.

Like allow_undefined_symbols.

Bug: 342466032
Test: build using this to opt out
Change-Id: I335c0beb66c10b260e7c3e405f05027e7718fe07
2024-06-04 01:27:30 +00:00
Kiyoung Kim
8f05c54b9d VNDK is fully deprecated from Soong
VNDK is fully deprecated, so KeepVndk variable will have fixed value.
This change removes KeepVndk config value, and updates any logic using
the value as VNDK is always deprecated.

Bug: 330100430
Test: Soong tests passed
Ignore-AOSP-First: Resolve merge conflict
Change-Id: I98b7590c059883e06bf3fb236d88966de64991d7
Merged-In: I98b7590c059883e06bf3fb236d88966de64991d7
2024-06-04 01:09:15 +00:00
Liana Kazanova
f820c3beda Merge "Revert "Enable -Wfortify-source"" into main 2024-05-29 00:26:24 +00:00
Liana Kazanova
885f2eec3c Revert "Enable -Wfortify-source"
This reverts commit 5735ef6777.

Reason for revert: DroidMonitor: Potential culprit for b/343287447 - 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: I1aeeddc251db760e2ab01c734733d351514ec5b0
2024-05-28 23:33:24 +00:00
Aditya Kumar
3775725af2 Merge "Enable -Wfortify-source" into main 2024-05-28 22:58:46 +00:00
Aditya Kumar
5735ef6777 Enable -Wfortify-source
Workaround for the post-submit failures
in b/341339765 has been merged.

Test: woodchipper and presubmit
Fixes: 315245071
Change-Id: I840f545cc0892cfdf9c896fd45761ba5308ff1ca
2024-05-24 04:43:18 +00:00
Kiyoung Kim
22152f6cda Remove VndkUseCoreVariant related code from build
VndkUseCoreVariant feature is deprecated along with VNDK. This change
removes related code from Soong.

Bug: 330100430
Test: AOSP CF build succeeded
Change-Id: Ie182c9e4dc9cf0a4fe9d5fddf5b36754ddb53d18
2024-05-24 10:45:28 +09:00
Kiyoung Kim
41a1ff1a28 Merge "Move sanitizer.libraries.txt logic into Soong" into main 2024-05-24 00:39:00 +00:00
Kiyoung Kim
0d8908c2e4 Move sanitizer.libraries.txt logic into Soong
Currently sanitizer.libraries.txt module is defined from Makefile, while
all logics to create the list of modules is implmented within the Soong.
This change moves sanitizer.libraries.txt module definition into Soong,
so it can be generated without sharing list of modules over Make
variable.

Bug: 339131599
Test: AOSP CF build succeeded, with same list of modules in
/system/etc/sanitizer.libraries.txt

Change-Id: I987684877aa8dae221a03227d784f2a8ca4f5cc4
2024-05-23 17:50:46 +09:00
kellyhung
de1b6b0f64 Fix post command of clang_verify.
Bug: 311284462
Test: go test -run TestClangVerify
Change-Id: I116c4a3e1e5734a71e1bfd503ea2268a1a5643dd
2024-05-23 02:16:26 +00:00
Treehugger Robot
1c07aaac6a Merge "Add clang_verify property for cc." into main 2024-05-21 08:00:45 +00:00
Hsin-Yi Chen
cf90c1596a Merge "Add --release and --lib-variant to the instructions to update ABI dumps" into main 2024-05-21 04:56:19 +00:00
kellyhung
d62ea30647 Add clang_verify property for cc.
This property is to support cflags "-Xclang -verify" build pass in Soong. The behaviors of clang_verify:
- append cflags "-Xclang -verify"
- append "&& touch $out" to the clang command line

Bug: 311284462
Test: go test -run TestClangVerify

Change-Id: Ic5825e2d649da4c3c5ed6da916e9804d7e3c03da
2024-05-21 11:31:48 +08:00
Yi Kong
9b9d29b845 Turn off relaxed-template-template-args as a workaround
ToT switched on "relaxed-template-template-args" by default. This does
not work with our outdated libc++. Turn it off until we have the new
libc++.

Test: build with Kokoro ToT Clang (build 2417)
Bug: 341084395
Bug: 332594828
Change-Id: I994c476c1f7b4abd81e5ae0bde4e1f9afd1aa920
2024-05-20 02:48:42 +09:00
Priyanka Advani
99d9068bfc Merge "Revert "Enable -Wfortify-source"" into main 2024-05-17 20:07:50 +00:00
Priyanka Advani
89ed157a2f Revert "Enable -Wfortify-source"
This reverts commit 4412723f63.

Reason for revert: Droidmonitor triggered revert due to build breakage in b/341339765. 

Change-Id: Id2880f6c0e38504f1adace5e4dab3fd7f6b9b792
2024-05-17 19:42:55 +00:00
Aditya Kumar
6c9f524953 Merge "Enable -Wfortify-source" into main 2024-05-17 18:58:08 +00:00
Ivan Lozano
e8fcd37775 Merge changes from topic "rust-made-to-order-staticlibs" into main
* changes:
  rust: made-to-order rust staticlibs
  rust: refactored transformSrctoCrate
2024-05-17 12:40:36 +00:00
Yi Kong
728e9178bd Merge "Revert^5 "Upgrade to clang-r522817"" into main 2024-05-17 03:06:24 +00:00
Priyanka Advani
55d4abde48 Revert^5 "Upgrade to clang-r522817"
This reverts commit 0135499554.

Reason for revert: Droidmonitor triggered revert due to b/341148479 and b/341138217. Will be verifying through ABTD before submission.

Change-Id: I22e069178dfda0b1791bd77c908afff8cb87bf26
2024-05-16 22:00:02 +00:00
Yi Kong
aac481527e Merge "Revert^4 "Upgrade to clang-r522817"" into main 2024-05-16 18:07:51 +00:00
Aditya Kumar
4412723f63 Enable -Wfortify-source
This reverts commit 9b7e07c7aa.
Workaround for the post-submit failure in b/339523786 has been merged.

Fixes: 315245071
Change-Id: I517f13334ad169429daaa68bda7d5f600f653977
2024-05-16 17:00:53 +00:00
Ivan Lozano
0a468a4f3b rust: made-to-order rust staticlibs
Whenever any two Rust static libraries are included
as static libraries anywhere in a CC dependency tree, we sometimes
get duplicate symbol errors. To avoid this, we no longer
directly link multiple rust static libs to CC modules.

Instead, we build rust_ffi_rlib modules and produce the actual
static library that gets linked against the CC module based on
that CC module's full list of Rust rlib dependencies.

This introduces a new static_rlibs property for cc modules to
define the rust_ffi_rlib dependencies, which are then used to
generate the module above.

This CL is intended to deprecate rust_ffi_static. It leaves
rust_ffi_static and rust_ffi static variants in place until
the remaining rust_ffi_static declarations and uses can be
removed. In the meantime, rust_ffi_static produces
rust_ffi_rlib variants as well to make the transition easier.

Bug: 254469782
Test: m # with no changes
Test: m libapexsupport # with static_rlibs
Test: m libunwindstack # with static_rlibs
Test: m netsimd # with static_rlibs, no duplicate symbols
Test: m blueprint_tests # New Soong tests

Change-Id: I47e27ac967ef0cad46d398ebf59d8275929ae28a
2024-05-16 13:00:43 -04:00
Hsin-Yi Chen
d5919c1636 Add --release and --lib-variant to the instructions to update ABI dumps
The ABI dumps depend on the LLNDK API level and SDK version defined
in the release configurations. The error messages shows additional
parameters for the user to select the right version and variant.

Test: make libvulkan
Bug: 323447559
Change-Id: If12f3f74be49c3036516f42fb5d91979b610fafe
2024-05-16 15:32:06 +08:00
Tomasz Wasilczyk
a910dce1a3 Merge "cc_cmake_snapshot: improve support for AIDL" into main 2024-05-15 17:43:14 +00:00
Tomasz Wasilczyk
1e831bfa87 cc_cmake_snapshot: improve support for AIDL
- link correct libbinder for AIDL modules
- fix building AIDL interfaces with non-empty AidlRoot
- don't silently drop non-existent dependencies

Bug: 302718225
Test: aosp/3081709
      atest binder_sdk_docker_test_clang
Change-Id: I181ef5a994f728f8af19134a6697b065a9aee261
2024-05-14 13:45:34 -07:00