Bug 1259530 - Move PP_TARGETS in libxul.mk to moz.build; r?glandium
MozReview-Commit-ID: HXkhpcjkHwV
--- a/toolkit/library/libxul.mk
+++ b/toolkit/library/libxul.mk
@@ -21,27 +21,16 @@ ifeq (WINNT,$(OS_TARGET))
ifndef MOZ_HAS_WINSDK_WITH_D3D
OS_LDFLAGS += \
-LIBPATH:'$(MOZ_DIRECTX_SDK_PATH)/lib/$(MOZ_D3D_CPU_SUFFIX)' \
$(NULL)
endif
endif
endif
-# Generate GDB pretty printer-autoload files only on Linux. OSX's GDB is
-# too old to support Python pretty-printers; if this changes, we could make
-# this 'ifdef GNU_CC'.
-ifeq (Linux,$(OS_ARCH))
-# Create a GDB Python auto-load file alongside the libxul shared library in
-# the build directory.
-PP_TARGETS += LIBXUL_AUTOLOAD
-LIBXUL_AUTOLOAD = $(topsrcdir)/toolkit/library/libxul.so-gdb.py.in
-LIBXUL_AUTOLOAD_FLAGS := -Dtopsrcdir=$(abspath $(topsrcdir))
-endif
-
# BFD ld doesn't create multiple PT_LOADs as usual when an unknown section
# exists. Using an implicit linker script to make it fold that section in
# .data.rel.ro makes it create multiple PT_LOADs. That implicit linker
# script however makes gold misbehave, first because it doesn't like that
# the linker script is given after crtbegin.o, and even past that, replaces
# the default section rules with those from the script instead of
# supplementing them. Which leads to a lib with a huge load of sections.
ifneq (OpenBSD,$(OS_TARGET))
--- a/toolkit/library/moz.build
+++ b/toolkit/library/moz.build
@@ -370,10 +370,19 @@ if CONFIG['MOZ_ENABLE_QT']:
OS_LIBS += CONFIG['XEXT_LIBS']
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
OS_LIBS += [
'usp10',
'oleaut32',
]
+# Generate GDB pretty printer-autoload files only on Linux. OSX's GDB is
+# too old to support Python pretty-printers; if this changes, we could make
+# this "if CONFIG['GNU_CC']".
+if CONFIG['OS_ARCH'] == 'Linux':
+ # Create a GDB Python auto-load file alongside the libxul shared library in
+ # the build directory.
+ OBJDIR_PP_FILES.toolkit.library += ['libxul.so-gdb.py.in']
+ PP_FLAGS['libxul.so-gdb.py.in'] += ['-Dtopsrcdir=%s' % TOPSRCDIR]
+
# This needs to be last
USE_LIBS += ['StaticXULComponentsEnd']