Commit Graph

83674 Commits

Author SHA1 Message Date
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
Cole Faust
47a91c9f4f Merge "Check that the DeapexerInfo was actually set" into main 2024-08-15 18:00:22 +00:00
Yu Liu
e89b6dd497 Merge "Remove installFiles from ModuleBase." into main 2024-08-15 17:23:59 +00:00
Treehugger Robot
3306d84c07 Merge "Support configurable prebuilt apex sources" into main 2024-08-15 15:43:52 +00:00
Treehugger Robot
4483c0e7c0 Merge "Support BUILD_FRAMEWORK_COMPATIBILITY_MATRIX for soong" into main 2024-08-15 09:07:38 +00:00
Cole Faust
c0ca5056ab Check that the DeapexerInfo was actually set
Otherwise we could return empty DeapexerInfos. We're not running into
any problems due to this at the moment, it's just something I noticed.

Bug: None
Test: m nothing --no-skip-soong-tests
Change-Id: I903d86740a9f22574a5f6bf2effa912bd8237ab6
2024-08-14 17:51:03 -07:00
Cole Faust
642e720b5b Support configurable prebuilt apex sources
Bug: 342006386
Fixes: 359690321
Test: m nothing
Change-Id: I2e503932c7fdb3eea9cd2dfedd86029ff52cfbe1
2024-08-14 17:46:12 -07: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
Dan Albert
61bd3d11e9 Merge "Revert^2 "Verify that ndk_headers headers are valid C."" into main 2024-08-14 22:25:10 +00:00
Treehugger Robot
67e25d144a Merge "Always generate PDB for Windows executable" into main 2024-08-14 21:26:48 +00:00
Fabien Sanglard
aa8020ac13 Always generate PDB for Windows executable
Test: NA
Bug: 350154912
Change-Id: I0a4ebfb62643eb2c8d2b20992e728bcb8b5219a9
2024-08-14 13:31:55 -07:00
Treehugger Robot
97da65f8ad Merge "Pass through RUST_LOG" into main 2024-08-14 19:27:31 +00:00
LaMont Jones
b2ab527798 Pass through RUST_LOG
If the user has RUST_LOG set in the environment, pass that through.

Bug: 352600283
Test: manual
Change-Id: Ia6bfa4be791a8e72591fc729de4e4270df150a1c
2024-08-14 10:08:50 -07:00
Jihoon Kang
6de6d7267f Correct the name of the android.car.builtin module that is instrumented
java_sdk_library is not instrumented as it does not perform any
compilation actions. Instead, its submodule impl lib (with .impl suffix)
is instrumented.

Test: CI
Bug: 355514682
Bug: 339901608
Change-Id: I2f7b4a8cf14a592d268b6f5d44f72e43700b4907
2024-08-14 16:39:57 +00:00
Dan Albert
266f991cc5 Revert^2 "Verify that ndk_headers headers are valid C."
181934cc26

Change-Id: I7720331ee8132ead8d0b5624a0b99841884300d3
2024-08-13 22:01:23 +00:00
Yu Liu
8bf4079e5f Merge "Skip writing ninja file for module with a cache hit during incremental build." into main 2024-08-13 17:00:55 +00:00
Yu Liu
246b43049c Merge "Merge SingletonProviderContext with OtherModuleProviderContext" into main 2024-08-13 15:56:16 +00:00
Treehugger Robot
f20696e112 Merge "Refactor containers" into main 2024-08-13 04:47:43 +00:00
Yi Kong
c128a6808e Merge "Remove workaround for old libc++" into main 2024-08-13 02:07:31 +00:00
Treehugger Robot
aa65374cc1 Merge "Make the srcs and exclude_srcs properties configurable" into main 2024-08-13 01:20:23 +00:00
Haamed Gheibi
c0429054c9 Merge "Individually mount children of root with ABFS enabled and respect OUT_DIR configuration." into main 2024-08-13 00:25:24 +00:00
Treehugger Robot
51554b41b5 Merge "dirmods: Add option to not recurse" into main 2024-08-12 23:52:21 +00:00
Yu Liu
663e4508dc Merge SingletonProviderContext with OtherModuleProviderContext
Bug: 358425833
Test: CI
Change-Id: I8e3f40dc3cfc5337008b419801f8e6bf2d48e8b2
2024-08-12 22:50:19 +00:00
Cole Faust
96a692bfa9 Make the srcs and exclude_srcs properties configurable
Bug: 358377461
Bug: 342006386
Test: Presubmits
Change-Id: I21c20254a3ad3e75dd401ab807eb57ddbbeac047
2024-08-12 15:27:02 -07:00
Jihoon Kang
17a61d7609 Refactor containers
Implementation details:
- Add documentations
- Convert container determiniation logic to function pointers, in order
  to make addition/deletion of containers more scalable

