Bug 1506016 - If we're building with MOZ_COPY_PDBS, build the pdb next to the executable r=firefox-build-system-reviewers,mshal
authorTom Ritter <tom@mozilla.com>
Thu, 09 May 2019 19:52:26 +0000
changeset 532122 5e3d6e5df827b23b963386002c4ba2c6fba87fae
parent 532121 ba9d948d404c9e4d2b915bc1c0e3e6c249e13677
child 532123 8784b7d0fcbf5c7f11af9da3cf3dd27662e8a429
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfirefox-build-system-reviewers, mshal
bugs1506016, 1505936
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1506016 - If we're building with MOZ_COPY_PDBS, build the pdb next to the executable r=firefox-build-system-reviewers,mshal This will allow us to copy the pdbs for test files into the resulting test file archive, but doesn't do it automatically. Bug 1505936 is for copying some of them. Differential Revision: https://phabricator.services.mozilla.com/D29761
config/rules.mk
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -116,18 +116,40 @@ endif
 
 EMBED_MANIFEST_AT=2
 
 endif # MKSHLIB
 endif # FORCE_SHARED_LIB
 
 ifeq ($(OS_ARCH),WINNT)
 
+#
+# This next line captures both the default (non-MOZ_COPY_PDBS)
+# case as well as the MOZ_COPY_PDBS-for-mingwclang case.
+#
+# For the default case, placing the pdb in the build
+# directory is needed.
+#
+# For the MOZ_COPY_PDBS, non-mingwclang case - we need to
+# build the pdb next to the executable (handled in the if
+# statement immediately below.)
+#
+# For the MOZ_COPY_PDBS, mingwclang case - we also need to
+# build the pdb next to the executable, but this macro doesn't
+# work for jsapi-tests which is a little special, so we specify
+# the output directory below with MOZ_PROGRAM_LDFLAGS.
+#
 LINK_PDBFILE ?= $(basename $(@F)).pdb
 
+ifdef MOZ_COPY_PDBS
+ifneq ($(CC_TYPE),clang)
+LINK_PDBFILE = $(basename $@).pdb
+endif
+endif
+
 ifndef GNU_CC
 
 ifdef SIMPLE_PROGRAMS
 COMPILE_PDB_FLAG ?= -Fd$(basename $(@F)).pdb
 COMPILE_CFLAGS += $(COMPILE_PDB_FLAG)
 COMPILE_CXXFLAGS += $(COMPILE_PDB_FLAG)
 endif