mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
This lets us remove the unmaintained StackWalker library and its hacky upstream_utils script. @Gold856 reported that StackWalker gives blank stacktraces: https://discord.com/channels/176186766946992128/368993897495527424/1261940029287301150. They also reported an earlier version of this PR giving the following stacktrace instead: ``` D:\allwpilib\developerRobot\src\main\native\cpp\Robot.cpp(18): developerRobotCpp!Robot::RobotInit+0xB6 D:\allwpilib\wpilibc\src\main\native\cpp\TimedRobot.cpp(22): wpilibcd!frc::TimedRobot::StartCompetition+0x4F D:\allwpilib\wpilibc\src\main\native\include\frc\RobotBase.h(36): developerRobotCpp!frc::impl::RunRobot<Robot>+0xC8 D:\allwpilib\wpilibc\src\main\native\include\frc\RobotBase.h(106): developerRobotCpp!frc::StartRobot<Robot>+0x17E D:\allwpilib\developerRobot\src\main\native\cpp\Robot.cpp(60): developerRobotCpp!main+0xB D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl(79): developerRobotCpp!invoke_main+0x39 D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl(288): developerRobotCpp!__scrt_common_main_seh+0x132 D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl(331): developerRobotCpp!__scrt_common_main+0xE D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp(17): developerRobotCpp!mainCRTStartup+0xE KERNEL32!BaseThreadInitThunk+0x1D ntdll!RtlUserThreadStart+0x28 ```
41 lines
2.0 KiB
Plaintext
41 lines
2.0 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++23:-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
|
|
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
|