Commit graph

35760 commits

Author SHA1 Message Date
Anas Sulaiman
5dacf0f6dd fix RE for metalava actions
Some of those actions use unzip which is not available in the source
tree and needs to be installed in the container.

Bug: b/309783005
Test: Ran an android build and verified there are no local fallbacks from metalava actions.
Change-Id: I360c3fb30e2eacc0615ed636115bce011bff5bf3
2023-11-15 20:39:45 +00:00
Greg Kaiser
2c8ece0b25 Merge "Reland: Require TARGET_RELEASE for builds" into main 2023-11-15 13:42:18 +00:00
Justin Yun
59fbdf0bba Add .product suffix for the product variants
Instead of adding .vendor suffix, add .product suffix to include
product variants.

Bug: 309511650
Test: atest com.android.gts.vndk.VndkDependencyTest#testVndkDependencyTestCase
Change-Id: I6d578be95c618c565347f0fdf660e82945ac77a3
2023-11-15 14:59:39 +09:00
Alyssa Ketpreechasawat
c7bc53999d Merge "Remove jars in PRODUCT_APEX_BOOT_JARS_FOR_SOURCE_BUILD_ONLY (e.g. framework-pdf in MP) from ApexBootJars when prebuilt is enabled." into main 2023-11-14 19:13:32 +00:00
Justin Yun
136fa83d4e Merge "Define BOARD_API_LEVEL and BOARD_API_LEVEL_FROZEN" into main 2023-11-13 23:40:06 +00:00
Alyssa Ketpreechasawat
ba231d2084 Remove jars in PRODUCT_APEX_BOOT_JARS_FOR_SOURCE_BUILD_ONLY (e.g. framework-pdf in MP) from ApexBootJars when prebuilt is enabled.
framework-pdf is newly added framework jar which is not yet included in
the actual prebuilt apex. Thus, we add it PRODUCT_APEX_BOOT_JARS_FOR_SOURCE_BUILD_ONLY. The APEX_BOOT_JARS_EXCLUDED will be created based on PRODUCT_APEX_BOOT_JARS_FOR_SOURCE_BUILD_ONLY and will be removed from ApexBootJars.

Bug: 304719212
Test: lunch cf_x86_phone-next-userdebug & m
Test: lunch cf_x86_phone-trunk-userdebug & m
Change-Id: I9902131629900fbd629b8560a422ed8c2b06073c
2023-11-13 13:22:32 +00:00
Colin Cross
70ed34cc72 Merge "Escape sbom lines" into main 2023-11-11 03:22:11 +00:00
Colin Cross
92f8043874 Escape sbom lines
Go 1.21 changes the names of some factory functions to include
characters that need shell escaping.  Wrap everything written to
the sbom file with single quotes.

Bug: 309895579
Test: m out/target/product/vsoc_x86_64/sbom-metadata.csv
Change-Id: Ia61f02d8b02dd9f92ce144307087423c592a1833
2023-11-10 15:06:21 -08:00
Treehugger Robot
fc9ebd2684 Merge changes from topic "disable-dexpreopt-dexopt" into main
* changes:
  Add a Make variable to disable all dexpreopt and dexopt activities.
  Update dexopt system properties.
2023-11-10 18:47:19 +00:00
Justin Yun
23d52435f3 Define BOARD_API_LEVEL and BOARD_API_LEVEL_FROZEN
BOARD_API_LEVEL and BOARD_API_LEVEL_FROZEN are set by the release
flags.
BOARD_API_LEVEL sets ro.board.api_level that shows the API level of
the vendor API surface.
BOARD_API_LEVEL_FROZEN sets ro.board.api_frozen that shows if the
ro.board.api_level is finalized.

Bug: 295269182
Test: getprop ro.board.api_level
Change-Id: Ie57c57b6c9f1fc0c98968195843059a48da8e512
2023-11-10 16:31:04 +09:00
Colin Cross
481b02106c Merge "Skip parts of notice_files.mk that don't apply to Soong modules" into main 2023-11-10 06:15:45 +00:00
Juan Yescas
06b7b6c492 Merge "16k: Support max-page-size alignment greater than 4096 for x86-64" into main 2023-11-09 23:07:09 +00:00
Juan Yescas
ebadc969a8 16k: Support max-page-size alignment greater than 4096 for x86-64
To simulate 16k page size in x86-64 cuttefish, it is necessary
to compile the shared libraries and binaries with max-page-size greater
than 4096.

