Hello,
I've encountered a discrepancy between the `preprocess_assemble` and `assemble` actions that I'm not sure how to resolve.
I'm using bazel to invoke arm-none-eabi-gcc on assembly codes provided by various vendors. Some use the ".S" suffix, others use ".s". I'm currently unable to assemble ".s" files because the toolchain isn't mounted into the sandbox. My hack is to rename "*.s" files to "*.S" after which everything works as expected.
Examining `CppFileTypes.java` in the bazel source, I see that ".s" is matched to the ASSEMBLER FileType and ".S" is matched to the ASSEMBLER_WITH_C_PREPROCESSOR FileType.
I have written a toolchain configuration that uses the newer `action_configs` API on `cc_common.create_toolchain_config_info(...)` like this:
action_config(
action_name = ACTION_NAMES.preprocess_assemble,
tools = [
struct(
type_name = "tool",
tool = ctx.file.gcc,
)
]
),
action_config(
action_name = ACTION_NAMES.assemble,
tools = [
struct(
type_name = "tool",
tool = ctx.file.gcc,
)
]
),
I've confirmed that these two action_configs are in fact used for ".S" and ".s" files by the following method:
For ".S" files:
1. remove the action_config corresponding to ACTION_NAMES.preprocess_assemble
2. observe that build fails with error:
src/main/tools/linux-sandbox-pid1.cc:518 "execvp(toolchains/DUMMY_GCC_TOOL, 0x971510)": No such file or directory
3. replace the action_config corresponding to ACTION_NAMES.preprocess_assemble
4. observe that the build succeeds
For ".s" files:
1. remove the action_config corresponding to ACTION_NAMES.assemble
2. observe that build fails with error:
src/main/tools/linux-sandbox-pid1.cc:518 "execvp(toolchains/DUMMY_GCC_TOOL, 0x1a44180)": No such file or directory
3. replace the action_config corresponding to ACTION_NAMES.assemble
4. observe that build fails with error:
src/main/tools/linux-sandbox-pid1.cc:518 "execvp(external/arm_none_eabi_linux_x86_64/bin/arm-none-eabi-gcc, 0xb2b180)": No such file or directory
Using `--sandbox_debug` I observe that when successfully assembling ".S" files, `bazel_tools`, `local_config_cc` and my toolchain are present in the sandbox in addition to source files. When attempting to assemble ".s" files however, only the source files are present.
Does anyone know why the toolchain is mounted for the preprocess_assemble action but not the assemble action?
Kind regards,
Nick