8210920: Native C++ tests are not using CXXFLAGS
Reviewed-by: tbell, erikj
This commit is contained in:
parent
ea9331f871
commit
481a045635
@ -386,17 +386,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS],
|
||||
IF_FALSE: [FDLIBM_CFLAGS=""])
|
||||
fi
|
||||
AC_SUBST(FDLIBM_CFLAGS)
|
||||
|
||||
# Tests are only ever compiled for TARGET
|
||||
CFLAGS_TESTLIB="$CFLAGS_JDKLIB"
|
||||
CXXFLAGS_TESTLIB="$CXXFLAGS_JDKLIB"
|
||||
CFLAGS_TESTEXE="$CFLAGS_JDKEXE"
|
||||
CXXFLAGS_TESTEXE="$CXXFLAGS_JDKEXE"
|
||||
|
||||
AC_SUBST(CFLAGS_TESTLIB)
|
||||
AC_SUBST(CFLAGS_TESTEXE)
|
||||
AC_SUBST(CXXFLAGS_TESTLIB)
|
||||
AC_SUBST(CXXFLAGS_TESTEXE)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
|
@ -51,9 +51,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS],
|
||||
|
||||
FLAGS_SETUP_LDFLAGS_CPU_DEP([BUILD], [OPENJDK_BUILD_])
|
||||
|
||||
LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
|
||||
LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE ${TARGET_LDFLAGS_JDK_LIBPATH}"
|
||||
AC_SUBST(LDFLAGS_TESTLIB)
|
||||
LDFLAGS_TESTEXE="${TARGET_LDFLAGS_JDK_LIBPATH}"
|
||||
AC_SUBST(LDFLAGS_TESTEXE)
|
||||
])
|
||||
|
||||
|
@ -488,11 +488,6 @@ LDCXX:=@FIXPATH@ @LDCXX@
|
||||
LIBCXX:=@LIBCXX@
|
||||
|
||||
# Compiler and linker flags used when building native tests
|
||||
CFLAGS_TESTLIB:=@CFLAGS_TESTLIB@
|
||||
CXXFLAGS_TESTLIB:=@CXXFLAGS_TESTLIB@
|
||||
CFLAGS_TESTEXE:=@CFLAGS_TESTEXE@
|
||||
CXXFLAGS_TESTEXE:=@CXXFLAGS_TESTEXE@
|
||||
LDFLAGS_TESTLIB:=@LDFLAGS_TESTLIB@
|
||||
LDFLAGS_TESTEXE:=@LDFLAGS_TESTEXE@
|
||||
|
||||
# BUILD_CC/BUILD_LD is a compiler/linker that generates code that is runnable on the
|
||||
|
@ -60,14 +60,16 @@ define SetupTestFilesCompilationBody
|
||||
ifeq ($$($1_TYPE), LIBRARY)
|
||||
$1_PREFIX = lib
|
||||
$1_OUTPUT_SUBDIR := lib
|
||||
$1_CFLAGS += $(CFLAGS_TESTLIB)
|
||||
$1_LDFLAGS := $(LDFLAGS_TESTLIB) $(call SET_SHARED_LIBRARY_ORIGIN)
|
||||
$1_BASE_CFLAGS := $(CFLAGS_JDKLIB)
|
||||
$1_BASE_CXXFLAGS := $(CXXFLAGS_JDKLIB)
|
||||
$1_LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN)
|
||||
$1_COMPILATION_TYPE := LIBRARY
|
||||
else ifeq ($$($1_TYPE), PROGRAM)
|
||||
$1_PREFIX = exe
|
||||
$1_OUTPUT_SUBDIR := bin
|
||||
$1_CFLAGS += $(CFLAGS_TESTEXE)
|
||||
$1_LDFLAGS := $(LDFLAGS_TESTEXE)
|
||||
$1_BASE_CFLAGS := $(CFLAGS_JDKEXE)
|
||||
$1_BASE_CXXFLAGS := $(CXXFLAGS_JDKEXE)
|
||||
$1_LDFLAGS := $(LDFLAGS_JDKEXE) $(LDFLAGS_TESTEXE)
|
||||
$1_COMPILATION_TYPE := EXECUTABLE
|
||||
else
|
||||
$$(error Unknown type: $$($1_TYPE))
|
||||
@ -92,8 +94,11 @@ define SetupTestFilesCompilationBody
|
||||
INCLUDE_FILES := $$(notdir $$(file)), \
|
||||
OBJECT_DIR := $$($1_OUTPUT_DIR)/support/$$(name), \
|
||||
OUTPUT_DIR := $$($1_OUTPUT_DIR)/$$($1_OUTPUT_SUBDIR), \
|
||||
CFLAGS := $$($1_CFLAGS) $$($1_CFLAGS_$$(name)), \
|
||||
CFLAGS := $$($1_BASE_CFLAGS) $$($1_CFLAGS) $$($1_CFLAGS_$$(name)), \
|
||||
CXXFLAGS := $$($1_BASE_CXXFLAGS) $$($1_CFLAGS) $$($1_CFLAGS_$$(name)), \
|
||||
LDFLAGS := $$($1_LDFLAGS) $$($1_LDFLAGS_$$(name)), \
|
||||
DISABLED_WARNINGS_CXX_solstudio := wvarhidenmem, \
|
||||
DISABLED_WARNINGS_CXX_gcc := format, \
|
||||
LIBS := $$($1_LIBS_$$(name)), \
|
||||
TOOLCHAIN := $(if $$(filter %.cpp, $$(file)), TOOLCHAIN_LINK_CXX, TOOLCHAIN_DEFAULT), \
|
||||
OPTIMIZATION := $$(if $$($1_OPTIMIZATION_$$(name)),$$($1_OPTIMIZATION_$$(name)),LOW), \
|
||||
|
Loading…
Reference in New Issue
Block a user