Skip to content

Update bison.bzl and flex.bzl to work with Bazel 8 - #2452

Open
mneilly wants to merge 2 commits into
chipsalliance:masterfrom
mneilly:mneilly/bazel8
Open

Update bison.bzl and flex.bzl to work with Bazel 8#2452
mneilly wants to merge 2 commits into
chipsalliance:masterfrom
mneilly:mneilly/bazel8

Conversation

@mneilly

@mneilly mneilly commented Aug 29, 2025

Copy link
Copy Markdown

This change modifies the bison.bzl and flex.bzl files to accommodate changes in Bazel 8 that disallow use of select in the toolchain attribute. Instead of select, multiple targets are created and the resulting files (unique per target) are copied to the expected location.

If anybody is aware of a better approach feel free to chime in.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Aug 29, 2025

Copy link
Copy Markdown

CLA Signed

  • ✅login: mneilly / name: Mike Neilly / (0da09c1)

The committers listed above are authorized under a signed CLA.

@hzeller

hzeller commented Aug 29, 2025

Copy link
Copy Markdown
Collaborator

Don't worry about the smoke tests, I'll take care of that.

The windows build looks like it almost works, but there is a mysterious .windows-suffix on the generated files.

Comment thread bazel/flex.bzl Outdated
native.genrule(
name = name + "_windows",
srcs = [src],
outs = [out + ".windows"],

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, the suffix is not mysterious anymore. But looks like it messes with the rest of the build-system

@mneilly

mneilly commented Aug 29, 2025

Copy link
Copy Markdown
Author

I'll take a look at the windows issue tomorrow. It shouldn't be difficult to resolve (I hope).

@hzeller

hzeller commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

I am currently working on two possible solutions

@mneilly

mneilly commented Jun 26, 2026

Copy link
Copy Markdown
Author

FWIW - Ended up getting rid of the split generators and using tools instead of toolchains. Much simpler and easier to follow. Also updated the M4 var ref.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants