Remove -Werror from default CFLAGS
Production builds shouldn't include -Werror by default since that could cause spurious build failures when there are toolchain updates. CI uses -Werror to prevent warnings, so that should be sufficient.
This commit is contained in:
parent
35a6052fbc
commit
545ef842de
3 changed files with 5 additions and 3 deletions
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
|
|
@ -177,6 +177,7 @@ jobs:
|
|||
TARGET: ${{ matrix.target }}
|
||||
CC: ${{ matrix.cc }}
|
||||
AR: ${{ matrix.ar }}
|
||||
IS_WINDOWS: ${{ contains(matrix.os, 'windows') }}
|
||||
run: |
|
||||
PATH="$PWD/.github/scripts:$PATH"
|
||||
echo "$PWD/.github/scripts" >> $GITHUB_PATH
|
||||
|
|
@ -191,6 +192,8 @@ jobs:
|
|||
[ -n "$CC" ] && echo "CC=$CC" >> $GITHUB_ENV
|
||||
[ -n "$AR" ] && echo "AR=$AR" >> $GITHUB_ENV
|
||||
|
||||
[ "$IS_WINDOWS" = "false" ] && echo "CFLAGS=-Werror" >> $GITHUB_ENV
|
||||
|
||||
if [ "$USE_CROSS" == "true" ]; then
|
||||
echo "BUILD_CMD=cross" >> $GITHUB_ENV
|
||||
runner=$(BUILD_CMD=cross cross.sh bash -c "env | sed -nr '/^CARGO_TARGET_.*_RUNNER=/s///p'")
|
||||
|
|
@ -199,7 +202,7 @@ jobs:
|
|||
|
||||
- name: Build C library
|
||||
if: ${{ !contains(matrix.os, 'windows') }} # Requires an additional adapted Makefile for `cl.exe` compiler
|
||||
run: make.sh CFLAGS="-Werror" -j
|
||||
run: make.sh -j
|
||||
|
||||
- name: Build wasm library
|
||||
if: ${{ !matrix.cli-only && !matrix.use-cross }} # No sense to build on the same Github runner hosts many times
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue