From 9217cecc8bee7b2a6759f38eafb823703c9d0617 Mon Sep 17 00:00:00 2001 From: Xiretza Date: Mon, 16 May 2022 18:32:51 +0200 Subject: fix(configure): disable -Werror by default Because the build system does not have direct control over the compiler, it cannot ensure that no warnings are issued in downstream compilations. Such warnings can occur due to newer compiler versions with more sophisticated diagnostics, older compiler versions with diagnostics bugs, or simply different, untested compilers. With -Werror enabled by default, these harmless warnings result in complete compilation failures. The option remains enabled in CI to ensure upstream code quality. --- scripts/ci-run.sh | 2 ++ scripts/msys2-llvm/PKGBUILD | 1 + scripts/msys2-mcode/PKGBUILD | 1 + 3 files changed, 4 insertions(+) (limited to 'scripts') diff --git a/scripts/ci-run.sh b/scripts/ci-run.sh index 368224085..ecfd6e358 100755 --- a/scripts/ci-run.sh +++ b/scripts/ci-run.sh @@ -202,6 +202,8 @@ build () { mkdir "build-$BACK" cd "build-$BACK" + CONFIG_OPTS+=" --enable-werror" + if [ "x$ISSYNTH" = "xfalse" ]; then CONFIG_OPTS+=" --disable-synth" fi diff --git a/scripts/msys2-llvm/PKGBUILD b/scripts/msys2-llvm/PKGBUILD index 0c7848209..91aba6f59 100644 --- a/scripts/msys2-llvm/PKGBUILD +++ b/scripts/msys2-llvm/PKGBUILD @@ -28,6 +28,7 @@ build() { --prefix=${MINGW_PREFIX} \ --with-llvm-config="llvm-config --link-static" \ LDFLAGS="-static" \ + --enable-werror \ --enable-libghdl \ --enable-synth make GNATMAKE="gnatmake -j$(nproc)" diff --git a/scripts/msys2-mcode/PKGBUILD b/scripts/msys2-mcode/PKGBUILD index 7c77fbf75..1e01fa613 100644 --- a/scripts/msys2-mcode/PKGBUILD +++ b/scripts/msys2-mcode/PKGBUILD @@ -24,6 +24,7 @@ build() { ../../../../configure \ --prefix=${MINGW_PREFIX} \ LDFLAGS="-static -Wl,--stack=8388608" \ + --enable-werror \ --enable-libghdl \ --enable-synth make GNATMAKE="gnatmake -j$(nproc)" -- cgit v1.2.3