mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 21:18:35 +00:00
Bug 1423815 - Move symverscript for libxul from libxul.mk to GENERATED_FILES. r=ted
MozReview-Commit-ID: 5U7njSBlHMp --HG-- extra : rebase_source : 6464c6870d13f6a2bd801975c617167a6a223370
This commit is contained in:
parent
69c261272e
commit
3326b62c85
20
toolkit/library/gen_symverscript.py
Normal file
20
toolkit/library/gen_symverscript.py
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||||
|
# vim: set filetype=python:
|
||||||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
# License, v. 2.0. If a copy of the MPL was not distibuted with this
|
||||||
|
# file, You can obtain one at http://mozilla.og/MPL/2.0/.
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import buildconfig
|
||||||
|
from mozbuild.preprocessor import Preprocessor
|
||||||
|
|
||||||
|
def main(output, input_file):
|
||||||
|
pp = Preprocessor()
|
||||||
|
pp.context.update({
|
||||||
|
'VERSION': 'xul%s' % buildconfig.substs['MOZILLA_SYMBOLVERSION'],
|
||||||
|
})
|
||||||
|
pp.out = output
|
||||||
|
pp.do_include(input_file)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main(*sys.agv[1:])
|
@ -21,6 +21,12 @@ USE_LIBS += [
|
|||||||
'xul-gtest',
|
'xul-gtest',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if CONFIG['OS_ARCH'] == 'Linux' and CONFIG['OS_TARGET'] != 'Android':
|
||||||
|
GENERATED_FILES += ['symverscript']
|
||||||
|
GENERATED_FILES['symverscript'].script = '../gen_symverscript.py'
|
||||||
|
GENERATED_FILES['symverscript'].inputs = ['../symverscript.in']
|
||||||
|
SYMBOLS_FILE = '!symverscript'
|
||||||
|
|
||||||
# This needs to come after static:xul to avoid things like libfallible coming
|
# This needs to come after static:xul to avoid things like libfallible coming
|
||||||
# before StaticXULComponentStart.
|
# before StaticXULComponentStart.
|
||||||
Libxul('xul-gtest-real')
|
Libxul('xul-gtest-real')
|
||||||
|
@ -4,17 +4,6 @@
|
|||||||
|
|
||||||
EXTRA_DEPS += $(topsrcdir)/toolkit/library/libxul.mk
|
EXTRA_DEPS += $(topsrcdir)/toolkit/library/libxul.mk
|
||||||
|
|
||||||
ifeq (Linux,$(OS_ARCH))
|
|
||||||
ifneq (Android,$(OS_TARGET))
|
|
||||||
|
|
||||||
symverscript: $(topsrcdir)/toolkit/library/symverscript.in
|
|
||||||
$(call py_action,preprocessor, \
|
|
||||||
-DVERSION='xul$(MOZILLA_SYMBOLVERSION)' $< -o $@)
|
|
||||||
|
|
||||||
EXTRA_DEPS += symverscript
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Generate GDB pretty printer-autoload files only on Linux. OSX's GDB is
|
# 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
|
# too old to support Python pretty-printers; if this changes, we could make
|
||||||
# this 'ifdef GNU_CC'.
|
# this 'ifdef GNU_CC'.
|
||||||
|
@ -56,9 +56,6 @@ def Libxul(name):
|
|||||||
# and config/version.mk would lift the $(srcdir)
|
# and config/version.mk would lift the $(srcdir)
|
||||||
RCINCLUDE = '$(DEPTH)/toolkit/library/xulrunner.rc'
|
RCINCLUDE = '$(DEPTH)/toolkit/library/xulrunner.rc'
|
||||||
|
|
||||||
if CONFIG['OS_ARCH'] == 'Linux' and CONFIG['OS_TARGET'] != 'Android':
|
|
||||||
LDFLAGS += ['-Wl,-version-script,symverscript']
|
|
||||||
|
|
||||||
# BFD ld doesn't create multiple PT_LOADs as usual when an unknown section
|
# 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
|
# 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
|
# .data.rel.ro makes it create multiple PT_LOADs. That implicit linker
|
||||||
@ -352,6 +349,12 @@ if CONFIG['COMPILE_ENVIRONMENT']:
|
|||||||
]
|
]
|
||||||
FINAL_TARGET_FILES += ['!dependentlibs.list', '!dependentlibs.list.gtest']
|
FINAL_TARGET_FILES += ['!dependentlibs.list', '!dependentlibs.list.gtest']
|
||||||
|
|
||||||
|
if CONFIG['OS_ARCH'] == 'Linux' and CONFIG['OS_TARGET'] != 'Android':
|
||||||
|
GENERATED_FILES += ['symverscript']
|
||||||
|
GENERATED_FILES['symverscript'].script = 'gen_symverscript.py'
|
||||||
|
GENERATED_FILES['symverscript'].inputs = ['symverscript.in']
|
||||||
|
SYMBOLS_FILE = '!symverscript'
|
||||||
|
|
||||||
# This library needs to be last to make XPCOM module registration work.
|
# This library needs to be last to make XPCOM module registration work.
|
||||||
USE_LIBS += ['StaticXULComponentsEnd']
|
USE_LIBS += ['StaticXULComponentsEnd']
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user