232 # Include previously generated dependency information. (if it exists) |
232 # Include previously generated dependency information. (if it exists) |
233 -include $$($1_$2_DEP) |
233 -include $$($1_$2_DEP) |
234 -include $$($1_$2_DEP_TARGETS) |
234 -include $$($1_$2_DEP_TARGETS) |
235 |
235 |
236 ifeq ($(TOOLCHAIN_TYPE), microsoft) |
236 ifeq ($(TOOLCHAIN_TYPE), microsoft) |
237 $1_$2_DEBUG_OUT_FLAGS:=-Fd$$(patsubst %$(OBJ_SUFFIX),%.pdb,$$($1_$2_OBJ)) |
237 # To avoid name clashes between pdbs for objects and libs/execs, put |
|
238 # object pdbs in a separate subdir. |
|
239 $1_$2_DEBUG_OUT_FLAGS:=-Fd$$(strip $$(patsubst $$($1_OBJECT_DIR)/%, \ |
|
240 $$($1_OBJECT_DIR)/pdb/%, $$(patsubst %$(OBJ_SUFFIX),%.pdb,$$($1_$2_OBJ)))) |
238 endif |
241 endif |
239 endif |
242 endif |
240 |
243 |
241 ifneq ($$($1_$(notdir $2)_CFLAGS)$$($1_$(notdir $2)_CXXFLAGS), ) |
244 ifneq ($$($1_$(notdir $2)_CFLAGS)$$($1_$(notdir $2)_CXXFLAGS), ) |
242 $1_$2_VARDEPS := $$($1_$(notdir $2)_CFLAGS) $$($1_$(notdir $2)_CXXFLAGS) |
245 $1_$2_VARDEPS := $$($1_$(notdir $2)_CFLAGS) $$($1_$(notdir $2)_CXXFLAGS) |
244 $$(patsubst %$(OBJ_SUFFIX),%.vardeps,$$($1_$2_OBJ))) |
247 $$(patsubst %$(OBJ_SUFFIX),%.vardeps,$$($1_$2_OBJ))) |
245 endif |
248 endif |
246 |
249 |
247 $$($1_$2_OBJ) : $2 $$($1_COMPILE_VARDEPS_FILE) $$($1_$2_VARDEPS_FILE) | $$($1_BUILD_INFO) |
250 $$($1_$2_OBJ) : $2 $$($1_COMPILE_VARDEPS_FILE) $$($1_$2_VARDEPS_FILE) | $$($1_BUILD_INFO) |
248 $$(call LogInfo, Compiling $$(notdir $2) (for $$(notdir $$($1_TARGET)))) |
251 $$(call LogInfo, Compiling $$(notdir $2) (for $$(notdir $$($1_TARGET)))) |
249 $$(call MakeDir, $$(@D)) |
252 $$(call MakeDir, $$(@D) $$(@D)/pdb) |
250 ifneq ($(TOOLCHAIN_TYPE), microsoft) |
253 ifneq ($(TOOLCHAIN_TYPE), microsoft) |
251 ifeq ($(TOOLCHAIN_TYPE)$$(filter %.s,$2), solstudio) |
254 ifeq ($(TOOLCHAIN_TYPE)$$(filter %.s,$2), solstudio) |
252 # The Solaris studio compiler doesn't output the full path to the object file in the |
255 # The Solaris studio compiler doesn't output the full path to the object file in the |
253 # generated deps files. Fixing it with sed. If compiling assembly, don't try this. |
256 # generated deps files. Fixing it with sed. If compiling assembly, don't try this. |
254 $$(call ExecuteWithLog, $$@, \ |
257 $$(call ExecuteWithLog, $$@, \ |
704 $(CP) -r $$< $$@ |
707 $(CP) -r $$< $$@ |
705 endif |
708 endif |
706 |
709 |
707 # Generate debuginfo files. |
710 # Generate debuginfo files. |
708 ifeq ($(OPENJDK_TARGET_OS), windows) |
711 ifeq ($(OPENJDK_TARGET_OS), windows) |
709 $1_EXTRA_LDFLAGS += "-pdb:$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).pdb" \ |
712 $1_EXTRA_LDFLAGS += -debug "-pdb:$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).pdb" \ |
710 "-map:$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).map" |
713 "-map:$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).map" |
711 $1_DEBUGINFO_FILES := $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).pdb \ |
714 $1_DEBUGINFO_FILES := $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).pdb \ |
712 $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).map |
715 $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).map |
713 # No separate command is needed for debuginfo on windows, instead |
716 # No separate command is needed for debuginfo on windows, instead |
714 # touch target to make sure it has a later time stamp than the debug |
717 # touch target to make sure it has a later time stamp than the debug |