Commit Graph

76092 Commits

Author SHA1 Message Date
Dennis Shen
cee1b3d984 Merge "Add dependency of liblazy_static" into main am: 10b38c4957
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2823411

Change-Id: Idb05a6bf7d6cd39ebca2dc7cd12d9ec545ed4443
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-09 20:46:35 +00:00
Treehugger Robot
05dafa1772 Merge "Sandbox CompilationTestCases_package-dex-usage" into main 2023-11-09 20:41:30 +00:00
Dennis Shen
10b38c4957 Merge "Add dependency of liblazy_static" into main 2023-11-09 20:03:41 +00:00
Greg Kaiser
a0b356f6b0 ndk: Hard-code the TARGET_RELEASE
Trunk stable builds require a TARGET_RELEASE to be set, but this
variable doesn't have a real meaning for NDK builds.  So we
hard-core it here so individual build setups don't need to
configure it.

Bug: 309900087
Test: Treehugger
Change-Id: I17a2e463db0b561aea57417bc2b469070ba2062d
2023-11-09 12:43:38 -07:00
Colin Cross
e7601cc83d Merge changes I4d0b27ba,Ic48e9cf2 into main am: 4ade19fe94
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2823833

Change-Id: I9defecedca8d3a1a9424b5a5f6ec38a65c66f1b9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-09 19:35:40 +00:00
Colin Cross
4ade19fe94 Merge changes I4d0b27ba,Ic48e9cf2 into main
* changes:
  Fix soong_ui file rlimits for go 1.21
  Fix TestReverseSlice for go 1.21
2023-11-09 18:47:40 +00:00
Jiakai Zhang
2398442ec0 Change OnlyPreoptBootImageAndSystemServer to OnlyPreoptArtBootImage.
OnlyPreoptBootImageAndSystemServer was for making the eng build faster.
This change makes it even faster.

Bug: 309011617
Test: Presubmit
Change-Id: If9001e99593b57deafa7b56f0ca6b3d4d80f56d3
2023-11-09 16:50:58 +00:00
Dennis Shen
ba6ed2d62a Add dependency of liblazy_static
Bug: b/307336730
Change-Id: I2c89b0f73787649408e2a23f3f308b3e0eb0c9ea
2023-11-09 15:07:04 +00:00
Alyssa Ketpreechasawat
a0cf0a4a66 Skip unknown check in bootclasspath_fragment (source version) if prebuilt version is in use.
Following aosp/2822531, when MediaProvider prebuilt is enabled, framework-pdf (new jar) will be removed from PRODUCT_APEX_BOOT_JARS. Subsequently there will be an error around the inconsistency (unknown) between bootclasspath_fragment (source version of MP with framework-pdf in its content) and PRODUCT_APEX_BOOT_JARS (framework-pdf removed). Since the source version of bootclasspath_fragment is not in use, we should ignore this check. See more detail in go/stale-mainline-prebuilts (issue from changes in framework/service jars in existing apexes).

Bug: 304719212
Test: lunch cf_x86_phone-next-userdebug & m
Test: lunch cf_x86_phone-trunk-userdebug & m
Change-Id: I0f62277a9e65522bf5a4ea1ae33c166f996c37d5
2023-11-09 12:54:09 +00:00
Colin Cross
611a2fbdd7 Fix soong_ui file rlimits for go 1.21
Go 1.21 modifies the file limit but restores the original when
execing subprocesses if it hasn't be overridden.  Call Setrlimit
even if it doesn't appear to be necessary so that the syscall package
considers it set.

Bug: 309895579
Test: m nothing
Change-Id: I4d0b27bac90a2a88bfc68a8491d54dc106e1ec13
2023-11-08 22:11:28 -08:00
Colin Cross
f2fab8347d Fix TestReverseSlice for go 1.21
Go 1.21 does a better job using the same empty allocation for empty
slices, check for cap > 0 before requiring slices to have different
backing arrays.

Bug: 309895579
Test: TestReverseSlice
Change-Id: Ic48e9cf2c95ea0b810a11cdc4a794a70c02a0a61
2023-11-08 22:11:24 -08:00
Seungjae Yoo
a30e450ba0 Add security_patch avb property for android_filesystem
If android_filesystem module is used with use_avb, defined
security_patch for the rollback protection.

Bug: 285855436
Test: m
Test: avbtool info_image --image <IMAGE>
Change-Id: I32c6108bb1aca398ced5e46b615d937685e261a7
2023-11-09 14:55:44 +09:00
Cole Faust
98f2f2c771 Sandbox hidl genrules
go/roboleaf-busy-beavers-sandboxing

