p4lang/p4c#5070 introduced a new command-line parameter designed to prevent the compiler driver from running the Tofino assembler (bfas) by default.
While @fruffy explained the technical reason behind it (bfas is not included in https://github.com/p4lang/p4c), it is critical to always run the assembler when compiling a P4 program for Tofino. Without doing it, it is not even possible to be sure that the program compiled successfully, since it is the assembler that checks that the compiler output can fit into the number of stages that is actually available on the device.
I recommend replacing the flag --enable-bf-asm with --disable-bf-asm and similarly replacing the environment variable ENABLE_BF_ASM with DISABLE_BF_ASM.
I know, this sounds like a compiler issue -- will be happy to move it to p4lang/p4c, but it definitely affects open-p4studio users a lot more.
p4lang/p4c#5070 introduced a new command-line parameter designed to prevent the compiler driver from running the Tofino assembler (
bfas) by default.While @fruffy explained the technical reason behind it (
bfasis not included in https://github.com/p4lang/p4c), it is critical to always run the assembler when compiling a P4 program for Tofino. Without doing it, it is not even possible to be sure that the program compiled successfully, since it is the assembler that checks that the compiler output can fit into the number of stages that is actually available on the device.I recommend replacing the flag
--enable-bf-asmwith--disable-bf-asmand similarly replacing the environment variableENABLE_BF_ASMwithDISABLE_BF_ASM.I know, this sounds like a compiler issue -- will be happy to move it to p4lang/p4c, but it definitely affects open-p4studio users a lot more.