< prev index next >
make/common/NativeCompilation.gmk
Print this page
*** 173,185 ****
$(foreach extension, $(NATIVE_SOURCE_EXTENSIONS), \
$(patsubst $(extension),%$(OBJ_SUFFIX), $(filter $(extension), $1))) \
)
endef
! ifeq ($(OPENJDK_BUILD_OS_ENV), windows.cygwin)
UNIX_PATH_PREFIX := /cygdrive
! else ifeq ($(OPENJDK_BUILD_OS_ENV), windows.msys)
UNIX_PATH_PREFIX :=
endif
# This pattern is used to transform the output of the microsoft CL compiler
# into a make syntax dependency file (.d)
--- 173,185 ----
$(foreach extension, $(NATIVE_SOURCE_EXTENSIONS), \
$(patsubst $(extension),%$(OBJ_SUFFIX), $(filter $(extension), $1))) \
)
endef
! ifeq ($(call isBuildOsEnv, windows.cygwin), true)
UNIX_PATH_PREFIX := /cygdrive
! else ifeq ($(call isBuildOsEnv, windows.msys), true)
UNIX_PATH_PREFIX :=
endif
# This pattern is used to transform the output of the microsoft CL compiler
# into a make syntax dependency file (.d)
*** 768,778 ****
$$(if $$(filter %.vardeps, $$?), 'due to makefile changes')))
endif
$(TOUCH) $$@
# On windows we need to create a resource file
! ifeq ($(OPENJDK_TARGET_OS), windows)
ifneq ($$($1_VERSIONINFO_RESOURCE), )
$1_RES := $$($1_OBJECT_DIR)/$$($1_BASENAME).res
$1_RES_DEP := $$($1_RES).d
$1_RES_DEP_TARGETS := $$($1_RES).d.targets
-include $$($1_RES_DEP)
--- 768,778 ----
$$(if $$(filter %.vardeps, $$?), 'due to makefile changes')))
endif
$(TOUCH) $$@
# On windows we need to create a resource file
! ifeq ($(call isTargetOs, windows), true)
ifneq ($$($1_VERSIONINFO_RESOURCE), )
$1_RES := $$($1_OBJECT_DIR)/$$($1_BASENAME).res
$1_RES_DEP := $$($1_RES).d
$1_RES_DEP_TARGETS := $$($1_RES).d.targets
-include $$($1_RES_DEP)
*** 806,816 ****
endif
endif
ifneq ($(DISABLE_MAPFILES), true)
$1_REAL_MAPFILE := $$($1_MAPFILE)
! ifneq ($(OPENJDK_TARGET_OS), windows)
ifneq ($$($1_REORDER), )
$1_REAL_MAPFILE := $$($1_OBJECT_DIR)/mapfile
$$($1_REAL_MAPFILE) : $$($1_MAPFILE) $$($1_REORDER)
$$(call MakeDir, $$(@D))
--- 806,816 ----
endif
endif
ifneq ($(DISABLE_MAPFILES), true)
$1_REAL_MAPFILE := $$($1_MAPFILE)
! ifneq ($(call isTargetOs, windows), true)
ifneq ($$($1_REORDER), )
$1_REAL_MAPFILE := $$($1_OBJECT_DIR)/mapfile
$$($1_REAL_MAPFILE) : $$($1_MAPFILE) $$($1_REORDER)
$$(call MakeDir, $$(@D))
*** 843,874 ****
ifeq ($$($1_COPY_DEBUG_SYMBOLS), true)
ifneq ($$($1_DEBUG_SYMBOLS), false)
# Only copy debug symbols for dynamic libraries and programs.
ifneq ($$($1_TYPE), STATIC_LIBRARY)
# Generate debuginfo files.
! ifeq ($(OPENJDK_TARGET_OS), windows)
$1_EXTRA_LDFLAGS += -debug "-pdb:$$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).pdb" \
"-map:$$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).map"
$1_DEBUGINFO_FILES := $$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).pdb \
$$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).map
! else ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris), )
$1_DEBUGINFO_FILES := $$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).debuginfo
# Setup the command line creating debuginfo files, to be run after linking.
# It cannot be run separately since it updates the original target file
$1_CREATE_DEBUGINFO_CMDS := \
$$($1_OBJCOPY) --only-keep-debug $$($1_TARGET) $$($1_DEBUGINFO_FILES) $$(NEWLINE) \
$(CD) $$($1_OUTPUT_DIR) && \
$$($1_OBJCOPY) --add-gnu-debuglink=$$($1_DEBUGINFO_FILES) $$($1_TARGET)
! else ifeq ($(OPENJDK_TARGET_OS), macosx)
$1_DEBUGINFO_FILES := \
$$($1_OUTPUT_DIR)/$$($1_BASENAME).dSYM/Contents/Info.plist \
$$($1_OUTPUT_DIR)/$$($1_BASENAME).dSYM/Contents/Resources/DWARF/$$($1_BASENAME)
$1_CREATE_DEBUGINFO_CMDS := \
$(DSYMUTIL) --out $$($1_OUTPUT_DIR)/$$($1_BASENAME).dSYM $$($1_TARGET)
! endif # OPENJDK_TARGET_OS
# Since the link rule creates more than one file that we want to track,
# we have to use some tricks to get make to cooperate. To properly
# trigger downstream dependants of $$($1_DEBUGINFO_FILES), we must have
# a recipe in the rule below. To avoid rerunning the recipe every time
--- 843,874 ----
ifeq ($$($1_COPY_DEBUG_SYMBOLS), true)
ifneq ($$($1_DEBUG_SYMBOLS), false)
# Only copy debug symbols for dynamic libraries and programs.
ifneq ($$($1_TYPE), STATIC_LIBRARY)
# Generate debuginfo files.
! ifeq ($(call isTargetOs, windows), true)
$1_EXTRA_LDFLAGS += -debug "-pdb:$$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).pdb" \
"-map:$$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).map"
$1_DEBUGINFO_FILES := $$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).pdb \
$$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).map
! else ifeq ($(call isTargetOs, linux solaris), true)
$1_DEBUGINFO_FILES := $$($1_OUTPUT_DIR)/$$($1_NOSUFFIX).debuginfo
# Setup the command line creating debuginfo files, to be run after linking.
# It cannot be run separately since it updates the original target file
$1_CREATE_DEBUGINFO_CMDS := \
$$($1_OBJCOPY) --only-keep-debug $$($1_TARGET) $$($1_DEBUGINFO_FILES) $$(NEWLINE) \
$(CD) $$($1_OUTPUT_DIR) && \
$$($1_OBJCOPY) --add-gnu-debuglink=$$($1_DEBUGINFO_FILES) $$($1_TARGET)
! else ifeq ($(call isTargetOs, macosx), true)
$1_DEBUGINFO_FILES := \
$$($1_OUTPUT_DIR)/$$($1_BASENAME).dSYM/Contents/Info.plist \
$$($1_OUTPUT_DIR)/$$($1_BASENAME).dSYM/Contents/Resources/DWARF/$$($1_BASENAME)
$1_CREATE_DEBUGINFO_CMDS := \
$(DSYMUTIL) --out $$($1_OUTPUT_DIR)/$$($1_BASENAME).dSYM $$($1_TARGET)
! endif
# Since the link rule creates more than one file that we want to track,
# we have to use some tricks to get make to cooperate. To properly
# trigger downstream dependants of $$($1_DEBUGINFO_FILES), we must have
# a recipe in the rule below. To avoid rerunning the recipe every time
*** 950,960 ****
ifneq ($(COMPILER_BINDCMD_FILE_FLAG), )
$1_EXTRA_LDFLAGS += $(COMPILER_BINDCMD_FILE_FLAG)$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).loadmap
endif
endif
! ifeq ($(OPENJDK_TARGET_OS), windows)
ifeq ($$($1_EMBED_MANIFEST), true)
$1_EXTRA_LDFLAGS += -manifest:embed
endif
$1_IMPORT_LIBRARY := $$($1_OBJECT_DIR)/$$($1_NAME).lib
--- 950,960 ----
ifneq ($(COMPILER_BINDCMD_FILE_FLAG), )
$1_EXTRA_LDFLAGS += $(COMPILER_BINDCMD_FILE_FLAG)$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).loadmap
endif
endif
! ifeq ($(call isTargetOs, windows), true)
ifeq ($$($1_EMBED_MANIFEST), true)
$1_EXTRA_LDFLAGS += -manifest:embed
endif
$1_IMPORT_LIBRARY := $$($1_OBJECT_DIR)/$$($1_NAME).lib
*** 1030,1040 ****
endif
endif
# Keep as much as possible on one execution line for best performance
# on Windows
$$(call LogInfo, Linking $$($1_BASENAME))
! ifeq ($(OPENJDK_TARGET_OS), windows)
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
$(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \
$$($1_LIBS) $$($1_EXTRA_LIBS)) \
| $(GREP) -v "^ Creating library .*\.lib and object .*\.exp" || \
--- 1030,1040 ----
endif
endif
# Keep as much as possible on one execution line for best performance
# on Windows
$$(call LogInfo, Linking $$($1_BASENAME))
! ifeq ($(call isTargetOs, windows), true)
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
$(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \
$$($1_LIBS) $$($1_EXTRA_LIBS)) \
| $(GREP) -v "^ Creating library .*\.lib and object .*\.exp" || \
*** 1048,1058 ****
$(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \
$$($1_LIBS) $$($1_EXTRA_LIBS)) ; \
$$($1_CREATE_DEBUGINFO_CMDS)
$$($1_STRIP_CMD)
endif
! ifeq ($(OPENJDK_TARGET_OS), windows)
ifneq ($$($1_MANIFEST), )
$$($1_MT) -nologo -manifest $$($1_MANIFEST) -identity:"$$($1_NAME).exe, version=$$($1_MANIFEST_VERSION)" -outputresource:$$@;#1
endif
endif
# This only works if the openjdk_codesign identity is present on the system. Let
--- 1048,1058 ----
$(LD_OUT_OPTION)$$($1_TARGET) $$($1_LD_OBJ_ARG) $$($1_RES) $$(GLOBAL_LIBS) \
$$($1_LIBS) $$($1_EXTRA_LIBS)) ; \
$$($1_CREATE_DEBUGINFO_CMDS)
$$($1_STRIP_CMD)
endif
! ifeq ($(call isTargetOs, windows), true)
ifneq ($$($1_MANIFEST), )
$$($1_MT) -nologo -manifest $$($1_MANIFEST) -identity:"$$($1_NAME).exe, version=$$($1_MANIFEST_VERSION)" -outputresource:$$@;#1
endif
endif
# This only works if the openjdk_codesign identity is present on the system. Let
< prev index next >