mirror of
https://github.com/darlinghq/darling-openjdk.git
synced 2025-02-02 14:31:58 +00:00
8201267: Disable warnings for VS2017 to enable building
Reviewed-by: ihse, tbell
This commit is contained in:
parent
cdd36df363
commit
a20bd3a6ce
@ -117,6 +117,17 @@ ifeq ($(MODULE), java.base)
|
|||||||
--hash-modules '^(?!$(EXCLUDE_PATTERN)$$)'
|
--hash-modules '^(?!$(EXCLUDE_PATTERN)$$)'
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
else # not java.base
|
||||||
|
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||||
|
# Only java.base needs to include the MSVC*_DLLs. Make sure no other module
|
||||||
|
# tries to include them (typically imported ones).
|
||||||
|
ifneq ($(wildcard $(LIBS_DIR)/$(notdir $(MSVCR_DLL))), )
|
||||||
|
JMOD_FLAGS += --exclude '$(notdir $(MSVCR_DLL))'
|
||||||
|
endif
|
||||||
|
ifneq ($(wildcard $(LIBS_DIR)/$(notdir $(MSVCP_DLL))), )
|
||||||
|
JMOD_FLAGS += --exclude '$(notdir $(MSVCP_DLL))'
|
||||||
|
endif
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Changes to the jmod tool itself should also trigger a rebuild of all jmods.
|
# Changes to the jmod tool itself should also trigger a rebuild of all jmods.
|
||||||
@ -133,18 +144,21 @@ ifeq ($(INTERIM_JMOD), true)
|
|||||||
DEPS := $(filter-out $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/classlist, $(DEPS))
|
DEPS := $(filter-out $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/classlist, $(DEPS))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.debuginfo,*.dSYM/**,*.dSYM,*.pdb,*.map}'
|
||||||
|
|
||||||
# Create jmods in a temp dir and then move them into place to keep the
|
# Create jmods in a temp dir and then move them into place to keep the
|
||||||
# module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times.
|
# module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times.
|
||||||
$(JMODS_DIR)/$(MODULE).jmod: $(DEPS)
|
$(JMODS_DIR)/$(MODULE).jmod: $(DEPS)
|
||||||
$(call LogWarn, Creating $(patsubst $(OUTPUTDIR)/%, %, $@))
|
$(call LogWarn, Creating $(patsubst $(OUTPUTDIR)/%, %, $@))
|
||||||
$(call MakeDir, $(JMODS_DIR) $(JMODS_TEMPDIR))
|
$(call MakeDir, $(JMODS_DIR) $(JMODS_TEMPDIR))
|
||||||
$(RM) $@ $(JMODS_TEMPDIR)/$(notdir $@)
|
$(RM) $@ $(JMODS_TEMPDIR)/$(notdir $@)
|
||||||
$(JMOD) create \
|
$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/jmods/$(MODULE).jmod, \
|
||||||
--module-version $(VERSION_SHORT) \
|
$(JMOD) create \
|
||||||
--target-platform '$(OPENJDK_MODULE_TARGET_PLATFORM)' \
|
--module-version $(VERSION_SHORT) \
|
||||||
--module-path $(JMODS_DIR) \
|
--target-platform '$(OPENJDK_MODULE_TARGET_PLATFORM)' \
|
||||||
--exclude '**{_the.*,_*.marker,*.diz,*.debuginfo,*.dSYM/**,*.dSYM,*.pdb,*.map}' \
|
--module-path $(JMODS_DIR) \
|
||||||
$(JMOD_FLAGS) $(JMODS_TEMPDIR)/$(notdir $@)
|
$(JMOD_FLAGS) $(JMODS_TEMPDIR)/$(notdir $@) \
|
||||||
|
)
|
||||||
$(MV) $(JMODS_TEMPDIR)/$(notdir $@) $@
|
$(MV) $(JMODS_TEMPDIR)/$(notdir $@) $@
|
||||||
|
|
||||||
TARGETS += $(JMODS_DIR)/$(MODULE).jmod
|
TARGETS += $(JMODS_DIR)/$(MODULE).jmod
|
||||||
|
@ -522,7 +522,6 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL],
|
|||||||
if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
|
if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
|
||||||
AC_MSG_RESULT([ok])
|
AC_MSG_RESULT([ok])
|
||||||
MSVC_DLL="$POSSIBLE_MSVC_DLL"
|
MSVC_DLL="$POSSIBLE_MSVC_DLL"
|
||||||
BASIC_FIXUP_PATH(MSVC_DLL)
|
|
||||||
AC_MSG_CHECKING([for $DLL_NAME])
|
AC_MSG_CHECKING([for $DLL_NAME])
|
||||||
AC_MSG_RESULT([$MSVC_DLL])
|
AC_MSG_RESULT([$MSVC_DLL])
|
||||||
else
|
else
|
||||||
|
@ -905,20 +905,22 @@ define SetupNativeCompilationBody
|
|||||||
|
|
||||||
$1_IMPORT_LIBRARY := $$($1_OBJECT_DIR)/$$($1_NAME).lib
|
$1_IMPORT_LIBRARY := $$($1_OBJECT_DIR)/$$($1_NAME).lib
|
||||||
$1_EXTRA_LDFLAGS += "-implib:$$($1_IMPORT_LIBRARY)"
|
$1_EXTRA_LDFLAGS += "-implib:$$($1_IMPORT_LIBRARY)"
|
||||||
# To properly trigger downstream dependants of the import library, just as
|
ifeq ($$($1_TYPE), LIBRARY)
|
||||||
# for debug files, we must have a recipe in the rule. To avoid rerunning
|
# To properly trigger downstream dependants of the import library, just as
|
||||||
# the recipe every time have it touch the target. If an import library
|
# for debug files, we must have a recipe in the rule. To avoid rerunning
|
||||||
# file is deleted by something external, explicitly delete the target to
|
# the recipe every time have it touch the target. If an import library
|
||||||
# trigger a rebuild of both.
|
# file is deleted by something external, explicitly delete the target to
|
||||||
ifneq ($$(wildcard $$($1_IMPORT_LIBRARY)), $$($1_IMPORT_LIBRARY))
|
# trigger a rebuild of both.
|
||||||
$$(call LogDebug, Deleting $$($1_BASENAME) because import library is missing)
|
ifneq ($$(wildcard $$($1_IMPORT_LIBRARY)), $$($1_IMPORT_LIBRARY))
|
||||||
$$(shell $(RM) $$($1_TARGET))
|
$$(call LogDebug, Deleting $$($1_BASENAME) because import library is missing)
|
||||||
endif
|
$$(shell $(RM) $$($1_TARGET))
|
||||||
$$($1_IMPORT_LIBRARY): $$($1_TARGET)
|
endif
|
||||||
|
$$($1_IMPORT_LIBRARY): $$($1_TARGET)
|
||||||
$$(if $$(CORRECT_FUNCTION_IN_RECIPE_EVALUATION), \
|
$$(if $$(CORRECT_FUNCTION_IN_RECIPE_EVALUATION), \
|
||||||
$$(if $$(wildcard $$@), , $$(error $$@ was not created for $$<)) \
|
$$(if $$(wildcard $$@), , $$(error $$@ was not created for $$<)) \
|
||||||
)
|
)
|
||||||
$(TOUCH) $$@
|
$(TOUCH) $$@
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
|
$1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
|
||||||
|
@ -88,6 +88,7 @@ $(eval $(call SetupJdkExecutable, BUILD_UNPACKEXE, \
|
|||||||
CFLAGS_solaris := -KPIC, \
|
CFLAGS_solaris := -KPIC, \
|
||||||
CFLAGS_macosx := -fPIC, \
|
CFLAGS_macosx := -fPIC, \
|
||||||
DISABLED_WARNINGS_gcc := unused-result implicit-fallthrough, \
|
DISABLED_WARNINGS_gcc := unused-result implicit-fallthrough, \
|
||||||
|
DISABLED_WARNINGS_microsoft := 4005, \
|
||||||
LDFLAGS := $(UNPACKEXE_ZIPOBJS) \
|
LDFLAGS := $(UNPACKEXE_ZIPOBJS) \
|
||||||
$(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
|
$(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
|
||||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||||
|
@ -543,7 +543,7 @@ else
|
|||||||
DISABLED_WARNINGS_solstudio := \
|
DISABLED_WARNINGS_solstudio := \
|
||||||
E_STATEMENT_NOT_REACHED \
|
E_STATEMENT_NOT_REACHED \
|
||||||
E_END_OF_LOOP_CODE_NOT_REACHED, \
|
E_END_OF_LOOP_CODE_NOT_REACHED, \
|
||||||
DISABLED_WARNINGS_microsoft := 4267 4244, \
|
DISABLED_WARNINGS_microsoft := 4267 4244 4312, \
|
||||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||||
))
|
))
|
||||||
|
@ -45,6 +45,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
|||||||
NAME := javaaccessbridge$1, \
|
NAME := javaaccessbridge$1, \
|
||||||
SRC := $(JAVA_AB_SRCDIR), \
|
SRC := $(JAVA_AB_SRCDIR), \
|
||||||
OPTIMIZATION := LOW, \
|
OPTIMIZATION := LOW, \
|
||||||
|
DISABLED_WARNINGS_microsoft := 4311 4302 4312, \
|
||||||
CFLAGS := $(CFLAGS_JDKLIB) $(ACCESSBRIDGE_CFLAGS) \
|
CFLAGS := $(CFLAGS_JDKLIB) $(ACCESSBRIDGE_CFLAGS) \
|
||||||
$(addprefix -I,$(JAVA_AB_SRCDIR)) \
|
$(addprefix -I,$(JAVA_AB_SRCDIR)) \
|
||||||
-I$(ROOT_SRCDIR)/include/bridge \
|
-I$(ROOT_SRCDIR)/include/bridge \
|
||||||
@ -69,6 +70,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
|
|||||||
NAME := windowsaccessbridge$1, \
|
NAME := windowsaccessbridge$1, \
|
||||||
SRC := $(WIN_AB_SRCDIR), \
|
SRC := $(WIN_AB_SRCDIR), \
|
||||||
OPTIMIZATION := LOW, \
|
OPTIMIZATION := LOW, \
|
||||||
|
DISABLED_WARNINGS_microsoft := 4311 4302 4312, \
|
||||||
CFLAGS := $(filter-out -MD, $(CFLAGS_JDKLIB)) -MT $(ACCESSBRIDGE_CFLAGS) \
|
CFLAGS := $(filter-out -MD, $(CFLAGS_JDKLIB)) -MT $(ACCESSBRIDGE_CFLAGS) \
|
||||||
$(addprefix -I,$(WIN_AB_SRCDIR)) \
|
$(addprefix -I,$(WIN_AB_SRCDIR)) \
|
||||||
-I$(ROOT_SRCDIR)/include/bridge \
|
-I$(ROOT_SRCDIR)/include/bridge \
|
||||||
|
@ -40,6 +40,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBUNPACK, \
|
|||||||
$(LIBJAVA_HEADER_FLAGS), \
|
$(LIBJAVA_HEADER_FLAGS), \
|
||||||
CFLAGS_release := -DPRODUCT, \
|
CFLAGS_release := -DPRODUCT, \
|
||||||
DISABLED_WARNINGS_gcc := implicit-fallthrough, \
|
DISABLED_WARNINGS_gcc := implicit-fallthrough, \
|
||||||
|
DISABLED_WARNINGS_microsoft := 4005, \
|
||||||
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
|
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
|
||||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||||
LDFLAGS_windows := -map:$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/unpack.map -debug, \
|
LDFLAGS_windows := -map:$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/unpack.map -debug, \
|
||||||
|
@ -90,7 +90,7 @@ assertTLSValue( jvmtiEnv * jvmtienv,
|
|||||||
jthread thread,
|
jthread thread,
|
||||||
const void * expected) {
|
const void * expected) {
|
||||||
jvmtiError error;
|
jvmtiError error;
|
||||||
void * test = (void *) 0x99999999UL;
|
void * test = (void *) 0x99999999ULL;
|
||||||
|
|
||||||
/* now check if we do a fetch we get what we wrote */
|
/* now check if we do a fetch we get what we wrote */
|
||||||
error = (*jvmtienv)->GetThreadLocalStorage(
|
error = (*jvmtienv)->GetThreadLocalStorage(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user