Translating Android.bp to for upgrading external/v8

Skip to first unread message

Saurabh Banore

Sep 17, 2021, 7:28:45 PM9/17/21
to Android Building

I am upgrading one of the Nougat libraries - external/v8. The changes required for upgrading are replacing the with Android.bp. Android.bp is not fully supported in Nougat as clarified as part of this thread, I am converting the Android.bp to equivalent the

I am able to translate most of the part of the Android.bp but I am not aware what should be the equivalent of the following sections in

genrule {
    name: "v8_generate_bytecode_builtins_list",
    tools: ["v8_bytecode_builtins_list_generator"],
    srcs: [],
    cmd: "mkdir -p $(genDir)/builtins-generated/ && $(location v8_bytecode_builtins_list_generator) $(out)",
    out: [

Similarly the filegroup section:

filegroup {
    name: "v8_init",
    srcs: [

Does anyone know how do I translate the sections mentioned above to or point to some resources where I can read more on this?

Also, feel free to suggest if this is not the right approach for upgrading the external/v8 in Nougat and if there is any other way I can follow to upgrade the library from 5.8 to 8.8



Sep 28, 2021, 2:04:23 PM9/28/21
to Android Building
genrule in Android.bp is similar to genrule in Bazel - it is a general rule to run a bash command on some input files to generate an output file. This is natively supported on - the equivalent in is LOCAL_BUILT_MODULE. You can use it to define a similar rule in your

filegroup is probably a Android.bp specific requirement. There is no equivalent because doesn't need it. Android.bp can't reference files outside its folder and subfolders. So, if any module needs to access files outside the current folder (say parent folder/sibling folders) then we use filegroup to reference those files. In, you would just directly specify the files given in srcs: through their relative path.
Reply all
Reply to author
0 new messages