Skip to content

Improve Bazel config files#1063

Draft
mhucka wants to merge 21 commits into
quantumlib:mainfrom
mhucka:improve-bazelrc
Draft

Improve Bazel config files#1063
mhucka wants to merge 21 commits into
quantumlib:mainfrom
mhucka:improve-bazelrc

Conversation

@mhucka
Copy link
Copy Markdown
Collaborator

@mhucka mhucka commented May 10, 2026

Add support for --config=avx and similar flags.

mhucka added 12 commits May 7, 2026 23:23
The value is the default, and no longer seems to be necessary.
This now probes the current host's capabilities for AVX and SSE
features. For example, using `bazel build --config=avx` will get the
right AVX (AVX2, AVX512F, etc.) based on what the host reports it
supports.
This provides a way to pass `-march=native` to the build.
With the availability of the `--config=native` option, this can be
simplified.
@mhucka
Copy link
Copy Markdown
Collaborator Author

mhucka commented May 10, 2026

/gemini review

@github-actions github-actions Bot added the size: XL lines changed >1000 label May 10, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the Bazel build configuration to centralize and automate SIMD instruction set detection and flag selection across Linux, macOS, and Windows. It introduces a new compiler probing mechanism that removes the dependency on the py-cpuinfo Python package. Feedback identifies several critical issues in the newly added unit tests, including incorrect unpacking of return values and inaccurate expectations for compiler flags. Furthermore, the feature detection heuristic for Windows was noted as incomplete.

Comment thread dev_tools/compiler_probe_test.bzl
Comment thread dev_tools/compiler_probe_test.bzl
Comment thread dev_tools/compiler_probe_test.bzl
Comment thread dev_tools/compiler_probe_test.bzl
Comment thread dev_tools/compiler_probe.bzl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: XL lines changed >1000

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant