[bazel] Move the easy pieces of the build over to bzlmod (#8542)

bzlmod is the future, and makes it easier to depend on AOS.

---------

Signed-off-by: Austin Schuh <austin.linux@gmail.com>
This commit is contained in:
Austin Schuh
2026-01-12 14:30:31 -08:00
committed by GitHub
parent 0fd8210b5a
commit 1724e59f8d
14 changed files with 1166 additions and 444 deletions

View File

@@ -29,7 +29,12 @@ build:linux --host_cxxopt=-Wno-missing-requires
build:linux --host_cxxopt=-Wno-implicit-fallthrough
build:linux --host_per_file_copt=external/zlib/.*\.c@-Wno-deprecated-non-prototype
build:linux --host_per_file_copt=external/.*@-Wno-pedantic,-Wno-implicit-fallthrough,-Wno-format-nonliteral,-Wno-sign-compare,-Wno-sign-compare,-Wno-type-limits,-Wno-maybe-uninitialized,-Wno-missing-field-initializers,-Wno-trigraphs,-Wno-attributes,-Wno-return-type,-Wno-unused-function,-Wno-format-y2k,-Wno-deprecated-declarations
build:linux --host_per_file_copt=external/.*\.cpp$,external/.*\.cc$@-Wno-missing-requires,-Wno-volatile,-Wno-redundant-move,-Wno-class-memaccess,-Wno-ignored-qualifiers,-Wno-stringop-overflow,-Wno-extra
# Set soname. Needed for robotpy
build:linux --features=set_soname
build:linux --host_features=set_soname
build:linux --host_platform=//shared/bazel:linux_x86_64
build:linux --platforms=//shared/bazel:linux_x86_64

View File

@@ -8,3 +8,9 @@ common:macos --repo_env=BAZEL_CXXOPTS="-std=c++20:-pedantic:-fPIC:-Wno-unused-pa
common:macos --repo_env=BAZEL_CONLYOPTS="-pedantic:-fPIC:-Wno-unused-parameter:-Wno-missing-field-initializers:-Wno-unused-private-field:-Wno-fixed-enum-extension"
common:macos --repo_env=BAZEL_LINKOPTS="-Wl,-rpath,'@loader_path'"
common:macos --host_per_file_copt=external/.*@-Wno-pedantic,-Wno-deprecated-declarations
common:macos --per_file_copt=external/.*@-Wno-pedantic,-Wno-deprecated-declarations
common:macos --host_per_file_copt=external/.*\.c$@-Wno-c11-extensions
common:macos --per_file_copt=external/.*\.c$@-Wno-c11-extensions

View File

@@ -1,6 +1,6 @@
###############################
# Systemcore
###############################
build:systemcore --platforms=@rules_bzlmodrio_toolchains//platforms/systemcore
build:systemcore --platforms=//shared/bazel:systemcore
build:systemcore --build_tag_filters=-no-systemcore
build:systemcore --platform_suffix=systemcore

View File

@@ -21,7 +21,7 @@ build:windows --repo_env="BAZEL_LINKOPTS=/DEPENDENTLOADFLAG%:0x1100"
################################
# ARM Windows Flags
################################
build:windows_arm --platforms="@rules_bzlmodrio_toolchains//platforms/windows_arm64" --platform_suffix=winarm64
build:windows_arm --platforms="@allwpilib//shared/bazel:windows_arm64" --platform_suffix=winarm64
# Ignore duplicate inline statment in tools
build:windows --host_copt=/wd4141
@@ -30,3 +30,4 @@ build:windows --host_copt=/wd4715
# Disable the C++17 feature in the windows compiler
build:windows --features=-default_cpp_std --host_features=-default_cpp_std
build:windows --host_platform=//shared/bazel:windows_host