8328146: Set LIBCXX automatically
Reviewed-by: erikj
This commit is contained in:
parent
90ab52e598
commit
42aec8c5e7
@ -140,6 +140,10 @@ define SetupJdkLibraryBody
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($$($1_LINK_TYPE), C++)
|
||||
$1_LIBS += $(LIBCXX)
|
||||
endif
|
||||
|
||||
ifeq ($$($1_SRC), )
|
||||
ifneq ($$(MODULE), )
|
||||
$1_SRC := $$(call FindSrcDirsForLib, $$(MODULE), $$($1_NAME))
|
||||
@ -233,6 +237,10 @@ define SetupJdkExecutableBody
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($$($1_LINK_TYPE), C++)
|
||||
$1_LIBS += $(LIBCXX)
|
||||
endif
|
||||
|
||||
ifeq ($$($1_VERSIONINFO_RESOURCE), )
|
||||
$1_VERSIONINFO_RESOURCE := $$(GLOBAL_VERSION_INFO_RESOURCE)
|
||||
endif
|
||||
|
@ -141,7 +141,6 @@ $(eval $(call SetupJdkExecutable, BUILD_GTEST_LAUNCHER, \
|
||||
-I$(GTEST_FRAMEWORK_SRC)/googlemock/include, \
|
||||
LDFLAGS := $(LDFLAGS_JDKEXE), \
|
||||
LDFLAGS_unix := -L$(JVM_OUTPUTDIR)/gtest $(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LIBS_linux := $(LIBCXX), \
|
||||
LIBS_unix := -ljvm, \
|
||||
LIBS_windows := $(JVM_OUTPUTDIR)/gtest/objs/jvm.lib, \
|
||||
COPY_DEBUG_SYMBOLS := $(GTEST_COPY_DEBUG_SYMBOLS), \
|
||||
|
@ -213,9 +213,8 @@ $(eval $(call SetupJdkLibrary, BUILD_SYSLOOKUPLIB, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB), \
|
||||
LDFLAGS_linux := -Wl$(COMMA)--no-as-needed, \
|
||||
LDFLAGS_aix := -brtl -bexpfull, \
|
||||
LIBS := $(LIBCXX), \
|
||||
LIBS_linux := -lc -lm -ldl, \
|
||||
LIBS_aix := -lc -lm -ldecNumber, \
|
||||
LIBS_linux := -lm -ldl, \
|
||||
LIBS_aix := -lm -ldecNumber, \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_SYSLOOKUPLIB)
|
||||
@ -247,8 +246,7 @@ ifeq ($(call isTargetOs, linux)+$(call isTargetCpu, x86_64)+$(INCLUDE_COMPILER2)
|
||||
CXXFLAGS := $(CXXFLAGS_JDKLIB) -std=c++17, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LIBS := $(LIBCXX), \
|
||||
LIBS_linux := -lc -lm -ldl, \
|
||||
LIBS_linux := -lm -ldl, \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIB_SIMD_SORT)
|
||||
|
@ -122,7 +122,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJIMAGE, \
|
||||
CFLAGS_unix := -UDEBUG, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LIBS_unix := -ljvm -ldl $(LIBCXX), \
|
||||
LIBS_unix := -ljvm -ldl, \
|
||||
LIBS_windows := jvm.lib, \
|
||||
))
|
||||
|
||||
|
@ -71,7 +71,7 @@ ifeq ($(call isTargetOs, aix), false)
|
||||
LIBS_linux := $(ALSA_LIBS), \
|
||||
LIBS_macosx := -framework CoreAudio -framework CoreFoundation \
|
||||
-framework CoreServices -framework AudioUnit \
|
||||
-framework CoreMIDI -framework AudioToolbox $(LIBCXX), \
|
||||
-framework CoreMIDI -framework AudioToolbox, \
|
||||
LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib dsound.lib winmm.lib user32.lib ole32.lib, \
|
||||
))
|
||||
|
||||
|
@ -572,7 +572,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \
|
||||
LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
|
||||
LDFLAGS_aix := -Wl$(COMMA)-berok, \
|
||||
LIBS := $(BUILD_LIBFONTMANAGER_FONTLIB), \
|
||||
LIBS_unix := -lawt -ljava -ljvm $(LIBM) $(LIBCXX), \
|
||||
LIBS_unix := -lawt -ljava -ljvm $(LIBM), \
|
||||
LIBS_macosx := -lawt_lwawt -framework CoreText -framework CoreFoundation -framework CoreGraphics, \
|
||||
LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib gdi32.lib \
|
||||
$(WIN_AWT_LIB), \
|
||||
|
@ -66,7 +66,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBSA, \
|
||||
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(SA_CFLAGS) $(SA_CXXFLAGS), \
|
||||
EXTRA_SRC := $(LIBSA_EXTRA_SRC), \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LIBS := $(LIBCXX), \
|
||||
LIBS_unix := -ljava, \
|
||||
LIBS_linux := $(LIBDL), \
|
||||
LIBS_macosx := -framework Foundation \
|
||||
|
@ -35,7 +35,7 @@ ifeq ($(call isTargetOs, linux macosx windows), true)
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CXXFLAGS_JDKLIB), \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB), \
|
||||
LIBS_unix := $(JDKLIB_LIBS) $(LIBCXX), \
|
||||
LIBS_unix := $(JDKLIB_LIBS), \
|
||||
LIBS_windows := $(JDKLIB_LIBS) user32.lib, \
|
||||
))
|
||||
|
||||
|
@ -75,8 +75,8 @@ $(eval $(call SetupJdkExecutable, BUILD_JPACKAGE_APPLAUNCHEREXE, \
|
||||
CXXFLAGS_windows := $(JPACKAGE_CXXFLAGS_windows), \
|
||||
CFLAGS_windows := $(JPACKAGE_CFLAGS_windows), \
|
||||
LDFLAGS := $(LDFLAGS_JDKEXE), \
|
||||
LIBS_macosx := $(LIBCXX) -framework Cocoa -rpath @executable_path/../Frameworks/ -rpath @executable_path/../PlugIns/, \
|
||||
LIBS_windows := $(LIBCXX) user32.lib ole32.lib msi.lib shlwapi.lib \
|
||||
LIBS_macosx := -framework Cocoa -rpath @executable_path/../Frameworks/ -rpath @executable_path/../PlugIns/, \
|
||||
LIBS_windows := user32.lib ole32.lib msi.lib shlwapi.lib \
|
||||
Shell32.lib, \
|
||||
LIBS_linux := -ldl, \
|
||||
MANIFEST := $(JAVA_MANIFEST), \
|
||||
@ -110,7 +110,7 @@ ifeq ($(call isTargetOs, linux), true)
|
||||
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(JPACKAGE_LIBAPPLAUNCHER_INCLUDES), \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(JPACKAGE_LIBAPPLAUNCHER_INCLUDES), \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB), \
|
||||
LIBS := $(LIBCXX) -ldl, \
|
||||
LIBS := -ldl, \
|
||||
))
|
||||
|
||||
JPACKAGE_TARGETS += $(BUILD_JPACKAGE_LIBAPPLAUNCHER)
|
||||
@ -129,7 +129,7 @@ ifeq ($(call isTargetOs, windows), true)
|
||||
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(JPACKAGE_CXXFLAGS_windows), \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LIBS := $(LIBCXX) advapi32.lib ole32.lib msi.lib user32.lib \
|
||||
LIBS := advapi32.lib ole32.lib msi.lib user32.lib \
|
||||
shlwapi.lib Shell32.lib, \
|
||||
))
|
||||
|
||||
@ -150,7 +150,7 @@ ifeq ($(call isTargetOs, windows), true)
|
||||
CXXFLAGS := $(call JpackageWithStaticCrt, $(CXXFLAGS_JDKLIB)) \
|
||||
$(addprefix -I, $(JPACKAGE_WIXHELPER_SRC)) $(JPACKAGE_CXXFLAGS_windows), \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
|
||||
LIBS := $(LIBCXX) ole32.lib msi.lib User32.lib shlwapi.lib \
|
||||
LIBS := ole32.lib msi.lib User32.lib shlwapi.lib \
|
||||
Shell32.lib, \
|
||||
))
|
||||
|
||||
@ -169,7 +169,7 @@ ifeq ($(call isTargetOs, windows), true)
|
||||
CXXFLAGS := $(call JpackageWithStaticCrt, $(CXXFLAGS_JDKEXE)) \
|
||||
$(addprefix -I, $(JPACKAGE_MSIWRAPPER_SRC)) $(JPACKAGE_CXXFLAGS_windows), \
|
||||
LDFLAGS := $(LDFLAGS_JDKEXE), \
|
||||
LIBS := $(LIBCXX) ole32.lib msi.lib user32.lib shlwapi.lib Shell32.lib, \
|
||||
LIBS := ole32.lib msi.lib user32.lib shlwapi.lib Shell32.lib, \
|
||||
))
|
||||
|
||||
JPACKAGE_TARGETS += $(BUILD_JPACKAGE_MSIWRAPPER)
|
||||
|
Loading…
Reference in New Issue
Block a user