kleaf, the restricted build option "--spawn_strategy=local"

37 views
Skip to first unread message

off lay

unread,
May 21, 2024, 11:33:47 AMMay 21
to Android Building
With android13, i was able to build the kernel of aosp using a command:
tools/bazel build --spawn_strategy=local --verbose_failures --subcommands --sandbox_add_mount_pair=/tmp --nouse_action_cache --noremote_accept_cached --noremote_upload_local_results //common:kernel_aarch64 

As you can see, the command i tried includes "--spawn_strategy=local".

With android14, however, the command was failed with a below message:
FATAL: this action must be executed in a sandbox!

I noticed that a function had been implemented and utilized  like below:

kernel/kleaf/impl/utils.bzl:163:def _get_check_sandbox_cmd():
kernel/kleaf/impl/utils.bzl:218:    get_check_sandbox_cmd = _get_check_sandbox_cmd,

$ grep -rni 'get_check_sandbox_cmd'
kernel/kleaf/impl/ddk/ddk_uapi_headers.bzl:32:        restore_out_dir_cmd = utils.get_check_sandbox_cmd(),
kernel/kleaf/impl/ddk/ddk_config.bzl:181:        restore_out_dir_cmd = utils.get_check_sandbox_cmd(),
kernel/kleaf/impl/kernel_modules_install.bzl:94:        restore_out_dir_cmd = utils.get_check_sandbox_cmd(),
kernel/kleaf/impl/image/dtbo.bzl:30:        restore_out_dir_cmd = utils.get_check_sandbox_cmd(),
kernel/kleaf/impl/image/image_utils.bzl:114:        restore_out_dir_cmd = utils.get_check_sandbox_cmd(),
kernel/kleaf/impl/image/boot_images.bzl:78:        restore_out_dir_cmd = utils.get_check_sandbox_cmd(),
kernel/kleaf/impl/utils.bzl:163:def _get_check_sandbox_cmd():
kernel/kleaf/impl/utils.bzl:218:    get_check_sandbox_cmd = _get_check_sandbox_cmd,
kernel/kleaf/impl/abi/extracted_symbols.bzl:87:        restore_out_dir_cmd = utils.get_check_sandbox_cmd(),
kernel/kleaf/impl/abi/protected_exports.bzl:59:        restore_out_dir_cmd = utils.get_check_sandbox_cmd(),
kernel/kleaf/impl/kernel_uapi_headers.bzl:28:        restore_out_dir_cmd = utils.get_check_sandbox_cmd(),
kernel/kleaf/impl/kernel_build.bzl:2126:        restore_out_dir_cmd = utils.get_check_sandbox_cmd(),
kernel/kleaf/impl/common_providers.bzl:97:    restore_out_dir_cmd = cache_dir_step.cmd, # or utils.get_check_sandbox_cmd(),

Now, there is no way to build with "--spawn_strategy=local"?,or is there any way to skip the checking sandbox hands down? I need the option to detect compilation jobs.

Thanks,




Reply all
Reply to author
Forward
0 new messages