Commit Graph

22 Commits

Author SHA1 Message Date
Cole Faust
5b1a39a92a Merge "Make the WholeStatic/Static/Shared libs properties configurable" into main 2024-08-19 22:48:16 +00:00
Cole Faust
f0006e7137 Make the WholeStatic/Static/Shared libs properties configurable
So that you can use selects with them.

Bug: 342006386
Bug: 358377461
Test: m nothing --no-skip-soong-tests
Change-Id: I5a8350f670d51b7da411ad5c3cdbf5f2d6cdd63b
2024-08-19 14:39:19 -07:00
Yu Liu
d46e5ae670 Remove more internal fields from ModuleBase.
Bug: 358425833
Test: Manual compare the generated ninja and mk files and CI.
Change-Id: I4edd0dc646ac035594f47cd9044cc4eb5f710e64
2024-08-16 00:20:27 +00:00
Yu Liu
ddc2833b7f Remove installFiles from ModuleBase.
This is to limit the direct accesses to the internal fields of a
module in order to better support incremental caching. To access
the install files data from singleton context or other modules'
context use providers thru the provided wrapper; to access it
from the same module inside GenerateBuildActions use ctx which is
short-lived only inside this method.

Bug: 358425833
Test: CI
Change-Id: I337b07a2ef95fb2a898ac2f9277160a3f76a603c
2024-08-14 22:56:30 +00:00
Spandan Das
1f22939d81 Ingore CC prebuilts from cmake snapshots
The cmake snapshot scripts currently looks at the `cc.Module.compiler`
property to determine whether a cc_* module is a prebuilt. As part of
b/275273834. some cc_* prebuilt modules which provide APIs will have a
non-nil `compiler` to convert the API .txt file to stub .c files.

This CL updates the cmake generation script to ignore prebuilts using
the `IsPrebuilt` function rather than `cc.Module.compiler`

Bug: 275273834
Test: m nothing --no-skip-soong-tests
Change-Id: Id8ba22b1c5ad13fb31e75a407a25e97a8040d0b1
2024-07-23 22:36:10 +00: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
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
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
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
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
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
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
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
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
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
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
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
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
Hao Chen
1c8ea5b6e1 Implement cc_cmake_snapshot
Bug: 302718225
Test: cd build/soong/cc && go test
Test: https://r.android.com/2803466
Change-Id: Ie7df635233ed68c40d917ea1f83f9fd4b5bfe729
2024-05-09 15:25:27 -07:00