Commit graph

80424 commits

Author SHA1 Message Date
Jingwen Chen
6f4963b99f Fix b with zsh (again), remove shwordsplit use.
Context: zsh doesn't do string splitting like bash, so it passes the
post-processed bazel args to bazel as a single arg. So this CL adds a
conditional to split explicitly with zsh using the {=<arg>} flag
syntax.

Reference: https://zsh.sourceforge.io/FAQ/zshfaq03.html (for shwordsplit)
Reference: https://zsh.sourceforge.io/Guide/zshguide05.html (Section 5.4.4)

For bash, this uses array[@] to split the list into separate
shell words.

Test: zsh; source build/envsetup.sh && b test
//system/logging/logd:logd-unit-tests --config=linux_x86_64
Test: bash; source build/envsetup.sh && b test
//system/logging/logd:logd-unit-tests --config=linux_x86_64

Change-Id: Id92462661bbe1799a6de8dd3393799d91e3044e8
2022-09-12 14:31:37 +00:00
Treehugger Robot
4f9a6abf59 Merge "move lunch specific tests to separate file" 2022-09-10 00:09:27 +00:00
Sam Delmerico
4f4d069efa move lunch specific tests to separate file
This is in preparation to add some more tests to this file.

Test: build/make/tests/envsetup_tests.sh
Change-Id: Ic32115d2a6073f3265b84846f489f3acb8bfad88
2022-09-09 17:27:22 -04:00
Treehugger Robot
eac1c8c616 Merge "core: Drop support for BOARD_PREBUILT_PVMFWIMAGE" 2022-09-09 20:52:07 +00:00
Pierre-Clément Tosi
cb1d31c43b core: Drop support for BOARD_PREBUILT_PVMFWIMAGE
Remove the variable as it was only used when the prebuilt was
device-specific but pvmfw is now part of AOSP.

Bug: 237371962
Test: m $(realpath --relative-to=. $ANDROID_PRODUCT_OUT/pvmfw.img)
Change-Id: I5b4c1ffd563e3dccf22ee485cb12866355f5bfe0
2022-09-09 19:15:30 +01:00
Treehugger Robot
085a34b963 Merge "Fix b with zsh." 2022-09-09 13:01:26 +00:00
Jingwen Chen
4ed082f61b Fix b with zsh.
zsh doesn't do string splitting like bash, so it passes the
post-processed bazel args to bazel as a single arg. So this CL adds a
conditional to do the splitting correctly for zsh with `setopt
shwordsplit`.

Reference: https://zsh.sourceforge.io/FAQ/zshfaq03.html

For bash, this uses array[@] to split the list into separate
shell words.

Test: zsh; source build/envsetup.sh && b test
//system/logging/logd:logd-unit-tests --config=linux_x86_64
Test: bash; source build/envsetup.sh && b test
//system/logging/logd:logd-unit-tests --config=linux_x86_64

Change-Id: I4e19a062b7f7e119b1612a8ce5c801878378cc69
2022-09-09 07:24:41 +00:00
Yihan Dong
46ee66c098 Merge "Assign each xts test package a copy license metadata" 2022-09-09 00:56:42 +00:00
Treehugger Robot
6910960cc7 Merge "Add kernel license text." 2022-09-08 20:29:23 +00:00
Bob Badour
a60beeefc3 Add kernel license text.
Bug: 244521066

Test: m droid dist

Change-Id: Ie7052d97cbe11df8f6a184663903e66ae5cd5752
2022-09-08 10:31:21 -07:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
fcf791f787 Merge "Add check_elf_file to BUILD.bazel" 2022-09-08 14:00:42 +00:00
Anton Hansson
59699234bc Merge "Make banchan support arm64only and x86_64only" 2022-09-08 10:57:34 +00:00
Yike Zhang
6ba1c7b6c3 Merge "Export Java libraries into module-info" 2022-09-08 10:46:59 +00:00
Inseob Kim
5c60e24509 Merge "Check same vndk variants when builing vndk_package" 2022-09-08 09:31:25 +00:00
Yike
82f0a2d751 Export Java libraries into module-info
Some Java modules are defined in Android.mk and they declare
dependencies in eigther LOCAL_STATIC_JAVA_LIBRARIES or
LOCAL_JAVA_LIBRARIES. This information needs to present in
module_info.json and be exported to properly generate Bazel targets
that include these dependencies.

