Commit graph

50479 commits

Author SHA1 Message Date
Colin Cross
08b0a1cd79 Add missing dependency on compose plugin in kapt rules
The kapt rule uses kotlincFlags but was not using kotlincDeps,
causing the rule to get the -Xplugin argument on the compose
compiler plugin jar, but not have a dependency on it.

Bug: 231222079
Test: TestKotlinCompose
Change-Id: I4c2cf30fb7d8cad4eededa29f67f4ffd459caa41
2022-05-02 14:00:50 -07:00
Treehugger Robot
184a6b87e5 Merge "Prototype changes for multitree" 2022-04-28 22:20:47 +00:00
Treehugger Robot
f8c3412822 Merge "Convert $(words) to Starlark" 2022-04-28 22:18:07 +00:00
Treehugger Robot
ff22afa704 Merge "Use --dependency-file when linking elf files." 2022-04-28 22:14:54 +00:00
Paul Duffin
fb14b52747 Merge "Allow framework-media to build the framework-media.impl" 2022-04-28 21:10:16 +00:00
Cole Faust
16bb2d044d Merge "Allow seeing include $(x) when there is an include_top comment" 2022-04-28 20:49:17 +00:00
Treehugger Robot
e8f19f3dd7 Merge "Convert includes/inherits inside evals" 2022-04-28 20:43:29 +00:00
Kousik Kumar
4e3c26602f Merge "Add a warning message about missing gcert at the end of the build" 2022-04-28 19:55:30 +00:00
Cole Faust
1a3e5effa8 Merge "Allow comparing $(wildcard) results to non-empty values" 2022-04-28 19:54:32 +00:00
Treehugger Robot
f7fa021b65 Merge "Set the dist dir for musl targets of build_version_test" 2022-04-28 16:51:24 +00:00
Treehugger Robot
1b60bb4fe1 Merge "Correctly serialize class loader context for "any" SDK version to JSON." 2022-04-28 15:46:04 +00:00
Paul Duffin
77590a8263 Allow framework-media to build the framework-media.impl
The framework-media java_sdk_library is currently api_only for legacy
reasons. This change allows it to also build the framework-media.impl
library by making the following changes:
* Adds impl_only_static_libs to allow the implementation to statically
  include other libraries, something no other java_sdk_library has
  needed to do.
* Passes the apex_availability property through to the impl library so
  it can be statically included in the updatable-media which is what is
  included in the apex, again for legacy reasons.

Bug: 190807367
Bug: 229932396
Test: m com.android.media media-module-sdk
      # Compare before and after this change (and corresponding change
      # to updatable-media/framework-media.
Change-Id: I9e1837edcca6f5fa84fc611274cf8fbba8a896b8
2022-04-28 14:30:14 +00:00
Oriol Prieto Gasco
eda12cb250 Set the dist dir for musl targets of build_version_test
Bug: 230604501
Test: build/soong/soong_ui.bash --make-mode apexer_tools static_apexer_tools dist BUILD_HOST_static=1 USE_HOST_MUSL=true
Change-Id: I29b7f4c16346e39b89f099eecf816d9811a7b587
Merged-In: I29b7f4c16346e39b89f099eecf816d9811a7b587
2022-04-28 14:18:59 +00:00
Treehugger Robot
d5a57a5679 Merge "Replace DEX_FLAGS by flags for D8 and R8." 2022-04-28 12:40:13 +00:00
Ulya Trafimovich
91f015e73e Correctly serialize class loader context for "any" SDK version to JSON.
Previously "any" was serialized as its numeric value, 10000. But other
code in makefiles and scripts expects string "any", and dexpreopt.config
files generated by Make (for Android.mk modules) have "any" not 10000.

Bug: 214255490
Test: lunch aosp_cf_x86_64_phone-userdebug && m && launch_cvd \
    && adb wait-for-device && adb root \
    && adb logcat | grep -E 'ClassLoaderContext [a-z ]+ mismatch'
    # empty output, no errors at boot
Change-Id: Id5e80eb8a90d9786b5cb999c172aaecb44952f76
2022-04-28 13:22:52 +01:00
Ulya Trofimovich
a465e28bcb Merge "Remove obsolete dexpreopt config option UseArtImage." 2022-04-28 09:44:21 +00:00
Inseob Kim
5eb7ee9fad Prototype changes for multitree
This change contains a prototype implementation for multitree. Several
interfaces and modules are added.

1. Imported/Exported
Modules implementing Exportable interface can export artifacts to other
components. "imported_filegroup" modules can import generated artifacts from other exported modules.

2. Multitree metadata
It contains information about imported/exported modules in each
component, and can be generated via "m update-meta".

3. cc library stub
It's based on prototype stub libraries. It uses imported/exported
mechanism to expose a C API, with a map.txt file and header files.

