Commit graph

30 commits

Author SHA1 Message Date
LaMont Jones
91fa4323c8 Do not use build/trunk_release/release_config_map.mk
We won't be adding build/trunk_release to the manifest.

Bug: 328495189
Test: TH
Change-Id: I0ef2a900568daccfbd2ef1d8949674e6f2a63e00
2024-03-29 14:50:50 -07:00
LaMont Jones
76452d8b40 Defer "no such release config" error
This allows product-specific release config maps to declare release
configs.

Bug: 328495189
Test: manual
Change-Id: I862f167062ee647af00a4ec7d4af2966c6be44a8
2024-03-20 12:24:21 -07:00
LaMont Jones
451abd6a06 Allow duplicate release config maps and build flag declarations
Only include a release_config_map.mk file the first time it appears in
the list.

If the flag declaration is identical to one already declared, do not
raise an error.

This eases the process of migrating where flags are declared.

Bug: b/328781415
Bug: b/328495189
Test: manual, TH
Change-Id: I18316e769438f62071723771762d6e89be98b813
Merged-In: I18316e769438f62071723771762d6e89be98b813
2024-03-18 07:43:04 -07:00
LaMont Jones
318dafeca0 Look for release_config_map.mk in more projects
This allows us to split up build/release for better clarity.

Bug: b/328495189
Test: manual
Change-Id: If810780de164b74c3e3ebc35260384843de2c084
2024-03-08 12:02:15 -08:00
LaMont Jones
61b0f799e2 Add alias-release-config function
This should be used to declare that a release config is an alias for
another one.  Aliases have no release config files of their own, and are
primarily used to simplify continuous integration as releases happen.

Bug: None
Test: manual
Change-Id: Ife5eb1f8f4bf8e06832dc55bbc390ce2f741ebb8
2024-01-30 23:07:15 +00:00
LaMont Jones
55d5fc504b Override release configs in depth
When overriding a release config, make sure that the overriden config is
fully present (by processing any of its overrides) before overriding it.

Bug: None
Test: manual
Change-Id: I8d29c7ee7208acf7fe63876f617c5b9e2c26c434
2024-01-30 23:06:08 +00:00
LaMont Jones
a6b6e67e3b Allow overrides in declare-release-config
A release config declaration may indiciate that one or more other
release configs should be applied before this one overrides them, so
that we don't have to manually keep common flags in sync.

Bug: b/313479515
Test: manual
Merged-In: Ib7350500ae44adf4767aa7f9dbb8e71609fdd8c0
Merged-In: Ida444a5dbba578a36bd3607246fa14fc73b3f923
Change-Id: Ida444a5dbba578a36bd3607246fa14fc73b3f923
2023-11-27 22:02:56 +00:00
Greg Kaiser
2c8ece0b25 Merge "Reland: Require TARGET_RELEASE for builds" into main 2023-11-15 13:42:18 +00: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
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
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
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
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
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
LaMont Jones
df398d19d4 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.

This reverts commit 75bfc37ef4.

Bug: b/302593603
Test: manual
Change-Id: I031a00459893644d7f67b63b982db9ae9015ae4d
2023-11-02 15:56:03 +00:00
Colin Cross
75bfc37ef4 Revert "Add support for product-specific build flags"
Revert submission 2787001-product-build-flags

Reason for revert: Possible cause of b/308849337

Reverted changes: /q/submissionid:2787001-product-build-flags

Bug: 302593603
Bug: 308849337
Change-Id: I01b5905a0a20a1401dcc1267e7fafc893e57d637
2023-11-02 00:13:30 +00:00
LaMont Jones
c6631fed48 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
Test: manual
Change-Id: I660a3d88c2aaecc14d6f370bebb0d05a8cc224f2
2023-10-30 23:40:04 +00:00
Greg Kaiser
6c1723254e Revert "Give an error when trying to build "next" targets"
This reverts commit f5eaf3cff3.

Reason for revert: -next targets are now healthy
Bug: 294161396

Change-Id: Idd61fd65d59a90057db9d6909267f5550cd5b2fe
2023-09-15 14:46:54 +00:00
Greg Kaiser
f5eaf3cff3 Give an error when trying to build "next" targets
The "next" targets aren't supported yet, so we want to fail
immediately.

If the environment variable TESTING_TARGET_RELEASE_NEXT is
set, then we'll allow a "next" build, so folks can work on
fixing this in the meantime.

Bug: 294161396
Test: "lunch mokey-next-userdebug" with and without TESTING_TARGET_RELEASE_NEXT set
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:f40be02ee51dec1bd5cdf88a4419684585ef6ef3)
Change-Id: If478a4efef937a0a986bfefdb61cc25921863b25
2023-08-10 16:26:12 +00:00
Joe Onorato
6aa48f8c5f Rename device_config --> aconfig and definitions --> declarations
Bug: 285303012
Test: for x in next trunk trunk_food trunk_staging ; do lunch aosp_panther-$x-eng ; m nothing ; done
Change-Id: I174ce3e609fa9077ea6bc61679ddb83e8efe57c8
2023-06-21 15:18:15 -07:00
Joe Onorato
1f6555151e Allow and merge multiple release configs with the same name
For now (to prevent build breakages when this is submitted), duplicate
flag values are allowed, but that will be disallowed once this change
automerges everywhere.

Bug: 286689485
Test: Treehugger
Change-Id: I723340ff9751b61d33c4108b0cc2f90702a116c9
2023-06-12 23:29:25 -07:00
Joe Onorato
d6df20a058 Clean up the API for release config in starlark
Also gets the json summaries working again.

Bug: 283477392
Test: Manual
Merged-In: Iaeb840e96bd7fef2fa1492cb55d9688f7ca75858
Change-Id: I05d9b816ad7ad30c1d238d01df811426d9aeddcb
2023-06-11 07:58:22 -07:00
Cole Faust
386b3746ce Define release flags in starlark instead of make
So that we have a more restricted enviornment for this new configuration
axis that can also be imported into other tools more easily.

Test: Manually (this time also tested setting OUT_DIR outside of the tree)
Change-Id: I01d90e06e45cba756156af16f63e04f575877263
2023-06-09 13:10:05 -07:00
Joe Onorato
7b578d32f9 Revert "Define release flags in starlark instead of make"
This reverts commit c113a70221.

Doesn't work with OUT_DIR hard coded outside the tree.

Test: OUT_DIR=/source/whatever m
Bug: 283278495
Change-Id: I8cc74a9ec936b9c7502b97b9b7a4fd731988c407
2023-05-19 09:22:42 -07:00
Cole Faust
c113a70221 Define release flags in starlark instead of make
So that we have a more restricted enviornment for this new configuration
axis that can also be imported into other tools more easily.

Test: Manually
Change-Id: Iabce1919f6d6f57a256ae144784af7c47622b54d
2023-05-16 15:46:55 -07:00
Joe Onorato
0d1a98106a Add aconfig rules
Test: treehugger
Change-Id: I456f87894926287a91d42e738016ca8052cd5039
2023-05-15 15:38:49 -07:00
Joe Onorato
964f401281 Add release flag logic based on TARGET_RELEASE.
Test: Lots of manual testing
Change-Id: I9072f136e64576009d0debd057c8ce6918fae861
2023-05-11 12:53:36 -07:00