Test: m nothing
Bug: 338660802
Change-Id: I4f7a9a027e00584bb895ce8559f621bae1e985f6
2024-08-12 22:26:52 +00:00
Taylor Santiago
2611851112 Individually mount children of root with ABFS enabled and respect
OUT_DIR configuration.

Mounting '/' directly as read-only results in failed bindmounts at /src
if that directory does not already exist due to failure to mkdir.

Change-Id: I7f11c45e82374d142a86fcb2f03e53ddacffffb8
2024-08-12 12:06:29 -07:00
Yi Kong
703c2e3d64 Merge "Bump pessimizing-move from -Wno to -Wno-error" into main 2024-08-12 18:31:42 +00:00
Colin Cross
08b6061539 Merge changes If313580b,I68d50d68 into main
* changes:
  Use a provider for systems modules
  Add PrepareForTestWithBuildFlag
2024-08-12 16:53:42 +00:00
Spandan Das
9dfccb91a5 Merge changes Ib4581079,Ia3887bae into main
* changes:
  Make IdeInfo aware of jarjar-ing
  Add .internal modules to IDEInfo.deps of top-level java_sdk_library
2024-08-12 16:40:30 +00:00
Yi Kong
f4801135a6 Remove workaround for old libc++
We now have a modern libc++, and no longer needs to explicitly turn off
deprecated-dynamic-exception-spec warning for it.

Test: presubmit
Change-Id: Ie282b32ed9ac2b0246fd8245f4c5d29526cbda76
2024-08-12 23:53:30 +08:00
Yi Kong
fd50d175ad Bump pessimizing-move from -Wno to -Wno-error
This is a useful warning that can point out lower performance code.

https://r.android.com/q/hashtag:pessimizing-move-cleanup cleaned up many
cases. Let's bump this up to a non-error warning while we fix up the
remaining cases.

The warning remains off for all external code.

Test: presubmit
Bug: 154270751
Change-Id: If6b69cbaa1384e81336b6842607a587bf6c7f38b
2024-08-12 17:51:38 +08:00
Kiyoung Kim
d0338d3565 Merge "Remove host_snapshot module" into main 2024-08-12 00:37:38 +00:00
Treehugger Robot
6f4d57a790 Merge "Build product/odm build.prop with Soong" into main 2024-08-12 00:08:32 +00:00
Colin Cross
b61c226943 Use a provider for systems modules
Replace the SystemModulesProvider interface with Provider

Test: all soong tests
Flag: EXEMPT refactor
Change-Id: If313580b28094d55b71f1635259bafa850ef7af5
2024-08-09 16:47:45 -07:00
Colin Cross
a66b4630f6 Add PrepareForTestWithBuildFlag
Add a helper function that creates a test fixture preparer that
sets a build flag, and use it everywhere that was setting build flags
manually.

Test: all soong tests
Flag: EXEMPT refactor
Change-Id: I68d50d68787a30d091f0827e8caa51f5c5a762ef
2024-08-09 16:47:45 -07:00
Spandan Das
b4cd5df573 Make IdeInfo aware of jarjar-ing
jarjar can be used to repackage a java_library. e.g. Foo.java in package
com.android might get repackaged to prefix.com.android.Foo in the
resultant jar. To allow code completion of rdeps, we should use the
repackaged jar instead of the src files.

This CL sets dpInfo.Jars to the header jar _only_ when jarjar_rules is
not empty. We could probably set `Jars` to the header jar even for non
jarjar-d libraries and get rid of `Srcs`, `SrcJars` altogether, but that
would likely slow down any tools that index
out/soong/module_bp_java_deps.json for code completion.

Test: go test ./java
Bug: 356572093
Change-Id: Ib45810799a479cb315aed011a34351d386a21357
2024-08-09 22:37:33 +00:00
Spandan Das
dee1a7419f Add .internal modules to IDEInfo.deps of top-level java_sdk_library
libraries and apps can depend on the top-level java_sdk_library like
such
```
java_library {
  name: "mylib",
  libs: ["somesdklib"],
}
```
and soong will automatically resolve mylib's classpath to either the
stub or impl library based on the api container these libraries are in.

