Skip to content

Commit 93d4ab2

Browse files
authored
examples: enable winflexbison on windows (#1528)
With short build paths (#1527), winflexbison's cmake build no longer exceeds MAX_PATH. Remove its broken marker and the BZLMOD_ENABLED guard. Mesa itself still hits MAX_PATH on bzlmod Windows — meson's Python runtime lives in a deeply-nested runfiles tree under the exec root, and the bzlmod module-path segments push it past 260 characters. Mark mesa broken on bzlmod Windows until the tool-staging work (copying runtime closures into EXT_BUILD_DEPS) lands. The workspaces configs are short enough to build successfully.
1 parent b8d437c commit 93d4ab2

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

examples/third_party/mesa/BUILD.mesa.bazel

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
load("@rules_foreign_cc//foreign_cc:defs.bzl", "meson_with_requirements")
2+
load("@rules_foreign_cc_examples_third_party//:bzlmod_enabled.bzl", "BZLMOD_ENABLED")
23
load("@third_party_pip//:requirements.bzl", "requirement")
34

45
filegroup(
@@ -102,6 +103,13 @@ meson_with_requirements(
102103
requirements = [
103104
requirement("mako"),
104105
],
106+
# Meson's Python runtime lands in a deeply-nested runfiles tree under the
107+
# exec root. On bzlmod the module-path segments make this exceed MAX_PATH,
108+
# so Python can't load its own DLLs. Needs tool-staging work to resolve.
109+
target_compatible_with = select({
110+
"@platforms//os:windows": ["@rules_foreign_cc_examples_third_party//:broken"] if BZLMOD_ENABLED else [],
111+
"//conditions:default": [],
112+
}),
105113
toolchains = ["@rules_python//python:current_py_toolchain"],
106114
visibility = ["//visibility:public"],
107115
deps = ["@examples_zlib//:zlib"] + select({

examples/third_party/mesa/BUILD.winflexbison.bazel

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake")
2-
load("@rules_foreign_cc_examples_third_party//:bzlmod_enabled.bzl", "BZLMOD_ENABLED")
32

43
filegroup(
54
name = "all_srcs",
@@ -24,9 +23,7 @@ cmake(
2423
"win_bison.exe",
2524
],
2625
target_compatible_with = select({
27-
# In bazel 7 (at least) the bzlmod paths are too long to build this.
28-
# TODO: reevaluate with bazel 8
29-
"@platforms//os:windows": ["@rules_foreign_cc_examples_third_party//:broken"] if BZLMOD_ENABLED else [],
26+
"@platforms//os:windows": [],
3027
"//conditions:default": ["@platforms//:incompatible"],
3128
}),
3229
visibility = ["//visibility:public"],

0 commit comments

Comments
 (0)