From 88d32d57ab786746bd1acf6c0094f0299e37594b Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Tue, 19 Sep 2023 00:25:02 +0800 Subject: [PATCH] GHA CI: enable run-time checks in C++ library Those have minimal impact on run-time: https://www.gnu.org/software/libc/manual/html_node/Source-Fortification.html https://bugs.launchpad.net/kicad/+bug/1838448/comments/40 PR #19608. --- .github/workflows/ci_macos.yaml | 2 +- .github/workflows/ci_ubuntu.yaml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_macos.yaml b/.github/workflows/ci_macos.yaml index 33313371e..0a78631cf 100644 --- a/.github/workflows/ci_macos.yaml +++ b/.github/workflows/ci_macos.yaml @@ -87,7 +87,7 @@ jobs: - name: Build qBittorrent run: | - CXXFLAGS="$CXXFLAGS -Wno-gnu-zero-variadic-macro-arguments -Werror -Wno-error=deprecated-declarations" \ + CXXFLAGS="$CXXFLAGS -Werror -Wno-error=deprecated-declarations" \ LDFLAGS="$LDFLAGS -gz" \ cmake \ -B build \ diff --git a/.github/workflows/ci_ubuntu.yaml b/.github/workflows/ci_ubuntu.yaml index 4e9ab9e93..4fda7a2e3 100644 --- a/.github/workflows/ci_ubuntu.yaml +++ b/.github/workflows/ci_ubuntu.yaml @@ -24,6 +24,7 @@ jobs: env: boost_path: "${{ github.workspace }}/../boost" + harden_flags: "-D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS" steps: - name: Checkout repository @@ -66,6 +67,7 @@ jobs: --recurse-submodules \ https://github.com/arvidn/libtorrent.git cd libtorrent + CXXFLAGS="$CXXFLAGS ${{ env.harden_flags }}" \ cmake \ -B build \ -G "Ninja" \ @@ -87,7 +89,7 @@ jobs: - name: Build qBittorrent run: | - CXXFLAGS="$CXXFLAGS -Werror" \ + CXXFLAGS="$CXXFLAGS ${{ env.harden_flags }} -Werror" \ LDFLAGS="$LDFLAGS -gz" \ cmake \ -B build \ -- 2.11.4.GIT