Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .bazelversion

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/verible-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,6 @@ jobs:
- name: Install dependencies
run: |
choco install bazel --force --version=7.6.1
choco install winflexbison3
choco install llvm --allow-downgrade --version=20.1.4

- name: Debug bazel directory settings
Expand Down
6 changes: 3 additions & 3 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ bazel_dep(name = "nlohmann_json", version = "3.11.3.bcr.1")
bazel_dep(name = "platforms", version = "0.0.11")
bazel_dep(name = "protobuf", version = "31.0-rc2")
bazel_dep(name = "re2", version = "2024-07-02.bcr.1")
bazel_dep(name = "rules_bison", version = "0.3")
bazel_dep(name = "rules_bison", version = "0.4")
bazel_dep(name = "rules_cc", version = "0.1.2")
bazel_dep(name = "rules_flex", version = "0.3")
bazel_dep(name = "rules_flex", version = "0.4")
bazel_dep(name = "rules_license", version = "1.0.0")
bazel_dep(name = "rules_m4", version = "0.2.3")
bazel_dep(name = "rules_m4", version = "0.3")
bazel_dep(name = "zlib", version = "1.3.1.bcr.5")

bazel_dep(name = "googletest", version = "1.15.2", dev_dependency = True)
Expand Down
15 changes: 4 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,18 +201,11 @@ instead of default `gold` linker).
bazel build -c opt --config=create_static_linked_executables //...
```

### Optionally using local flex/bison for build
### Deprecated: using local flex/bison for build

Flex and Bison, that are needed for the parser generation, are compiled as part
of the build process. But if for any reason you want or need local tools (e.g.
if you encounter a compile problem with them - please file a bug then)
can choose so by adding `--//bazel:use_local_flex_bison` to your bazel
command line:

```bash
# Also append the option '--//bazel:use_local_flex_bison' to test/install commands
bazel build -c opt --//bazel:use_local_flex_bison //...
```
There used to be `--//bazel:use_local_flex_bison`, but it has been disabled
as it won't work with
[bazel 8](https://github.com/chipsalliance/verible/issues/2435).

### Building on Windows

Expand Down
6 changes: 1 addition & 5 deletions bazel/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@ exports_files([
bool_flag(
name = "use_local_flex_bison",
build_setting_default = False,
)

config_setting(
name = "use_local_flex_bison_enabled",
flag_values = {":use_local_flex_bison": "true"},
deprecation = "This flag has been disabled; see https://github.com/chipsalliance/verible/issues/2435 if you want to help fix re-enable it.",
)

bool_flag(
Expand Down
18 changes: 5 additions & 13 deletions bazel/bison.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,9 @@ def genyacc(
name = name,
srcs = [src],
outs = [header_out, source_out] + extra_outs,
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) + " $<",
}),
toolchains = select({
"//bazel:use_local_flex_bison_enabled": [],
"@platforms//os:windows": [],
"//conditions:default": [
"@rules_bison//bison:current_bison_toolchain",
"@rules_m4//m4:current_m4_toolchain",
],
}),
cmd = "M4=$(M4) $(BISON) --defines=$(location " + header_out + ") --output-file=$(location " + source_out + ") " + " ".join(extra_options) + " $<",
toolchains = [
"@rules_bison//bison:current_bison_toolchain",
"@rules_m4//m4:current_m4_toolchain",
],
)
18 changes: 5 additions & 13 deletions bazel/flex.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,9 @@ def genlex(name, src, out):
name = name,
srcs = [src],
outs = [out],
cmd = select({
"//bazel:use_local_flex_bison_enabled": "flex --outfile=$@ $<",
"@platforms//os:windows": "win_flex.exe --outfile=$@ $<",
"//conditions:default": "M4=$(M4) $(FLEX) --outfile=$@ $<",
}),
toolchains = select({
"//bazel:use_local_flex_bison_enabled": [],
"@platforms//os:windows": [],
"//conditions:default": [
"@rules_flex//flex:current_flex_toolchain",
"@rules_m4//m4:current_m4_toolchain",
],
}),
cmd = "M4=$(M4) $(FLEX) --outfile=$@ $<",
toolchains = [
"@rules_flex//flex:current_flex_toolchain",
"@rules_m4//m4:current_m4_toolchain",
],
)
4 changes: 0 additions & 4 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ verible_used_stdenv.mkDerivation {
# To manually run export_json_examples
python3Packages.anytree

# For using --//bazel:use_local_flex_bison if desired
flex
bison

# To build vscode vsix package
nodejs

Expand Down
Loading