Since the top-level java_sdk_library has no compilation actions, code
completion of `mylib` is not feasible today via
`module_bp_java_deps.json`. This CL adds support for this code
completion by registering the .impl (or public stubs) as a transtive
dependency of `mylib`.

The implication of this change is that implementation symbols of the sdk
library will be surfaced during code-completion of mylib, even when
mylib is in a different container. Long term, this should go away when
all the library dependencies are made explicit in Android.bp files.

Test: go build ./java
Test: verified that symbols of android.car.builtin (a java_sdk_library)
can be resolved with the repro instructions in b/356572093#comment5

Bug: 356572093
Bug: 358613520
Change-Id: Ia3887bae34bbd25b8c6346f43602835da32af84a
2024-08-09 22:27:47 +00:00
Spandan Das
788f69722c Merge changes Iab6efe78,I73affae8 into main
* changes:
  Register versioned sdk dependency in module_bp_java_deps.json
  Add IdeInfo for java module types
2024-08-09 22:24:51 +00:00
Dan Albert
fbe5780312 Disable ABI tracking for bionic.
This is being done with a path-based filter rather than as a property
of ndk_library because there would be no way to prevent people from
disabling ABI tracking without API council review if it were a
property, since there's no per-module OWNERS.

Bug: http://b/358653811
Test: m ndk
Change-Id: If6af638accc917294eee18cb08551c5df25462ad
2024-08-09 21:16:56 +00:00
Spandan Das
6e8bd1cc37 Register versioned sdk dependency in module_bp_java_deps.json
java modules that link against a versioned sdk (sdk_version: <num>) get
the appropriate stub jar on its classpath, but the dependency is not
registered in its build graph. This CL registers this dependency for
module_bp_java_deps.json. Ideally, we should move this to `decodeSdkDep`
so that this dependendency becomes known to other tools that analyze
soong's module graph (e.g. soongdbg)

Test: go test ./java
Bug: 358608607
Bug: 356572093
Change-Id: Iab6efe7826d18dedfadbe4d34d78e7eb2888bd8d
2024-08-09 17:16:23 +00:00
Yi Kong
c8b6feba4c Merge "Move -Wno-error=format from external NoOverride to external flags" into main 2024-08-09 13:50:03 +00:00
Ivan Lozano
3d46dc569a Merge "rust: Add dylib variants for bindgen modules." into main 2024-08-09 12:39:23 +00:00
Kiyoung Kim
ef693fc9bc Remove host_snapshot module
Remove host_snapshot implementation which is no longer in use.

Bug: 332986564
Test: soong build succeeded
Change-Id: I96ee4eb319f380d9f85de7f9716e63513838624c
2024-08-09 07:16:03 +00:00
Yi Kong
2e2d753760 Move -Wno-error=format from external NoOverride to external flags
Test: presubmit
Bug: 315250603
Change-Id: Ib1ed2aed52818e177c1b40da17e192606308243a
2024-08-09 14:56:58 +09:00
Jooyung Han
f826c99ec2 Merge "apex: rm $out before decompressing an apex." into main 2024-08-09 01:33:04 +00:00
Priyanka Advani (xWF)
d882a0c92d Merge "Revert "Verify that ndk_headers headers are valid C."" into main 2024-08-08 23:29:41 +00:00
Priyanka Advani (xWF)
181934cc26 Revert "Verify that ndk_headers headers are valid C."
Revert submission 3207854-ensure-c-ndk-headers

Reason for revert: Droidmonitor created revert due to b/358445530.

Reverted changes: /q/submissionid:3207854-ensure-c-ndk-headers

Change-Id: I649941a4d063d76a1c6a8e58fb885da2c44331c0
2024-08-08 22:49:18 +00:00
Spandan Das
f5ee86c46f Add IdeInfo for java module types
This CL adds support for
1. java_system_modules
2. java_system_modules_import
3. java_device_for_host
4. java_host_for_device

Bug: 356572093
Test: cat out/soong/module_bp_java_deps.json | jq
'."core-all-system-modules"' is no longer null

Change-Id: I73affae834df7f6ed961fa757585242f6d388395
2024-08-08 22:38:27 +00:00
Treehugger Robot
894a93840d Merge "Verify that ndk_headers headers are valid C." into main 2024-08-08 21:37:29 +00:00
Colin Cross
82201c2db1 Merge changes Ib238a83a,I9ed6a649 into main
* changes:
  Use rsp for kotlin classpath
  Move kotlin stdlib after javac jars
2024-08-08 18:11:59 +00:00