mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-15 16:44:36 +02:00
8144695: --disable-warnings-as-errors does not work for HotSpot build
Reviewed-by: kbarrett, ihse
This commit is contained in:
parent
a4844cbbc3
commit
be21417b06
5 changed files with 12 additions and 7 deletions
|
@ -256,7 +256,7 @@ endif
|
||||||
|
|
||||||
# Compiler warnings are treated as errors
|
# Compiler warnings are treated as errors
|
||||||
ifneq ($(COMPILER_WARNINGS_FATAL),false)
|
ifneq ($(COMPILER_WARNINGS_FATAL),false)
|
||||||
WARNINGS_ARE_ERRORS = -Werror
|
WARNINGS_ARE_ERRORS ?= -Werror
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_CLANG), true)
|
ifeq ($(USE_CLANG), true)
|
||||||
|
|
|
@ -203,7 +203,7 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Compiler warnings are treated as errors
|
# Compiler warnings are treated as errors
|
||||||
WARNINGS_ARE_ERRORS = -Werror
|
WARNINGS_ARE_ERRORS ?= -Werror
|
||||||
|
|
||||||
ifeq ($(USE_CLANG), true)
|
ifeq ($(USE_CLANG), true)
|
||||||
# However we need to clean the code up before we can unrestrictedly enable this option with Clang
|
# However we need to clean the code up before we can unrestrictedly enable this option with Clang
|
||||||
|
|
|
@ -66,17 +66,21 @@ CXXFLAGS = $(SYSDEFS) $(INCLUDES)
|
||||||
CXXFLAGS += -DASSERT
|
CXXFLAGS += -DASSERT
|
||||||
|
|
||||||
ifndef USE_GCC
|
ifndef USE_GCC
|
||||||
# We need libCstd.so for adlc
|
# We need libCstd.so for adlc
|
||||||
CFLAGS += -library=Cstd -g
|
CFLAGS += -library=Cstd -g
|
||||||
LFLAGS += -library=Cstd -g
|
LFLAGS += -library=Cstd -g
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# CFLAGS_WARN holds compiler options to suppress/enable warnings.
|
# CFLAGS_WARN holds compiler options to suppress/enable warnings.
|
||||||
|
CFLAGS_WARN = +w
|
||||||
# Compiler warnings are treated as errors
|
# Compiler warnings are treated as errors
|
||||||
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
|
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
|
||||||
CFLAGS_WARN = +w -errwarn
|
WARNINGS_ARE_ERRORS ?= -xwe
|
||||||
endif
|
endif
|
||||||
# When using compiler version 5.13 (Solaris Studio 12.4), calls to explicitly
|
|
||||||
|
CFLAGS_WARN += $(WARNINGS_ARE_ERRORS)
|
||||||
|
|
||||||
|
# When using compiler version 5.13 (Solaris Studio 12.4), calls to explicitly
|
||||||
# instantiated template functions trigger this warning when +w is active.
|
# instantiated template functions trigger this warning when +w is active.
|
||||||
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 513), 1)
|
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 513), 1)
|
||||||
CFLAGS_WARN += -erroff=notemsource
|
CFLAGS_WARN += -erroff=notemsource
|
||||||
|
|
|
@ -117,7 +117,7 @@ endif
|
||||||
|
|
||||||
|
|
||||||
# Compiler warnings are treated as errors
|
# Compiler warnings are treated as errors
|
||||||
WARNINGS_ARE_ERRORS = -Werror
|
WARNINGS_ARE_ERRORS ?= -Werror
|
||||||
|
|
||||||
# Enable these warnings. See 'info gcc' about details on these options
|
# Enable these warnings. See 'info gcc' about details on these options
|
||||||
WARNING_FLAGS = -Wpointer-arith -Wconversion -Wsign-compare -Wundef -Wformat=2
|
WARNING_FLAGS = -Wpointer-arith -Wconversion -Wsign-compare -Wundef -Wformat=2
|
||||||
|
|
|
@ -145,7 +145,8 @@ endif
|
||||||
CFLAGS += -DDONT_USE_PRECOMPILED_HEADER
|
CFLAGS += -DDONT_USE_PRECOMPILED_HEADER
|
||||||
|
|
||||||
# Compiler warnings are treated as errors
|
# Compiler warnings are treated as errors
|
||||||
CFLAGS_WARN = -xwe
|
WARNINGS_ARE_ERRORS ?= -xwe
|
||||||
|
CFLAGS_WARN = $(WARNINGS_ARE_ERRORS)
|
||||||
|
|
||||||
################################################
|
################################################
|
||||||
# Begin current (>=5.9) Forte compiler options #
|
# Begin current (>=5.9) Forte compiler options #
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue