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

Fix tests under bazel test -c opt. #212

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

reventlov
Copy link
Collaborator

With certain versions of GCC, bazel test -c opt ... failed, apparently due to a compiler bug.

This change:

  1. Adds a workaround for the GCC bug.
  2. Enables the workaround on versions of GCC known to have the bug.
  3. Documents the bug (in comments).
  4. Enables testing with -c opt as part of the commit hook.

Note that the versions covered by #2 are a little wider than may be technically necessary. As of the time of writing, this affects all released versions of GCC from 12.1 through 14.1, but the GCC fix has been backported to the 12.X and 13.X branches. It may be possible to reduce the workaround's scope once those are released.

With certain versions of GCC, `bazel test -c opt ...` failed, apparently
due to a compiler bug.

This change:

1.  Adds a workaround for the GCC bug.
2.  Enables the workaround on versions of GCC known to have the bug.
3.  Documents the bug (in comments).
4.  Enables testing with `-c opt` as part of the commit hook.

Note that the versions covered by google#2 are a little wider than may be
technically necessary.  As of the time of writing, this affects all
released versions of GCC from 12.1 through 14.1, but the GCC fix has
been backported to the 12.X and 13.X branches.  It may be possible
to reduce the workaround's scope once those are released.
Copy link
Collaborator

@jasongraffius jasongraffius left a comment

Choose a reason for hiding this comment

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

LGTM

@reventlov reventlov merged commit 35220b7 into google:master Dec 5, 2024
6 checks passed
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