Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need allow_empty=True for glob with Bazel 8 #294

Closed
axbycc-mark opened this issue Dec 9, 2024 · 2 comments
Closed

Need allow_empty=True for glob with Bazel 8 #294

axbycc-mark opened this issue Dec 9, 2024 · 2 comments

Comments

@axbycc-mark
Copy link

axbycc-mark commented Dec 9, 2024

In Bazel 8, glob's default allow_empty is False. This broke my build because some of the local_cuda's globs were empty. I manually fixed it in my local repo in two spots.

# local_cuda BUILD


filegroup(
    name = "compiler_deps",
    srcs = [
        ":_cuda_header_files",
    ] + glob([
        "cuda/version.txt",
        "cuda/version.json",
        "cuda/bin/**",
        "cuda/lib64/**",
        "cuda/nvvm/**",
    ], allow_empty=True),
)

...

cc_library(
    name = "cupti_headers",
    hdrs = glob(["cuda/extras/CUPTI/include/*.h"], allow_empty=True),
    includes = ["cuda/extras/CUPTI/include"],
)
@cloudhan
Copy link
Collaborator

Are you using an old release?

@axbycc-mark
Copy link
Author

Ah, yes I assumed the version mentioned in the readme (0.2.1) was the latest. Upgrading to 0.2.3 fixes it. Thanks!

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

No branches or pull requests

2 participants