Test: m out/target/product/coral/module-info.json
Bug: 245686435
Change-Id: I77bc8de59f1d46bb098463066e1f52b98ebae955
2022-09-08 07:59:20 +00:00
Treehugger Robot
79344c3698 Merge "Allow passing in payload signer for ota signing." 2022-09-08 06:52:34 +00:00
Baligh Uddin
968b961fb6 Allow passing in payload signer for ota signing.
BUG: 244632678
Test: TH
Change-Id: I12c45ac378a0d4c58b146115bc69b8e6d85a3075
2022-09-08 02:17:58 +00:00
Treehugger Robot
3cb8cbd4ab Merge "Clear out old license package name, if any." 2022-09-08 00:44:06 +00:00
Treehugger Robot
c0b090d805 Merge "Add a tool to merge two partial OTAs" 2022-09-07 23:13:23 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
1004dcaf82 Add check_elf_file to BUILD.bazel
In supporting cc_prebuilt_binary building with Bazel, we
need to enable Bazel to be able to introspect and build
the check_elf_files.py tool, originally built via make

Bug: 241415823
Test: b build '//build/make/tools:check_elf_file'
Change-Id: I4eeae86f683c678809e84edc2fee88f9d2436f9f
2022-09-07 22:24:33 +00:00
Treehugger Robot
bb56d32071 Merge "Buildify make/tools/BUILD" 2022-09-07 21:13:20 +00:00
Kelvin Zhang
197772f069 Add a tool to merge two partial OTAs
Some partners have large number of products that share common
images. Generating OTAs for all these products waste a lot of CPU
cycles, because we waste time diffing the same images multiple times.
To mitigate this, add a tool for merging partial OTAs. Partners can
generate a partial OTA for common images, and re-use the generated OTA
by merging with each product specific OTA.

Bug: 227848550
Test: Run merge_otas.py on 4 OTAs, install the generated OTA

Change-Id: Ie38d522cdc9b89b1123b3d8190516c3648f99788
2022-09-07 20:35:46 +00:00
Bob Badour
b18d9852c8 Clear out old license package name, if any.
Bug: 244574519

Test: m droid dist
Change-Id: I4daa18dc9bdbea30cff3098eca5fc0eb7e5739af
2022-09-07 11:58:53 -07:00
Anton Hansson
fe9d1d316d Merge "add module_x86_64only product" 2022-09-07 12:00:10 +00:00
Inseob Kim
ad503c265c Check same vndk variants when builing vndk_package
Since the vndk apex is introduced, same vndk variants check has stopped
when building vndk_package, and it's performed only with checkbuild.

Bug: 244654349
Test: m vndk_package
Change-Id: Iee30b5df75565c024f93d40bc6eaa7a729c2e09c
2022-09-07 20:02:30 +09:00
Anton Hansson
25ce929205 Merge "add module_arm64only product" 2022-09-07 10:36:46 +00:00
Yihan Dong
9b75c9ee1a Assign each xts test package a copy license metadata
Use a copy license metadata instead of module_license_metadata to make each xts test package names shown in the final xts notice file.

Test: m gts reportmissinglicenses
Bug: 245474938
Change-Id: Ic5e28763bc4e8448d3e04a80e89db147387164a6
2022-09-07 08:12:37 +00:00
Treehugger Robot
87d272251c Merge "Refactor ota_utils to reduce dependency on global OPTIONS" 2022-09-07 02:22:00 +00:00
Kiyoung Kim
12d4cbf027 Merge "Replace dependencies from the Makefile to API imported modules" 2022-09-07 00:48:15 +00:00
Kelvin Zhang
bf01f8b3f0 Refactor ota_utils to reduce dependency on global OPTIONS
Move some depency on global OPTIONS to parameters. This makes it easier
for other modules to re-use these functions w/o having to modify OPTIONS
variables before/after calling.

Test: th
Bug: 227536004
Change-Id: I3bab292f65a4222f0c9502bcf04fa7a85f8124c6
2022-09-06 23:51:20 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
cc8cd1242d Buildify make/tools/BUILD
Test: None
Change-Id: I5c4bb37d444835a3f1bc242fb71c058250aa8799
2022-09-06 19:41:20 +00:00
Treehugger Robot
2a9b910bf4 Merge "Rename mkf2fsuserimg.sh and mksquashfsimage.sh" 2022-09-06 18:42:31 +00:00
Anton Hansson
90ac61c8b6 Make banchan support arm64only and x86_64only
Test: banchan arm64only
Test: banchan x86_64only
Change-Id: I1a787a4c5d80db18d7712d257e196dc19f3496b7
2022-09-06 16:26:10 +00:00
Sam Delmerico
eab83032ae add module_x86_64only product
64bit only systems won't load modules with mixed 32/64 binaries. We need
a 64bit only product to build with.

Bug: 205990590
Test: lunch module_x86_64only && m
Test: vendor/google/build/build_mainline_modules.sh
Change-Id: I906f6cd10882986c8182ed16916e07c0f0d8b32e
Merged-In: I906f6cd10882986c8182ed16916e07c0f0d8b32e
2022-09-06 14:35:03 +00:00
Sam Delmerico
8b9539324a add module_arm64only product
64bit only systems won't load modules with mixed 32/64 binaries. We need
a 64bit only product to build with.

Bug: 205990590
Test: lunch module_arm64only && m
Change-Id: I050a673bfa95978e624e64004089fe7a2b8e0a95
Merged-In: I050a673bfa95978e624e64004089fe7a2b8e0a95
2022-09-06 14:34:27 +00:00
Cole Faust
b000208877 Rename mkf2fsuserimg.sh and mksquashfsimage.sh
See other cl in this topic for more information.

Bug: 198619163
Test: Presubmits
Change-Id: Ib39e8513a303a12e8bb6464a114ec39aa087d58a
2022-09-05 18:34:56 -07:00
Treehugger Robot
7aad536922 Merge "Add security patch level param to otatools" 2022-09-02 20:48:41 +00:00
Treehugger Robot
f2514a60cb Merge "Fix module-file name collisions" 2022-09-02 17:20:42 +00:00
Sandro Montanari
dd0a85b0eb Merge "Make com.android.sepolicy mandatory" 2022-09-02 09:29:06 +00:00
Kiyoung Kim
ad0d7710fe Replace dependencies from the Makefile to API imported modules
There are some module definitions in the Makefile, which needs to be
built with API imported module. This change replaces existing
dependencies from the Makefile, to append suffix on the reference, so it
can be linked to API imported modules.

Bug: 243736650
Test: 'ALLOW_MISSING_DEPENDENCIES=true m halutil' succeeded.
Change-Id: I12baa36e41c0c69228be5f0d08fb4c18eb8a22b1
2022-09-02 13:15:05 +09:00
Cole Faust
f4431716ca Fix module-file name collisions
Bazel doesn't allow a module and file with the same name.

Delete the symlinks as they don't appear to be used.

Bug: 198619163
Test: Presubmits
Change-Id: I50eac56aa2b87708d1762e504b3bfd86c07a6bfb
2022-09-01 15:27:05 -07:00
Florian Mayer
9050cd6d37 Merge "Revert "Revert "[make] Add memtag-stack sanitizer, switch to linker-generated notes.""" 2022-09-01 19:29:35 +00:00
Treehugger Robot
522df8591f Merge "Add b autocomplete to envsetup" 2022-09-01 14:41:20 +00:00
Treehugger Robot
628a288a6d Merge "Remove 'eval' from b to fix quoted arguments." 2022-09-01 13:44:39 +00:00
Chris Parsons
a297297fdf Add b autocomplete to envsetup
Note that b autocompletion isn't perfect, given that the autocompletion
script looks into the workspace root for BUILD files, instead of
out/soong/workspace. (Also, out/soong/workspace may not even be
available if bp2build has not yet been run!) However, this is a good
start to autocompletion, as bazel commands, flags, and packages
autocomplete correctly.

Fixes: 196945896
Test: Treehugger
Test: Manual verification of `b` autocompletion
Change-Id: Ia99abcfe50d195c48644c7b3455243c03d5d38f7
2022-09-01 08:41:14 -04:00
Sandro
fd1a018a48 Make com.android.sepolicy mandatory
The apex_sepolicy files were removed from the system partition in
ag/17753690 because they were not necessary in T builds.

For updatable sepolicy in Android U+ we are planning to move parts of
the existing platform policy into the apex sepolicy, so we will need to
make the apex_sepolicy files available to all builds.

Bug: 243923977
Test: adb shell ls /dev/selinux /system/etc/selinux
Change-Id: I24b8b8880149885d98caf992afdae908ead11fcf
2022-09-01 09:11:37 +00:00
Jingwen Chen
1ea787a0d0 Remove 'eval' from b to fix quoted arguments.
eval doesn't seem to be necessary and using it breaks quoted args to query.

    $ b cquery 'kind(test, //build/bazel/...)'
    -bash: eval: line 99: syntax error near unexpected token `('
    -bash: eval: line 99: ')`bazel cquery kind(test, //build/bazel/...)
    ---config=bp2build ''

Test: source and rerun b cquery with quoted args
Change-Id: I2b8c4387ab729b5f927fe5a629d3a4cd58bcf901
2022-09-01 05:59:02 +00:00
Florian Mayer
548a2adaf7 Revert "Revert "[make] Add memtag-stack sanitizer, switch to linker-generated notes.""
This reverts commit fe3e537192.

Reason for revert: reland with fix

Change-Id: I199e0e0d0bbb7e74292c6406b7d9fe4db7449d59
2022-08-31 15:27:07 -07:00
Florian Mayer
a2159cd341 Merge "Revert "[make] Add memtag-stack sanitizer, switch to linker-generated notes."" 2022-08-31 18:38:31 +00:00
Florian Mayer
fe3e537192 Revert "[make] Add memtag-stack sanitizer, switch to linker-generated notes."
This reverts commit 1264fcc95a.

Reason for revert: b/244454542

Change-Id: Ic12481fe99d989dabd52431290c78a17cec911ec
2022-08-31 18:37:51 +00:00