From d06e87eb8d9cfa863510d05280fa3a41b8c68205 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 2 Jan 2023 10:15:43 +0100 Subject: [PATCH] GitHub Actions: build with -D_FORTIFY_SOURCE=2 This requires --buildtype=debugoptimized (or --buildtype=release, but optimizations need to be enabled), and will allow us to keep the i3 build free of warnings during development. Distributions like Debian build with -D_FORTIFY_SOURCE=2. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5e460a63..fe8e506b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -47,7 +47,7 @@ jobs: echo "::endgroup::" - name: build i3 run: | - docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 -e CC ${{ env.BASENAME }} /bin/sh -c 'rm -rf build; mkdir -p build && cd build && CFLAGS="-Wformat -Wformat-security -Wextra -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Werror -fno-common" meson .. -Ddocs=true -Dmans=true -Db_sanitize=address && ninja -v' + docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 -e CC ${{ env.BASENAME }} /bin/sh -c 'rm -rf build; mkdir -p build && cd build && CFLAGS="-Wformat -Wformat-security -Wextra -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Werror -fno-common -D_FORTIFY_SOURCE=2" meson .. -Ddocs=true -Dmans=true -Db_sanitize=address --buildtype=debugoptimized && ninja -v' - name: check spelling run: | docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${{ env.BASENAME }} ./travis/check-spelling.pl