Most of these genrules work out of the box with sandboxing, I'm not sure why they were added.
However hidl_hash_test_gen needs a fix, and hidl2aidl_translate_cpp_test_gen_src produces
nondeterministic results even without sandboxing.

Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py hidl2aidl_test_gen_aidl hidl2aidl_translate_cpp_test_gen_headers hidl2aidl_translate_cpp_test_gen_src hidl2aidl_translate_java_test_gen_src hidl2aidl_translate_ndk_test_gen_headers hidl2aidl_translate_ndk_test_gen_src hidl_cpp_impl_test_gen-headers hidl_cpp_impl_test_gen-sources hidl_error_test_gen hidl_export_test_gen-headers hidl_format_test_diff hidl_hash_test_gen hidl_hash_version_gen hidl_java_impl_test_gen
Change-Id: Ia865ba3ed9b1ede21b440c3b640fcdb5d7661c9d
2023-11-09 04:44:33 +00:00
Spandan Das
e48000d86f Merge changes from topic "apex_contributions_build_flags" into main am: c31b24977e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2808754

Change-Id: Ia7b7a22e9be58e37db8d188eff8cda2a8dc408e8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-09 01:58:15 +00:00
Spandan Das
c31b24977e Merge changes from topic "apex_contributions_build_flags" into main
* changes:
  Special-case java_sdk_library in source vs prebuilt selection
  Use `all_apex_contributions` for source/prebuilts selection
  Create a singleton all_apex_contributions module type
2023-11-09 01:31:57 +00:00
Cole Faust
7ec1a57d09 Sandbox libtextclassifier genrules
go/roboleaf-busy-beavers-sandboxing

Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py libtextclassifier_fbgen_actions_actions-entity-data libtextclassifier_fbgen_actions_actions_model libtextclassifier_fbgen_annotator_datetime_datetime libtextclassifier_fbgen_annotator_entity-data libtextclassifier_fbgen_annotator_experimental_experimental libtextclassifier_fbgen_annotator_model libtextclassifier_fbgen_annotator_person_name_person_name_model libtextclassifier_fbgen_lang_id_common_flatbuffers_embedding-network libtextclassifier_fbgen_lang_id_common_flatbuffers_model libtextclassifier_fbgen_utils_codepoint-range libtextclassifier_fbgen_utils_container_bit-vector libtextclassifier_fbgen_utils_flatbuffers_flatbuffers libtextclassifier_fbgen_utils_flatbuffers_flatbuffers_test libtextclassifier_fbgen_utils_grammar_rules libtextclassifier_fbgen_utils_grammar_semantics_expression libtextclassifier_fbgen_utils_grammar_testing_value libtextclassifier_fbgen_utils_i18n_language-tag libtextclassifier_fbgen_utils_intents_intent-config libtextclassifier_fbgen_utils_lua_utils_tests libtextclassifier_fbgen_utils_normalization libtextclassifier_fbgen_utils_resources libtextclassifier_fbgen_utils_tflite_text_encoder_config libtextclassifier_fbgen_utils_tokenizer libtextclassifier_fbgen_utils_zlib_buffer
Change-Id: I663384df9b36ea5e7d62278c2d0b3331634e1b4e
2023-11-08 15:44:54 -08:00
Treehugger Robot
46621bbae6 Merge "Assign default bug component to targets in this directory." into main am: 38ec22a816
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2817577

Change-Id: I464fdf85936f3a82942e320286b309eac104a140
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-08 19:31:27 +00:00
Dan Willemsen
651c415b72 Merge "Update the minimum macos deployment version to 10.14" into main am: f051ec6de2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2821057

Change-Id: I79c5910160383ffb10fee7cf893f7e126bfbc5fd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-08 19:24:45 +00:00
Treehugger Robot
38ec22a816 Merge "Assign default bug component to targets in this directory." into main 2023-11-08 18:52:32 +00:00
Dan Willemsen
f051ec6de2 Merge "Update the minimum macos deployment version to 10.14" into main 2023-11-08 18:46:51 +00:00
Cole Faust
4c5b4cd2e8 Sandbox CompilationTestCases_package-dex-usage
go/roboleaf-busy-beavers-sandboxing

Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py CompilationTestCases_package-dex-usage
Change-Id: I8cfc445bb10dfe8344e8dd4e7085f474004314af
2023-11-08 10:38:15 -08:00
Spandan Das
fc12d2f494 Special-case java_sdk_library in source vs prebuilt selection
If a java_sdk_library is listed in `contents`, then restrict the source
vs prebuilt selection superseding to only the internal stub libraries.

Defer the source vs prebuilt selection mechanism of the top-level
library to the existing mechanisms for now. This is necessary because
this top-level library acts as a hook for
- hiddenapi: boot jars are deapxed from the prebuilt apex
- dexpreopt: system server jars are deapexed from the prebuilt apex and
  installed via required

If `next` uses `framework-foo` and `service-foo` as the top-level
library instead of the prebuilt equivalents, then the bootjars installed
in out/soong/dexpreopt_x86_64/apex_bootjars will come from source. And
the *.odex files of the system server jars will come from source.

Bug: 308174768
Test: Added a java_sdk_library unit test to assert that the new
mechanism supersedes the `prefer` flag

Change-Id: Ib43198a3b547c58b54f1f0966e95584215096d32
2023-11-08 18:37:24 +00:00
Spandan Das
1c4d94dccf Use all_apex_contributions for source/prebuilts selection
This flattened singleton module explicitly lists by module name whether source or
prebuilt version of a module should be used. If a module appears in this
metadata module, it supersedes all other source vs prebuilts selection
mechanism

Implementation details
- Update the module dep chain from <source> --> <prebuilt> to <source>
  --> <prebuilt> --> all_apex_contributions
- all_apex_contributions sets a provider which is bubbled up
  to the source module. This requires changing `prebuilt_select` to a
  bottom up mutator
- Update `usePrebuilt` to consult the new provider before falling back
  to existing source vs selection mechanisms. If (foo|prebuilt_foo) is
  listed in the selected `apex_contributions` modules, it
  will be used superseding any other selection mechanisms.
- Update this depTag to IsMetaDepTag so that bootclasspath_fragment's
  validation ignores this new dependency.

Test: Added unit tests to assert that this new mechanism supersedes
`use_source_config_var`

Bug: 308174768
Change-Id: I39a85639642711f3c96b6f18b94d626b55e80c66
2023-11-08 18:37:24 +00:00
Spandan Das
e3fcb41ff7 Create a singleton all_apex_contributions module type
This will be a container for the the apex_contributions
selected using build flags. This module will be used to query the state of
selected apex contributions instead of a global that can be mutated by
anyone.

It will set a provider containing metadata for source vs prebuilts
selection. To reduce the overhead of a new mutator, this will be done in
the existing `prebuilt_select` mutator.

It will validate that there are no dups (`foo` and `prebuilt_foo` cannot
be both selected)

Bug: 308174923

Test: go test ./android

Change-Id: Ie42999a71f35d70e0e977f5ab07ce451608d9f35
2023-11-08 18:37:18 +00:00
Ronish Kalia
7e30bf00e2 Assign default bug component to targets in this directory.
This CL is being created to improve the test attribution in android. It has
been found that the tests owned by this OWNERS are not not being attributed
to a buganiser component.
This is part of a bigger effort to attribute all of the aosp code. 

If you think that the buganiser component is not correct please update
this CL with correct component and drop a +2. We will use the updated component and merge the CL

Bug: 309090038
Change-Id: Ia9dbd8ada1fc9c3ab358c8992d804925f6719f3c
Test: N/A
2023-11-08 16:19:51 +00:00
Jiakai Zhang
f3c1e6f8fe Merge "Use the correct mainline BCP jars for app dexpreopt." into main am: 04445d5443
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2816578

Change-Id: I533792e84af2417c260b5f9afcc6387f78eb16b0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-08 11:26:01 +00:00
Jiakai Zhang
04445d5443 Merge "Use the correct mainline BCP jars for app dexpreopt." into main 2023-11-08 10:56:58 +00:00
Anton Hansson
ca3bfaba87 Merge "Stop suppressing the ChangedDefault error" into main am: d69b5ff1b2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2818838

Change-Id: I28b3f68058d8f5e4951ef2e845906dbbe873bbfd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-08 10:49:28 +00:00
Anton Hansson
d69b5ff1b2 Merge "Stop suppressing the ChangedDefault error" into main 2023-11-08 10:23:42 +00:00
Treehugger Robot
1d6e69cda7 Merge "Export build flags to soong." into main am: 2ab031f467
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2803674

Change-Id: I4904c9cd21307c4d690f683b3c9c1ecdbc600052
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-08 04:44:06 +00:00
Jooyung Han
eb421ee86e Deprecate 'contributions' field from linkerconfig
Linkerconfig's contribution feature was introduced in Android T, but
it's not used actively (probably, never used?). Let's deprecate it. Note
that its runtime behavior is kept to support any potential uses.

Bug: 309716069
Test: linkerconfig_diff_test
Test: Add "contributions" field to an apex, build it.
      It should fail with an error message.
Change-Id: Icb91919142de14696219308674f1b3ac3e2d029b
2023-11-08 13:38:36 +09:00
Jihoon Kang
2a929ad250 Revert^2 "Default from-text stub generation in build"
This change defaults Java stubs to be generated from API text files
during build. Using the `--build-from-source-stubs` flag, users can
toggle between the feature.

This change relands aosp/2617457.

