mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
36 lines
1.4 KiB
Plaintext
36 lines
1.4 KiB
Plaintext
###############################
|
|
# Linux
|
|
###############################
|
|
|
|
# Start with configuring the autodetected toolchain.
|
|
# The target toolchain should be captured already in its toolchain.
|
|
common:linux --repo_env=BAZEL_COPTS="-Wall:-Wextra:-Werror:-gz=zlib"
|
|
|
|
# C++ only
|
|
common:linux --repo_env=BAZEL_CXXOPTS="-std=c++20:-Wformat=2:-pedantic:-Wno-psabi:-Wno-unused-parameter:-fPIC:-pthread:-Wno-deprecated-enum-enum-conversion"
|
|
|
|
# C Only
|
|
common:linux --repo_env=BAZEL_CONLYOPTS="-Wformat=2:-pedantic:-Wno-psabi:-Wno-unused-parameter:-fPIC:-pthread"
|
|
|
|
# Linker
|
|
common:linux --repo_env=BAZEL_LINKOPTS="-rdynamic:-pthread:-ldl:-latomic:-Wl,-rpath,'$ORIGIN'"
|
|
|
|
# Cleanup build output for tools
|
|
build:linux --host_cxxopt=-Wno-missing-field-initializers
|
|
build:linux --host_cxxopt=-Wno-deprecated-enum-enum-conversion
|
|
build:linux --host_cxxopt=-Wno-sign-compare
|
|
build:linux --host_cxxopt=-Wno-unknown-pragmas
|
|
build:linux --host_cxxopt=-Wno-attributes
|
|
|
|
# Ignore potential issues in third party code on the host
|
|
build:linux --host_cxxopt=-Wno-pedantic
|
|
build:linux --host_cxxopt=-Wno-format-nonliteral
|
|
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
|
|
|
|
# Set soname. Needed for robotpy
|
|
build:linux --features=set_soname
|
|
build:linux --host_features=set_soname
|