Commit graph

8809 commits

Author SHA1 Message Date
Treehugger Robot
77858402e4 Merge "Cleanup ImageInterface.SetImageVariation" into main 2024-06-14 04:26:52 +00:00
Jihoon Kang
7583e835f7 Cleanup ImageInterface.SetImageVariation
This change modifies the interface method of
ImageInterface.SetImageVariation so that the image variation is set
directly at the caller image variation module, instead of passing the
pointer to set the image variation.

Test: m nothing
Change-Id: I8eadb5149365530243e19a8cd37eb49d335fbeef
2024-06-13 21:56:23 +00:00
Cole Faust
e96c16a806 Make the cflags property configurable
So that you can use select statements on it. The current modivation
is to convert a module from make to bp with minimal soong config
variable boilerplate.

Bug: 342006386
Bug: 346922064
Test: m nothing --no-skip-soong-tests
Change-Id: I48d5a11ad3aa65c24cc199458634a5fdbeab2f64
2024-06-13 14:51:14 -07:00
Tomasz Wasilczyk
c3177e0ffc Enable cmake testing
Bug: 302718225
Test: atest binder_sdk_test
Change-Id: Id841d73d11f3b0c75f7bcd523be8ff69300a503e
2024-06-11 13:36:20 -07:00
Sam Saccone
6ace4cf906 Merge "Only generate kythe xrefs on the primary module" into main 2024-06-11 20:23:38 +00:00
Cole Faust
9decf834ce Only generate kythe xrefs on the primary module
Currently the kythe build is hitting the 6 hour timeout, but we're
generating kythe files for all variants. Generating them only for
the primary variant should drastically cut its runtime.

Bug: 345440993
Test: Presubmits
Change-Id: I3846b25c7f0bc22153e4f0a0cb81c5015854dd70
2024-06-11 11:50:47 -07:00
Zi Wang
3125b75d5d Merge "PrebuildEtcModule no longer implements OutputFiles method" into main 2024-06-11 16:55:22 +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
ef0024775f Merge "cc: Make export_include_dirs configurable" into main 2024-06-11 09:09:30 +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
mrziwang
e2346b87d9 PrebuildEtcModule no longer implements OutputFiles method
In the context of incremental soong, the output files
inter-module-communication will be through OutputFilesProvider.
The OutputFileProducer interface will be deprecated.

These module types are included in this change:
linker_config
llndk_libraries_txt
sanitizer_libraries_txt
java_sdk_library_xml
vndksp_libraries_txt
vndkcore_libraries_txt
vndkprivate_libraries_txt
vndkpublic_libraries_txt

Test: CI
Bug: 339477385
Change-Id: I35575bbad137df5ff8001db9a61ba5b3d13eaa6d
2024-06-10 15:17:07 -07: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
8c27af2136 Revert^7 "Upgrade to clang-r522817"
36c6af6bd2

Change-Id: Id3320a7862f1ebbfe49bfa4caa36e7ccfd515524
2024-06-07 13:06:19 +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
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
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
Colin Cross
783fa37807 Merge "Add $ORIGIN to rpath for cc_test modules" into main 2024-05-13 20:59:01 +00:00
Hsin-Yi Chen
d75bc49454 Merge "Ensure opt-in platform ABI dumps are configured with ref_dump_dirs" into main 2024-05-13 03:01:44 +00:00
Tomasz Wasilczyk
d848dcc9e6 Disable cc_cmake_snapshot outside of Linux
Test: cd build/soong/cc && go test
Bug: 339782737
Change-Id: Ide6693123c741a39d37164a1a39841be1bd84862
2024-05-10 21:32:23 +00:00
Colin Cross
b881e324d2 Add $ORIGIN to rpath for cc_test modules
cc_test modules can use data_libs to put shared libraries alongside
the test.  Add $ORIGIN to rpath so they can load them as DT_NEEDED
libraries or with dlopen.

Test: treehugger
Change-Id: I4227d16ff80e70dfecb481a2de6dd15af66348bc
2024-05-10 20:27:32 +00:00