mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[build] Build JNI and benchmarks as release by default (#8257)
It doesn't make sense to benchmark debug binaries. Also, wpimath JNI performance in unit tests is drastically impacted by debug vs release.
This commit is contained in:
3
.github/workflows/fix_compile_commands.py
vendored
3
.github/workflows/fix_compile_commands.py
vendored
@@ -31,6 +31,9 @@ def main():
|
||||
# Replace GCC warning argument with one Clang recognizes
|
||||
elif arg == "-Wno-maybe-uninitialized":
|
||||
out_args.append("-Wno-uninitialized")
|
||||
# Skip GCC-specific warning argument
|
||||
elif arg == "-Wno-error=restrict":
|
||||
pass
|
||||
else:
|
||||
out_args.append(arg)
|
||||
|
||||
|
||||
@@ -181,7 +181,11 @@ tasks.register('deployStatic') {
|
||||
model {
|
||||
components {
|
||||
benchmarkCpp(NativeExecutableSpec) {
|
||||
targetBuildTypes 'debug'
|
||||
if (project.hasProperty('ciDebugOnly')) {
|
||||
targetBuildTypes 'debug'
|
||||
} else {
|
||||
targetBuildTypes 'release'
|
||||
}
|
||||
sources {
|
||||
cpp {
|
||||
source {
|
||||
@@ -235,7 +239,11 @@ model {
|
||||
}
|
||||
}
|
||||
benchmarkCppStatic(NativeExecutableSpec) {
|
||||
targetBuildTypes 'debug'
|
||||
if (project.hasProperty('ciDebugOnly')) {
|
||||
targetBuildTypes 'debug'
|
||||
} else {
|
||||
targetBuildTypes 'release'
|
||||
}
|
||||
nativeUtils.excludeBinariesFromStrip(it)
|
||||
sources {
|
||||
cpp {
|
||||
|
||||
@@ -39,12 +39,14 @@ nativeUtils.platformConfigs.each {
|
||||
}
|
||||
}
|
||||
|
||||
// Compress debug info on Linux
|
||||
nativeUtils.platformConfigs.each {
|
||||
if (it.name.contains('linux')) {
|
||||
// Compress debug info on Linux
|
||||
it.cppCompiler.debugArgs.add("-gz=zlib")
|
||||
// Make warning in OpenCV 4.10 from GCC 15 not an error
|
||||
it.cppCompiler.args.add("-Wno-error=overloaded-virtual")
|
||||
// Make warning from Google Benchmark not an error
|
||||
it.cppCompiler.args.add("-Wno-error=restrict")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -148,7 +148,11 @@ model {
|
||||
// By default, a development executable will be generated. This is to help the case of
|
||||
// testing specific functionality of the library.
|
||||
"${nativeName}Dev"(NativeExecutableSpec) {
|
||||
targetBuildTypes 'debug'
|
||||
if (project.hasProperty('ciDebugOnly') || project.hasProperty('debugJNI')) {
|
||||
targetBuildTypes 'debug'
|
||||
} else {
|
||||
targetBuildTypes 'release'
|
||||
}
|
||||
sources {
|
||||
cpp {
|
||||
source {
|
||||
|
||||
Reference in New Issue
Block a user