Test: m nothing && verify ninja path exists between android_stubs_current and android_stubs_current.from-text, and does not exist between android_stubs_current.from-source, m nothing --build-from-source-stub && verify the opposite
Bug: 301522358
Change-Id: Ic129dafc3231e71470af982374739930947b69cb
2023-11-08 04:25:52 +00:00
Treehugger Robot
2ab031f467 Merge "Export build flags to soong." into main 2023-11-08 04:15:17 +00:00
Inseob Kim
e4e85d5f9f Export build flags to soong.
This exports a map of build flags used in this release config to Soong.

Bug: 302514918
Test: manual
Change-Id: Id95c03e14cfbb91c0cb9c8c37a065b8387733317
2023-11-08 04:01:38 +00:00
Treehugger Robot
9865ce419b Merge "Only enable MLGO for ARM64 ThinLTO targets" into main am: 6a8eb37d90
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2817703

Change-Id: I7e49577418fdf4f564534f73b15e064318585df2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-08 03:32:00 +00:00
Treehugger Robot
6a8eb37d90 Merge "Only enable MLGO for ARM64 ThinLTO targets" into main 2023-11-08 02:51:16 +00:00
Treehugger Robot
0b7bebe722 Merge changes from topic "apex-elf-checker" into main am: a19c9141aa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2817254

Change-Id: I312c558d2b589005319d9cbdcdd6dc99b1ab5837
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-08 02:19:26 +00:00
Dan Willemsen
876b12ffdd Update the minimum macos deployment version to 10.14
Bug: 191879468
Test: Build aosp-build-tools on Mac
Change-Id: I21c3d0482ba9a23b2b54849eccb18c7958559d93
2023-11-08 02:11:27 +00:00
Treehugger Robot
a19c9141aa Merge changes from topic "apex-elf-checker" into main
* changes:
  Add check for unwanted_transitive_deps
  Add JoinWithPrefixSuffixAndSeperator() utility
2023-11-08 01:50:01 +00:00
LaMont Jones
03dd1407e7 Merge "Readd support for PRODUCT_RELEASE_CONFIG_MAPS" into main am: 2e55729650
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2818662

Change-Id: Ie81297effd58fafc848d7bd73f52a6ce3664ea8d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-07 20:18:25 +00:00
Treehugger Robot
c3e8223cc3 Merge "Create an apex_contributions module type" into main am: 29f5f2574d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2808370

Change-Id: Ib92c3cdf7add730d191f5fedf42b098eab3f6837
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-07 20:17:45 +00:00
LaMont Jones
2e55729650 Merge "Readd support for PRODUCT_RELEASE_CONFIG_MAPS" into main 2023-11-07 20:12:50 +00:00
Treehugger Robot
29f5f2574d Merge "Create an apex_contributions module type" into main 2023-11-07 19:49:52 +00:00
Treehugger Robot
6d7c86862b Merge "Sandbox nos genrules" into main am: 75f20f38b1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2817729

Change-Id: I2e95661058cc7c29bde17169556fe4930f1f8263
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-07 19:39:40 +00:00
Treehugger Robot
75f20f38b1 Merge "Sandbox nos genrules" into main 2023-11-07 19:10:19 +00:00
LaMont Jones
9a9128610b Readd support for PRODUCT_RELEASE_CONFIG_MAPS
This allows product config to determine what build flags are present in
a product's build, as well as their value.

As product config moves to a declarative specification, this can be
handled with less unnecessary work.

Bug: b/302593603, b/308849337, b/309477343
Test: manual
Change-Id: Ic0551990864bba6d03b6bf49fcfd4ae2523d9c6d
2023-11-07 18:39:40 +00:00
Anton Hansson
35f97155c7 Merge "Add a new flag to stop disabling lint errors" into main am: bf3e32d870
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2816560

Change-Id: Id9090e39d1a9716be323f4689a8678c98bceefe3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-07 16:27:05 +00:00
Anton Hansson
bf3e32d870 Merge "Add a new flag to stop disabling lint errors" into main 2023-11-07 16:01:29 +00:00
Anton Hansson
59ef1ec1f5 Stop suppressing the ChangedDefault error
This will prevent future breakages of this kind, so reenable the check.

Bug: 223382732
Test: m checkapi
Change-Id: I5e67ed45e3a78b90de6884a0d7b0b1c91d58b6f5
2023-11-07 15:44:14 +00:00
Anton Hansson
fd1c0d2eaa Add a new flag to stop disabling lint errors
java_sdk_library has historically suppressed a few legitimate lint
errors. Make it possible to remove these suppressions via a flag.

Bug: 306806877
Test: checkapi
Merged-In: I10577dacbd7ea8063c6e1e02f3b6c60a2bee5094
Change-Id: I10577dacbd7ea8063c6e1e02f3b6c60a2bee5094
2023-11-07 10:14:50 +00:00