feat: Introduce stable Bazel build

The initial migration to a Bazel based build. All attempts have been made
to maintain configuration parity with the upstream build.
This commit is contained in:
Connor McEntee 2025-02-22 11:27:13 -07:00
parent 54eaed1d8b
commit 7f192e9919
29 changed files with 6564 additions and 1 deletions

View file

@ -0,0 +1,44 @@
load("@bazel_skylib//lib:selects.bzl", "selects")
selects.config_setting_group(
name = "gcc_compatible",
match_any = [
"@rules_cc//cc/compiler:clang",
"@rules_cc//cc/compiler:clang-cl",
"@rules_cc//cc/compiler:gcc",
"@rules_cc//cc/compiler:mingw-gcc",
"@rules_cc//cc/compiler:emscripten",
],
visibility = ["//:__subpackages__"],
)
selects.config_setting_group(
name = "gcc_core",
match_any = [
"@rules_cc//cc/compiler:gcc",
"@rules_cc//cc/compiler:mingw-gcc",
],
visibility = ["//:__subpackages__"],
)
# GCC-like and target native CPU architectures
# Equivalent of configure.ac "x$GCC" != "xyes"
selects.config_setting_group(
name = "gcc_native",
match_any = [
"@rules_cc//cc/compiler:clang",
"@rules_cc//cc/compiler:gcc",
"@rules_cc//cc/compiler:mingw-gcc",
],
visibility = ["//:__subpackages__"],
)
# Compatibility with MSVCs conventions (intrinsics, frontend).
selects.config_setting_group(
name = "msvc_compatible",
match_any = [
"@rules_cc//cc/compiler:clang-cl",
"@rules_cc//cc/compiler:msvc-cl",
],
visibility = ["//:__subpackages__"],
)