Bug: 309816695
Test: source build/envsetup.sh
      lunch aosp_cf_x86_64_phone_pgagnostic-trunk-userdebug
      m
Change-Id: Id8e142a5a3556f5fd30ce90eaac236dcbc1b0881
2023-11-09 12:51:30 -08:00
Cole Faust
b9b54396d4 Remove _kwmarker
python and starlark already have syntax for this.

Test: Presubmits
Change-Id: I9082c1cc62837840f091cd5856b1b4cc39064274
2023-11-09 12:40:38 -08:00
Greg Kaiser
0229ecfae5 Reland: Require TARGET_RELEASE for builds
Relanding because we've fixed a number of the broken build
setups this change exposed.  We will push to fix forward broken
build setups instead of reverting this change again.


Rather than use an unsupported flag setting that the user likely
doesn't even realize is being used, we immediately stop the build.

This error message is more verbose, mentioning 'lunch', because
it's anticipated a lot more users will hit this issue when first
switching to trunk stable, and more details will hopefully help
them out.

We have some complication in that some internal commands set
TARGET_RELEASE to an empty string.  We put in logic to allow
that path.

Since $(error) immediately stops the build, we also get rid of
some 'else' logic and indentation, to hopefully offset some of
the complication we've added.

Bug: 307946156
Change-Id: I0fa4a1c876e607401f4c7f945b9971cfb8db71a0
Test: 'lunch' (still) works; A build attempt without `TARGET_RELEASE` set (now) fails
2023-11-09 20:28:55 +00:00
Jiakai Zhang
bf0c0e6856 Add a Make variable to disable all dexpreopt and dexopt activities.
This change adds a Make variable "OVERRIDE_DISABLE_DEXOPT_ALL", which
disables all dexpreopt and dexopt activities.

This is for faster iteration during development and should never be
enabled for production.

Bug: 309011617
Test: See no dex2oat invocation during build.
Test: Boot and see no dex2oat invocation during boot, except for the
  in-memory boot image for JIT Zygote.
Change-Id: I0193b57fdb18e1fb717f44af81d1cf525f1609ee
2023-11-09 16:50:18 +00:00
Robin Lee
092c6b68b8 Merge "Revert "Require TARGET_RELEASE for builds"" into main 2023-11-09 08:49:25 +00:00
Robin Lee
50fe46c1d3 Revert "Require TARGET_RELEASE for builds"
This reverts commit 24366c842b.

Reason for revert: b/309900087

Change-Id: I36550cbb0ae21a9c4f783f8a2fcd08ade2707f68
2023-11-09 08:01:06 +00:00
Treehugger Robot
1f94a3d547 Merge "Require TARGET_RELEASE for builds" into main 2023-11-09 04:23:37 +00:00
Cole Faust
f50c26e6e3 Merge "Remove release_config.bzl" into main 2023-11-09 00:41:50 +00:00
Treehugger Robot
2b46f4d199 Merge "build: add a few proguard rules [1/3]" into main 2023-11-08 23:06:02 +00:00
Greg Kaiser
24366c842b Require TARGET_RELEASE for builds
Rather than use an unsupported flag setting that the user likely
doesn't even realize is being used, we immediately stop the build.

This error message is more verbose, mentioning 'lunch', because
it's anticipated a lot more users will hit this issue when first
switching to trunk stable, and more details will hopefully help
them out.

We have some complication in that some internal commands set
TARGET_RELEASE to an empty string.  We put in logic to allow
that path.

Since $(error) immediately stops the build, we also get rid of
some 'else' logic and indentation, to hopefully offset some of
the complication we've added.

Bug: 307946156
Test: 'lunch' (still) works; A build attempt without `TARGET_RELEASE` set (now) fails
Change-Id: I2f667668c6688e501a3536981b7bae5fdbf962a0
2023-11-08 11:20:28 -07:00
Cole Faust
9a106f3ebb Remove release_config.bzl
The internal usages have been switched to release_config.scl.

Bug: 309686282
Test: Presubmits
Change-Id: If8e5a5b94a47474f5e76cf189c41980402f31085
2023-11-08 10:11:03 -08:00
Cole Faust
bcaac55c35 Merge "Remove release_config.bzl load" into main 2023-11-08 07:46:54 +00:00
Cole Faust
6291522c70 Remove release_config.bzl load
This was mistakenly copy/pasted.

Test: Presubmits
Change-Id: I01dcf65464428d56c2246cf70f6e769e842f28b1
2023-11-07 21:05:37 -08:00
Treehugger Robot
8a5b9e4aa2 Merge "add product sepolicy into monitor list" into main 2023-11-08 03:28:35 +00:00
Adam Shih
894cf688a9 add product sepolicy into monitor list
Bug: 256065208
Test: lunch raven-next-userdebug
Change-Id: I016f0340aecdc15af485c9fd51d6c0120ee8908f
2023-11-08 00:51:04 +00:00
Cole Faust
9af1856e91 Merge "Rename bzl files to scl" into main 2023-11-08 00:49:34 +00:00
Treehugger Robot
bf25b080d6 Merge "Generate incremental OTAs for 16K/4K boot option" into main 2023-11-08 00:11:41 +00:00
Cole Faust
a44c7bd1ca Rename bzl files to scl
These files don't have anything to do with bazel, they just use starlark as a configuration
language. Bazel recently introduced the scl file extension to use for this format, which doesn't
have any bazel-specific symbols. Use that extension for our pure starlark files as well.

Bug: 309686282
Test: Presubmits
Change-Id: I7b08f342e7fb94405a52af0918ae6a7d542f3282
2023-11-07 15:30:39 -08:00
Yifei Zhang
e6d996479b build: add a few proguard rules [1/3]
- Introduce a new directory for some specific proguard rules.

kotlin.flags:
- Remove DebugMetadata
- Don't warn about missing non-runtime annotations

Test: build AOSP & test on internal
Bug: 309023911
Change-Id: Iee740b61a2afeba3482ff4e1f8213bd4cf46174a
2023-11-07 14:36:01 -08:00
LaMont Jones
2dae3d6b50 Reapply "release_config: build flags can be lists"
Allow a build flag definition to indicate that its value should be the
concatentation of assignements, rather than the final assigned value. In
this case, the "default" value from the flag definition is always
present as the start of the list.

The initial use case for this is RELEASE_ACONFIG_VALUE_SETS, where we
need apply multiple definition files that should be processed to arrive
at the final value.

Bug: b/302593603, b/304814040, b/309477343
Test: manual
Change-Id: I58eb71f2ee6d8f08f11a432993f23157831ec93c
2023-11-06 22:16:49 +00:00
LaMont Jones
38b195ea7e Reapply "Add support for product-specific build flags"
1. release config maps now specify where the flag definitions are found.
2. PRODUCT_RELEASE_CONFIG_MAPS specifies additional release config map
files to use.

This allows product config to specify build flags, which can then be
specified by users of that product.

Bug: b/302593603, b/309477343
Test: manual
Change-Id: Ic1f0512ec4b06ac94dd3f29eadd6a03ba8ebf6d2
2023-11-06 22:15:19 +00:00
Colin Cross
5f24ce6158 Merge "Revert "Reapply "Add support for product-specific build flags""" into main 2023-11-06 22:02:50 +00:00
Colin Cross
671bc15286 Revert "Reapply "Add support for product-specific build flags""
Revert submission 2815850-product-flags

Reason for revert: b/309477343

Reverted changes: /q/submissionid:2815850-product-flags

Bug: 302593603
Bug: 309477343
Change-Id: I6294609d4c60973fceba567e37a6bc3b89239e42
2023-11-06 21:39:40 +00:00
Colin Cross
93b43efd80 Revert "Reapply "release_config: build flags can be lists""
Revert submission 2815850-product-flags

Reason for revert: b/309477343

Reverted changes: /q/submissionid:2815850-product-flags

Bug: 302593603
Bug: 309477343
Change-Id: Ifda3b0cdfb3524595af693156c6dc162c391a55a
2023-11-06 21:38:26 +00:00
Treehugger Robot
1acc860f83 Merge "Export build flags to soong." into main 2023-11-06 21:07:21 +00:00
Kelvin Zhang
65c1162eb5 Generate incremental OTAs for 16K/4K boot option
Previously, the 16K/4K boot options OTAs are full OTAs, resulting in
file size of ~20MB each, and ~40M for both OTAs. To reduce the space
usage, use incremental OTAs instead.

Test: th
Bug: 302759296
Bug: 293313353
Change-Id: I61cc84c6c13f151dd6bc5ff37dd31daa5fb31abd
2023-11-06 12:37:49 -08:00
Cole Faust
7aa649a62c Add PRODUCT_VALIDATION_CHECKS
This is a new mechanism for asserting properties about your product
config. See the documentation in product_validation_checks.mk for
more information.

