Commit graph

14 commits

Author SHA1 Message Date
Sasha Smundak
422b614355 Generate runtime conversion diagnostics
Instead of inserting a comment with error description into the generated code,
generate a call to a function that will print out a conversion error when executed.
Do not print generic "partially converted" message anymore.
Remove --verbose and --no_warnings options.

Bug: 204062171
Test: internal
Change-Id: Ib126e16dc76f49635e4939e670922f2561781049
2021-11-18 10:01:37 -08:00
Sasha Smundak
7d934b9c47 Display diagnostic message for each conversion error.
Also, use better names for the error handling entities.

Bug: 204062171
Test: manual
Change-Id: I65869120ed08fc40d9ec6267c882e53aaedde9ed
2021-11-11 15:14:20 -08:00
Cole Faust
17cecd7b17 Enable mk2rbc warnings/errors by default
Since we are going to be asking partners to start
ensuring that their makefiles work with mk2rbc,
enable warnings by default so they're more visible.
Otherwise, the conversion could appear to succeed
but have some subtle failures.

Bug: 204062171
Test: Manually
Change-Id: I38189031d7357bb3f2c811de90f2821cde10cbcd
2021-11-08 15:21:20 -08:00
Cole Faust
6ed7cb493d Generate board-specific launchers in mk2rbc
Board config works slightly differently from product config.
It requires the product config variables to be passed into
it. Currently the only generic way to pass info into an RBC
script is via the arguments to rbcrun, which get passed
as global variables, not the product (cfg) variables.
Add a new form of launcher that reads the product variables
from a separate rbc file that is generated in make.

The board configuration also doesn't need inheritance, so it
doesn't call rblf.product_configuration() either.

Bug: 201700692
Test: build/bazel/ci/rbc_product_config.sh -b sdk_phone_x86_64-userdebug
Change-Id: I52fd65b33cf99b45a563284e2849da75a8af8688
2021-11-04 16:19:41 -07:00
Treehugger Robot
c9e85ca825 Merge "Make a pass over our codebase cleaning up non-precise / non-inclusive language." 2021-10-28 20:51:17 +00:00
Joe Onorato
b4638c1ac3 Make a pass over our codebase cleaning up non-precise / non-inclusive language.
Test: treehugger
Bug: 204369779
Change-Id: I6e63cae824d323535cdb14b493edd868df47738d
2021-10-28 10:32:07 -07:00
Cole Faust
ebf79bfb4a Remove mk2rbc's support for using a product name
Now that the product and board config pass makefiles
to mk2rbc, we don't need to support passing a product
name.

Bug: 201700692
Test: Manually
Change-Id: I787f0f98bc5ab3cefeefb7af8d342aba84769925
2021-10-05 11:05:02 -07:00
Cole Faust
07ea503ab3 Make mk2rbc accept either a makefile or product
The current behavior of mk2rbc is that it can accept either
a makefile to convert, or if it's also generating a launcher,
it must accept a product name instead of a makefile.

For board configuration, we need to convert a specific makefile,
but we also want to generate a launcher. Change mk2rbc so that
its non-flag arguments can be either makefiles or product names.

Bug: 201700692
Test: ./build/bazel/ci/rbc_product_config.sh aosp_arm64-userdebug
      with board config changes patched in
Change-Id: I521e31fe0bdc608b8f26c9aa803ca690dd1c538e
2021-10-04 18:09:48 +00:00
Sasha Smundak
d7d07ad0b4 Share version settings with product config makefile.
Generate version settings from build/make/core/version_defaults.mk.
The generated settings are then loaded into the launcher code and passed
to the environment setup code.

Bug: 198995713
Test: internal
Change-Id: I66131d2c5b232784a9ff0bba9fbd5db62302aaba
2021-09-13 09:23:05 -07:00
Sasha Smundak
70f1745f3e Look for the AndroidProduct.mk files in the vendor/ hierarchy, too
Bug: 182418325
Test: N/A
Change-Id: I17048b5fda3ac83ca7c2b359abe94ab5ced91511
2021-09-02 09:34:47 -07:00
Sasha Smundak
6609ba7664 Allow dynamically calculated inherit-product path
Bug: 193566316
Test: internal
Change-Id: Iaa7b68cf459f9a694ae9d37a32c9372cf8a8335a
2021-08-02 14:35:45 -07:00
Sasha Smundak
3880279a0c Add an option to gather CPU profile.
Bug: 172923994
Test: internal
Change-Id: I43e6121855e909eaca2204a811f12174fb8b6b5f
2021-08-01 14:46:56 -07:00
Sasha Smundak
b2ac859a69 Options processing: remove redundant check
Bug: 172923994
Test: N/A
Change-Id: I2b07c775f8e3cad78eb6992d3522bef3a9b701b8
2021-07-26 11:12:04 -07:00
Sasha Smundak
b051c4ede3 Product config makefiles to Starlark converter
Test: treehugger; internal tests in mk2rbc_test.go
Bug: 172923994
Change-Id: I43120b9c181ef2b8d9453e743233811b0fec268b
2021-07-14 09:51:10 -07:00