Add option --enable-werror (#3038)
This adds configure option `--enable-werror` to `./configure` script which adds `-Werror` to build time CFLAGS.
This commit is contained in:
parent
e8fa0613db
commit
fb63f399ef
8
.github/workflows/ci-push.yml
vendored
8
.github/workflows/ci-push.yml
vendored
|
@ -37,6 +37,7 @@ jobs:
|
|||
run: >
|
||||
./configure
|
||||
--prefix=$GITHUB_WORKSPACE/../racketcgc
|
||||
--enable-werror
|
||||
$RACKET_EXTRA_CONFIGURE_ARGS
|
||||
--enable-cgcdefault
|
||||
--enable-jit
|
||||
|
@ -51,7 +52,7 @@ jobs:
|
|||
working-directory: ./racket/src
|
||||
run: |
|
||||
export cpus=$(grep -c ^processor /proc/cpuinfo)
|
||||
make CFLAGS="-Werror -O2" -l $cpus -j $((cpus+1))
|
||||
make -l $cpus -j $((cpus+1))
|
||||
- name: Installing
|
||||
working-directory: ./racket/src
|
||||
run: make -j $((cpus+1)) install
|
||||
|
@ -123,6 +124,7 @@ jobs:
|
|||
run: >
|
||||
./configure
|
||||
--prefix=$GITHUB_WORKSPACE/../racket3m
|
||||
--enable-werror
|
||||
$RACKET_EXTRA_CONFIGURE_ARGS
|
||||
--enable-racket=$GITHUB_WORKSPACE/../racketcgc/bin/racket
|
||||
--enable-foreign
|
||||
|
@ -136,10 +138,10 @@ jobs:
|
|||
working-directory: ./racket/src
|
||||
run: |
|
||||
export cpus=$(grep -c ^processor /proc/cpuinfo)
|
||||
make CFLAGS="-Werror -O2" -l $cpus -j $((cpus+1))
|
||||
make -l $cpus -j $((cpus+1))
|
||||
- name: Installing
|
||||
working-directory: ./racket/src
|
||||
run: make -j $((cpus+1)) install
|
||||
run: make -j $((cpus+1)) install
|
||||
# We build on Linux with clang and gcc and on MacOS with clang only.
|
||||
# However, it makes little sense to test both builds on Linux so we tarball the
|
||||
# gcc build only. Therefore this condition ensure we only perform the tarball
|
||||
|
|
|
@ -844,6 +844,7 @@ enable_gcov
|
|||
enable_noopt
|
||||
enable_ubsan
|
||||
enable_jitframe
|
||||
enable_werror
|
||||
enable_crossany
|
||||
'
|
||||
ac_precious_vars='build_alias
|
||||
|
@ -1508,6 +1509,7 @@ Optional Features:
|
|||
--enable-noopt drop -O C flags (useful for low-level debugging)
|
||||
--enable-ubsan compile with -fsanitize=undefined
|
||||
--enable-jitframe x86_64: use frame pointer for internal calls
|
||||
--enable-werror compile sources with warnings as errors
|
||||
--enable-crossany Record own cross target as machine-independent
|
||||
|
||||
Some influential environment variables:
|
||||
|
@ -2909,6 +2911,12 @@ if test "${enable_jitframe+set}" = set; then :
|
|||
fi
|
||||
|
||||
|
||||
# Check whether --enable-werror was given.
|
||||
if test "${enable_werror+set}" = set; then :
|
||||
enableval=$enable_werror;
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --enable-crossany was given.
|
||||
if test "${enable_crossany+set}" = set; then :
|
||||
enableval=$enable_crossany;
|
||||
|
@ -7021,6 +7029,11 @@ else
|
|||
FOREIGN_OBJSLIB="\$(FOREIGN_OBJS)"
|
||||
fi
|
||||
|
||||
# Last but not least, if Werror was requested, add it now
|
||||
if test "${enable_werror}" = "yes"; then
|
||||
CFLAGS="-Werror ${CFLAGS}"
|
||||
fi
|
||||
|
||||
############## final output ################
|
||||
|
||||
LIBS="$LIBS $EXTRALIBS"
|
||||
|
|
|
@ -81,6 +81,8 @@ AC_ARG_ENABLE(noopt, [ --enable-noopt drop -O C flags (useful for lo
|
|||
m4_include(../ac/ubsan_arg.m4)
|
||||
AC_ARG_ENABLE(jitframe,[ --enable-jitframe x86_64: use frame pointer for internal calls])
|
||||
|
||||
AC_ARG_ENABLE(werror, [ --enable-werror compile sources with warnings as errors])
|
||||
|
||||
m4_include(../ac/crossany_arg.m4)
|
||||
|
||||
###### Some flags imply other flags #######
|
||||
|
@ -1435,6 +1437,11 @@ else
|
|||
FOREIGN_OBJSLIB="\$(FOREIGN_OBJS)"
|
||||
fi
|
||||
|
||||
# Last but not least, if Werror was requested, add it now
|
||||
if test "${enable_werror}" = "yes"; then
|
||||
CFLAGS="-Werror ${CFLAGS}"
|
||||
fi
|
||||
|
||||
############## final output ################
|
||||
|
||||
LIBS="$LIBS $EXTRALIBS"
|
||||
|
|
|
@ -190,7 +190,7 @@ static Scheme_Object **ts_scheme_on_demand(Scheme_Object **rs) XFORM_SKIP_PROC
|
|||
static int common0(mz_jit_state *jitter, void *_data)
|
||||
{
|
||||
int in;
|
||||
GC_CAN_IGNORE jit_insn *ref;
|
||||
GC_CAN_IGNORE jit_insn *ref USED_ONLY_FOR_FUTURES;
|
||||
|
||||
/* *** check_arity_code *** */
|
||||
/* Called as a function: */
|
||||
|
|
Loading…
Reference in New Issue
Block a user