To be able to switch to a local --//bazel:use_local_flex_bison
we switch toolchains accordingly
|
cmd = select({ |
|
"//bazel:use_local_flex_bison_enabled": "bison --defines=$(location " + header_out + ") --output-file=$(location " + source_out + ") " + " ".join(extra_options) + " $<", |
|
"@platforms//os:windows": "win_bison.exe --defines=$(location " + header_out + ") --output-file=$(location " + source_out + ") " + " ".join(extra_options) + " $<", |
|
"//conditions:default": "M4=$(M4) $(BISON) --defines=$(location " + header_out + ") --output-file=$(location " + source_out + ") " + " ".join(extra_options) + " $<", |
|
}), |
|
cmd = select({ |
|
"//bazel:use_local_flex_bison_enabled": "flex --outfile=$@ $<", |
|
"@platforms//os:windows": "win_flex.exe --outfile=$@ $<", |
|
"//conditions:default": "M4=$(M4) $(FLEX) --outfile=$@ $<", |
|
}), |
This stopped working with bazel 8
ERROR: verible/verilog/parser/BUILD:20:7: //verible/verilog/parser:verilog-lex: attribute "toolchains" is not configurable
ERROR: verible/verible/verilog/parser/BUILD:95:8: //verible/verilog/parser:verilog-y: attribute "toolchains" is not configurable
So for now, let's force bazelversion to 7.x, but ideally this could be reformulated in a way that it works with bazel 7 and 8
To be able to switch to a local
--//bazel:use_local_flex_bisonwe switch toolchains accordingly
verible/bazel/bison.bzl
Lines 33 to 37 in 98bdb38
verible/bazel/flex.bzl
Lines 27 to 31 in 98bdb38
This stopped working with bazel 8
So for now, let's force bazelversion to 7.x, but ideally this could be reformulated in a way that it works with bazel 7 and 8