mirror of
https://github.com/corda/corda.git
synced 2025-01-17 02:09:50 +00:00
disable -Werror by default (but still use it for continuous integration)
Since we can't predict what warnings future compilers will emit, and most people just want to build Avian without some new warning tripping it up, we now omit -Werror unless requested via the "use-werror=true" option to make. Note that we pass "use-werror=true" in test/ci.sh to ensure Travis alerts us to new warnings as they appear. BTW, sorry about the unrelated whitespace changes in this patch; I've got Emacs set up to fix whitespace "problems" on save, and those are what it found.
This commit is contained in:
parent
ee7da77c70
commit
3247093b10
14
makefile
14
makefile
@ -46,8 +46,8 @@ endif
|
|||||||
ifeq ($(bootimage),true)
|
ifeq ($(bootimage),true)
|
||||||
options := $(options)-bootimage
|
options := $(options)-bootimage
|
||||||
ifeq ($(bootimage-test),true)
|
ifeq ($(bootimage-test),true)
|
||||||
# this option indicates that we should AOT-compile the test
|
# this option indicates that we should AOT-compile the test
|
||||||
# classes as well as the class library
|
# classes as well as the class library
|
||||||
options := $(options)-test
|
options := $(options)-test
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@ -126,6 +126,10 @@ ifeq ($(bootimage-test),true)
|
|||||||
bootimage-classpath = $(classpath-build):$(test-build)
|
bootimage-classpath = $(classpath-build):$(test-build)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(use-werror),true)
|
||||||
|
werror = -Werror
|
||||||
|
endif
|
||||||
|
|
||||||
test-executable = $(shell pwd)/$(executable)
|
test-executable = $(shell pwd)/$(executable)
|
||||||
boot-classpath = $(classpath-build)
|
boot-classpath = $(classpath-build)
|
||||||
embed-prefix = /avian-embedded
|
embed-prefix = /avian-embedded
|
||||||
@ -464,7 +468,7 @@ endif
|
|||||||
# note that we suppress the non-virtual-dtor warning because we never
|
# note that we suppress the non-virtual-dtor warning because we never
|
||||||
# use the delete operator, which means we don't need virtual
|
# use the delete operator, which means we don't need virtual
|
||||||
# destructors:
|
# destructors:
|
||||||
warnings = -Wall -Wextra -Werror -Wunused-parameter -Winit-self \
|
warnings = -Wall -Wextra $(werror) -Wunused-parameter -Winit-self \
|
||||||
-Wno-non-virtual-dtor
|
-Wno-non-virtual-dtor
|
||||||
|
|
||||||
target-cflags = -DTARGET_BYTES_PER_WORD=$(pointer-size)
|
target-cflags = -DTARGET_BYTES_PER_WORD=$(pointer-size)
|
||||||
@ -492,7 +496,7 @@ converter-cflags = -D__STDC_CONSTANT_MACROS -std=c++0x -Iinclude/ -Isrc/ \
|
|||||||
-fno-rtti -fno-exceptions \
|
-fno-rtti -fno-exceptions \
|
||||||
-DAVIAN_TARGET_ARCH=AVIAN_ARCH_UNKNOWN \
|
-DAVIAN_TARGET_ARCH=AVIAN_ARCH_UNKNOWN \
|
||||||
-DAVIAN_TARGET_FORMAT=AVIAN_FORMAT_UNKNOWN \
|
-DAVIAN_TARGET_FORMAT=AVIAN_FORMAT_UNKNOWN \
|
||||||
-Wall -Wextra -Werror -Wunused-parameter -Winit-self -Wno-non-virtual-dtor
|
-Wall -Wextra $(werror) -Wunused-parameter -Winit-self -Wno-non-virtual-dtor
|
||||||
|
|
||||||
cflags = $(build-cflags)
|
cflags = $(build-cflags)
|
||||||
|
|
||||||
@ -736,7 +740,7 @@ ifeq ($(kernel),darwin)
|
|||||||
sdk-dir = $(platform-dir)/Developer/SDKs
|
sdk-dir = $(platform-dir)/Developer/SDKs
|
||||||
|
|
||||||
mac-version := $(shell \
|
mac-version := $(shell \
|
||||||
if test -d $(sdk-dir)/MacOSX10.11.sdk; then echo 10.11; \
|
if test -d $(sdk-dir)/MacOSX10.11.sdk; then echo 10.11; \
|
||||||
elif test -d $(sdk-dir)/MacOSX10.10.sdk; then echo 10.10; \
|
elif test -d $(sdk-dir)/MacOSX10.10.sdk; then echo 10.10; \
|
||||||
elif test -d $(sdk-dir)/MacOSX10.9.sdk; then echo 10.9; \
|
elif test -d $(sdk-dir)/MacOSX10.9.sdk; then echo 10.9; \
|
||||||
elif test -d $(sdk-dir)/MacOSX10.8.sdk; then echo 10.8; \
|
elif test -d $(sdk-dir)/MacOSX10.8.sdk; then echo 10.8; \
|
||||||
|
@ -4,7 +4,7 @@ set -eo pipefail
|
|||||||
|
|
||||||
root_dir=$(pwd)
|
root_dir=$(pwd)
|
||||||
|
|
||||||
flags="${@}"
|
flags="use-werror=true ${@}"
|
||||||
|
|
||||||
is-mac() {
|
is-mac() {
|
||||||
if [[ $(uname -s) == "Darwin" || ${TRAVIS_OS_NAME} == "osx" ]]; then
|
if [[ $(uname -s) == "Darwin" || ${TRAVIS_OS_NAME} == "osx" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user