Bug: 230448564
Test: m
Change-Id: Id7ff7618e2c630c5617a564d8b23b60a1cc9c8e8
2022-04-28 08:20:10 +00:00
Treehugger Robot
fcf0b686aa Merge "Fix erroneous "Field requires API level 33 (current min is 32)" warnings" 2022-04-27 22:10:36 +00:00
Cole Faust
8b7f627f30 Fix erroneous "Field requires API level 33 (current min is 32)" warnings
Bug: 215567981
Bug: 204776549
Test: m out/soong/.intermediates/frameworks/base/framework-minus-apex/android_common/lint/lint-report.xml, then check that that file doesn't have any of these warnings
Change-Id: I39aa2228474630c93250bf5833ac6bd9bbadcc7f
2022-04-27 12:20:08 -07:00
Kousik Kumar
b018b83664 Add a warning message about missing gcert at the end of the build
Now that we are ready to rollout gcert, adding a warning that builds
will fail if gcert doesn't exist. Doing this only for builds with
ANDROID_BUILD_ENVIRONMENT_CONFIG=googler.

Test: Ran a build without gcert and USE_RBE=true and it printed the
warning.
Bug: b/229743321

Change-Id: I616a4a534ab277873ac7e19baecb78620f07854c
2022-04-27 15:16:41 -04:00
Trevor Radcliffe
4dc57a6d7b Merge "Refactor cc/bp2build.go to use parse helper" 2022-04-27 18:40:00 +00:00
Cole Faust
a59059f3a1 Merge "Ignore assignments to .KATI_READONLY" 2022-04-27 17:56:54 +00:00
Liz Kammer
eb5fc70c7b Merge "Delete some unused functions." 2022-04-27 17:36:09 +00:00
Muhammad Haseeb Ahmad
4e70b7586a Merge "Add jni support to java_fuzz_host" 2022-04-27 16:14:29 +00:00
Treehugger Robot
60fe34a79d Merge "Share CreateModule between hooks & mutators" 2022-04-27 16:00:35 +00:00
Treehugger Robot
b3f437ae7b Merge "Deduplicate classLoaderContexts field between two structs." 2022-04-27 14:53:14 +00:00
Treehugger Robot
266cf08ac6 Merge "Add buildinfo_prop module" 2022-04-27 13:00:36 +00:00
Ulya Trafimovich
442ec7fc07 Remove obsolete dexpreopt config option UseArtImage.
Bug: 170935728
Test: lunch aosp_cf_x86_64_phone-userdebug && m && lunch_cvd
Change-Id: Id83b9085794fd2ec338077ca909f84e04ccad041
2022-04-27 13:36:47 +01:00
Ulya Trafimovich
12164ded20 Deduplicate classLoaderContexts field between two structs.
This field is provided by the `dexpreopter` struct, which is a part of
`java.Module` and also had an identially named field. This created
confusion when the latter field was not properly copied into the former,
which resulted in not propagating class loader context, e.g. for static
library "androidx.preference_preference". This didn't cause class loader
context mismatch errors at boot previously, because the library didn't
have any uses-library dependencies before a recent prebuilt update.

Bug: 214255490
Test: lunch aosp_cf_x86_64_phone-userdebug && m && launch_cvd \
    && adb wait-for-device && adb root \
    && adb logcat | grep -E 'ClassLoaderContext [a-z ]+ mismatch'
    # empty output, no errors at boot
Change-Id: Ib818c5d2934d28817bb7a04b6114ae8b82a5c04d
2022-04-27 11:59:34 +01:00
Jingwen Chen
c172816439 bp2build: Denylist new module that has a dependency on unconverted go binaries.
Test: CI
Change-Id: I2763d3371f32850732303110fc13a5b44a4f14fe
2022-04-27 09:56:33 +00:00
Inseob Kim
4f1f3d97ca Add buildinfo_prop module
buildinfo_prop module is a replacement for build/make/tools/buildinfo.sh
so other images like microdroid can refer to build.prop.

For now, buildinfo_prop only supports a few build.prop properties, and
it's only used in microdroid.

Bug: 189164487
Test: build
Change-Id: I120654ca23a68de414df8da2051c6677afbab441
2022-04-27 14:10:52 +09:00
Cole Faust
9948d09b0c Merge "Ignore variable assignments that come after a rule definition" 2022-04-27 03:43:02 +00:00
Cole Faust
5d5fcc3092 Ignore assignments to .KATI_READONLY
Since the rbc results file is sorted, .KATI_READONLY
ends up trying to make a variable that hasn't been defined
yet readonly, which is an error.

It's not really worth supporting moving it down in the list,
because it wouldn't affect the variable being writable while
still in Starlark code.

Bug: 226974242
Test: go test
Change-Id: I9402f69be97e5c7cf010ad86f124422ea55fda7f
2022-04-26 18:02:05 -07:00
Treehugger Robot
7cb3f50fda Merge changes I8ef31373,Ic408857d
* changes:
  Disable newapi check in defaults
  Enforce newapi check only if min_sdk_version < compile_sdk_version
2022-04-27 00:55:56 +00:00
Cole Faust
9df1d73657 Allow seeing include $(x) when there is an include_top comment
Previously, seeing anything other than an interpolate variable
was not allowed.

Bug: 226974242
Test: go test
Change-Id: I48a060f9a3fd19cd67a114d2cb0756ab2be25ce1
2022-04-26 17:46:49 -07:00
Chih-hung Hsieh
863ebc3199 Merge "add ALLOW_LOCAL_TIDY_TRUE and some tests" 2022-04-27 00:19:03 +00:00
Cole Faust
00afd4f8b9 Ignore variable assignments that come after a rule definition
These private variables sometimes have references to make
variables like $< or $@. When converted to starlark, they
become invalid local variables like _< and _@, preventing
the file from being loaded even if it's never executed.

Bug: 226974242
Test: go test
Change-Id: Iafd4c6939731f3b7c051c9e41464134d5b672f23
2022-04-26 14:01:56 -07:00
Colin Cross
97d87760b4 Use --dependency-file when linking elf files.
Use the new --dependency-file flag for lld to produce a deps file.

Fixes: 137961579
Test: m checkbuild
Change-Id: I4e0724795a4237ef4560f814e5ef40e44591d776
2022-04-26 13:58:01 -07:00
Chris Wailes
d0fba50d71 Merge "Update RustDefaultVersion to 1.60.0" 2022-04-26 20:37:34 +00:00
Chih-Hung Hsieh
104f51f70b add ALLOW_LOCAL_TIDY_TRUE and some tests
* A new ALLOW_LOCAL_TIDY_TRUE variable, default is false.
* If it is 0/false, local "tidy:true" is ignored.
* If it is 1/true, local "tidy:true" is honored as it is now.

Bug: 229779921
Test: make with and without ALLOW_LOCAL_TIDY_TRUE=1
Change-Id: I0323289a4d3bb2514982252a5a1339e94f2bbaab
2022-04-26 13:30:32 -07:00
Cole Faust
a99afdfc22 Allow comparing $(wildcard) results to non-empty values
Also remove the file existence functions because they
can just be wildcards instead.

Bug: 226974242
Test: go test
Change-Id: Icbf65c47af97a710580864e8b76e2697aba96dd8
2022-04-26 12:06:49 -07:00
Muhammad Haseeb Ahmad
7e74405b2d Add jni support to java_fuzz_host
Bug: 219782880
Test: m example_java_fuzzer_with_native_lib, go test -run TestJavaFuzz
Change-Id: I1d05fb449e5378a27a0096869d9c12ca0a1245c6
2022-04-26 18:49:02 +00:00
Cole Faust
2005298b68 Convert includes/inherits inside evals
These occur in some vendor makefiles in
order to include files in a foreach loop.

Bug: 226974242
Test: go test
Change-Id: I59242eba9a2d7c659994556d9123b6481f4a8130
2022-04-26 10:44:08 -07:00
Liz Kammer
f31c90050c Share CreateModule between hooks & mutators
These contained duplicate code, but evolved separately in the effort to
identify module type of those created with CreateModule. This refactors
to share a common implementation between the two.

Test: m json-module-graph and verify Type fields
Test: CI
Change-Id: Ifdb9a006d9b1bef7411f9ce3a4384797693b4bfc
2022-04-26 09:08:55 -04:00
Christopher Parsons
be9b9deef9 Merge "Improve bazel action status mnemonics" 2022-04-25 20:57:17 +00:00
Liz Kammer
c2554b6df2 Delete some unused functions.
Test: cc soong tests
Change-Id: Ifa60cdd19aa9151656a6a9df295fe42ec1d8fd46
2022-04-25 16:00:17 -04:00
Treehugger Robot
e1d067b529 Merge "Update to clang-r450784d" 2022-04-25 18:21:38 +00:00
Spandan Das
397e910835 Disable newapi check in defaults
- Making newapi disabled by default will ensure that this lint check
  does not run on the platform. This prevents noisy lint warnings like b/228956345#1
- This lint check will continue to be enforced on the transitive deps of
  apexes, since lint.strict_updatability_linting will be true for those
  Soong modules

Test: TH
Test: m
out/soong/.intermediates/frameworks/base/services/core/services.core.unboosted/android_common/lint/lint-report.xml
// file no longer contains "Call requires API level ..." warning
Bug: 228956345

Change-Id: I8ef3137394011fb679a1129f80f6351fb05a4eff
2022-04-25 18:17:11 +00:00
Spandan Das
ba7e532a11 Enforce newapi check only if min_sdk_version < compile_sdk_version
- NewApi check should be enforced only if min_sdk_version is less than
  the compile_sdk_version (the opposite direction should be a different
  build-time error)
- Change the datatype of *sdkVersion to android.ApiLevel (from string)
  to support version comparisons

Test: go build ./java
Test: no changes in ninja file
Bug: 228956345

Change-Id: Ic408857db7760d912ef4694d2ed72c0b7106eb04
2022-04-25 18:12:50 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
126bd58e72 Handle cc_defaults' shared for cc_library_shared
Akin to testing for cc_defaults' `static`, we introduce
a `shared` sibling to
TestStaticLibrary_SystemSharedLibsStaticEmpty

Bug: 195451854
Test: TestCcLibrarySharedSystemSharedLibsSharedEmpty
Change-Id: I63cb0641d216e8c11586ecf415fa2441e31dd3e5
2022-04-25 17:24:33 +00:00