Skip to content

Set copt in platform-specific way & increase bazel test timeouts#756

Merged
mhucka merged 3 commits into
masterfrom
mh-bazelrc-platform-specific
Jun 13, 2025
Merged

Set copt in platform-specific way & increase bazel test timeouts#756
mhucka merged 3 commits into
masterfrom
mh-bazelrc-platform-specific

Conversation

@mhucka
Copy link
Copy Markdown
Collaborator

@mhucka mhucka commented Jun 12, 2025

Attempting to use option --copt=-std=c++17 fails on Windows because the syntax need to be slightly different: --copt=/std:c++17. To handle these differences between platforms, we can take advantage of Bazel's --enable_platform_specific_config option and define different build configs for Linux, Windows, and Mac.

Separately, on MacOS 13 runners on GitHub, a couple of tests failed because they exceeded the default test timeout. This PR increases the timeout.

mhucka added 2 commits June 12, 2025 14:18
Attempting to use option `--copt=-std=c++17` fails on Windows because
the syntax need to be slightly different: `--copt=/std:c++17`. To
handle these differences between platforms, we can take advantage of
Bazel's `--enable_platform_specific_config` option and define
different build configs for Linux, Windows, and Mac.
It seems that `--cxxopt=-D_GLIBCXX_USE_CXX11_ABI=1` works on all
platforms (possibly because the Windows compiler ignores altogether?).
We may as well pull that out into a single build setting that's common
for all platforms.
@mhucka mhucka force-pushed the mh-bazelrc-platform-specific branch from be04aee to c039cc1 Compare June 12, 2025 15:09
On MacOS 13 runners on GitHub, some of the tests fail because they
exceed the default timeout.
@mhucka mhucka changed the title Set copt & cxxopt with platform-specific syntax in .bazelrc Set copt in platform-specific way & increase bazel test timeouts Jun 12, 2025
@mhucka mhucka requested review from pavoljuhas and sergeisakov June 13, 2025 15:56
@mhucka mhucka merged commit e793be9 into master Jun 13, 2025
14 of 19 checks passed
@mhucka mhucka deleted the mh-bazelrc-platform-specific branch June 13, 2025 19:54
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.

3 participants