From 4c3f217ffaecb151add400450d11dcd34df59985 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Mon, 11 Feb 2019 01:35:54 -0800 Subject: [PATCH] Build libraries with Release (#103) In particular, OpenCV has a significant performance difference (14x) on key operations (RGB to HSV conversion) between -O2 and -O3. --- stage3/01-sys-tweaks/01-run.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stage3/01-sys-tweaks/01-run.sh b/stage3/01-sys-tweaks/01-run.sh index f6d3fee..1dfbb24 100755 --- a/stage3/01-sys-tweaks/01-run.sh +++ b/stage3/01-sys-tweaks/01-run.sh @@ -172,8 +172,8 @@ build_opencv () { } build_opencv build/opencv-build-debug Debug ON "" || exit 1 -build_opencv build/opencv-build RelWithDebugInfo ON "" || exit 1 -build_opencv build/opencv-static RelWithDebugInfo OFF "-static" || exit 1 +build_opencv build/opencv-build Release ON "" || exit 1 +build_opencv build/opencv-static Release OFF "-static" || exit 1 # fix up java install cp -p ${ROOTFS_DIR}/usr/local/frc/share/OpenCV/java/libopencv_java344*.so "${ROOTFS_DIR}/usr/local/frc/lib/" @@ -213,7 +213,7 @@ build_wpilib () { } build_wpilib build/allwpilib-build-debug Debug || exit 1 -build_wpilib build/allwpilib-build RelWithDebugInfo || exit 1 +build_wpilib build/allwpilib-build Release || exit 1 # static (for tools) build_static_wpilib() { @@ -221,7 +221,7 @@ build_static_wpilib() { mkdir -p $1 pushd $1 cmake "${EXTRACT_DIR}/allwpilib" \ - -DCMAKE_BUILD_TYPE=RelWithDebugInfo \ + -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_TOOLCHAIN_FILE=${SUB_STAGE_DIR}/files/arm-pi-gnueabihf.toolchain.cmake \ -DCMAKE_MODULE_PATH=${SUB_STAGE_DIR}/files \ -DOpenCV_DIR=${ROOTFS_DIR}/usr/local/frc/share/OpenCV \