Test: Manually
Change-Id: I698dea899441f3773f839ea2ba1a2a6cfe59b57b
2023-11-06 10:42:01 -08:00
LaMont Jones
253bd067da Merge changes from topic "product-flags" into main
* changes:
  Reapply "release_config: build flags can be lists"
  Reapply "Add support for product-specific build flags"
2023-11-06 14:08:22 +00:00
Justin Yun
2071b4eac2 Merge "Set ro.product.vndk.version for VNDK v35" into main 2023-11-05 07:16:14 +00:00
Colin Cross
b5ec156b32 Merge changes I2ca9e674,I7e0db3c0,I7e1b6268,I0fa6a46e,I04e8178a into main
* changes:
  Remove code related to unused LOCAL_* variables
  Delete unused variables from clear_vars.mk
  Remove obsolete ide.mk and related code
  Removed unused license code
  Remove obsolete uses of LOCAL_MODULE_TAGS
2023-11-03 15:27:34 +00:00
Colin Cross
00d65a01a5 Skip parts of notice_files.mk that don't apply to Soong modules
Move the parts of notice_files.mk that set variables that are only
used for Make modules inside the conditional on
LOCAL_SOONG_LICENSE_METADATA.

Bug: 309006256
Test: no change to out/build-aosp_cf_x86_64_phone.ninja
Change-Id: I5dc5a4ed223c6c2cb13460f59d0e7a03d4c9d097
2023-11-02 19:48:46 -07:00
Wei Li
581b781ac4 Merge "Include following files in the SBOM of layoutlib, which are disted in Soong." into main 2023-11-02 22:17:30 +00:00
Anas Sulaiman
39ccc6378e Merge "fix potential encoding issues in remote actions" into main 2023-11-02 18:02:55 +00:00
Colin Cross
710c3cb5fb Remove code related to unused LOCAL_* variables
LOCAL_JETIFIER_ENABLED, LOCAL_NO_PIC, LOCAL_PREBUILT_STRIP_COMMENTS,
LOCAL_RMTYPEDEFS, and *.vts sources are never used.  Remove them
and the code related to them.

Test: no change to out/build-aosp_cf_x86_64_phone.ninja
Change-Id: I2ca9e674602057cc163b8bc28b0c57a0b7cc4361
2023-11-02 10:45:33 -07:00
Colin Cross
fda3c6a36a Delete unused variables from clear_vars.mk
Kati analysis in AOSP spends around 6 seconds in clear_vars.mk.
Delete any variables in clear_vars.mk that are not referenced anywhere
else in build/make/core.

Test: no change to build-aosp_cf_x86_64_phone.ninja
Change-Id: I7e0db3c02d297de825acbfbd1a0f05724d1e846d
2023-11-02 10:33:25 -07:00
Colin Cross
1b7f072505 Remove obsolete ide.mk and related code
The code to generate an eclipse classpath is obsolete, remove it and
related code.

Test: no change to out/build-aosp_cf_x86_64_phone.ninja
Change-Id: I7e1b6268b98ecbb7be88db8945dd7b30acc695ba
2023-11-02 10:16:57 -07:00
Colin Cross
34fe77a493 Removed unused license code
Nothing ever reads ALL_DEPS.*.LICENSE, and its an ever-growing list
that is sorted every time, which is extremely expensive.

notice_target is never set after I4cddf9a381a1258bdc2b1b42be72c447df10d234,
remove all the related code.

Test: no change to out/build-aosp_cf_x86_64_phone.ninja
Change-Id: I0fa6a46e62ef8aa78873b43d3064b57b1c54de51
2023-11-02 10:10:36 -07:00
Colin Cross
aed37d79f2 Remove obsolete uses of LOCAL_MODULE_TAGS
Only LOCAL_MODULE_TAGS := tests is used is meaningful in the current
implementation.  "optional" and "samples" both exist in the tree, but
are meaningless.  "gnu", "user", "eng" and "debug" are  no longer used,
and are already forbidden by the unusual tags check.  The info from the
"module" target is now available in module-info.json.  Delete all the
irrelevant code.

Test: no change to out/build-aosp_cf_x86_64_phone.ninja
Change-Id: I04e8178a362e382a1a4bd997c1b4c3a480db7714
2023-11-02 10:10:06 -07:00