mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
bug 1399870 - Make DEFFILE a Path instead of a string. r=gps
DEFFILE is currently just used as a passthrough variable. All but one of the current uses of it use `SRCDIR + '/file.def'` to get a srcdir-relative path anyway, and the other one wants an objdir-relative path, so using Path makes everything clearer. This makes it more straightforward to translate the paths for the WSL build. MozReview-Commit-ID: IRokABaZW2c --HG-- extra : rebase_source : ae74c984bb2aab70211dc5974a8b052651e025dd
This commit is contained in:
parent
2fffce65cd
commit
8439a24741
@ -8,7 +8,7 @@ GeckoSharedLibrary('IA2Marshal', linkage=None)
|
|||||||
|
|
||||||
DEFINES['REGISTER_PROXY_DLL'] = True
|
DEFINES['REGISTER_PROXY_DLL'] = True
|
||||||
|
|
||||||
DEFFILE = SRCDIR + '/IA2Marshal.def'
|
DEFFILE = 'IA2Marshal.def'
|
||||||
|
|
||||||
OS_LIBS += [
|
OS_LIBS += [
|
||||||
'uuid',
|
'uuid',
|
||||||
|
@ -18,7 +18,7 @@ DEFINES['REGISTER_PROXY_DLL'] = True
|
|||||||
# of AccessibleMarshal.dll.
|
# of AccessibleMarshal.dll.
|
||||||
DEFINES['PROXY_CLSID'] = 'IID_ISimpleDOMNode'
|
DEFINES['PROXY_CLSID'] = 'IID_ISimpleDOMNode'
|
||||||
|
|
||||||
DEFFILE = SRCDIR + '/AccessibleMarshal.def'
|
DEFFILE = 'AccessibleMarshal.def'
|
||||||
|
|
||||||
OS_LIBS += [
|
OS_LIBS += [
|
||||||
'kernel32',
|
'kernel32',
|
||||||
|
@ -32,7 +32,7 @@ GENERATED_FILES += [
|
|||||||
'HandlerData_p.c',
|
'HandlerData_p.c',
|
||||||
]
|
]
|
||||||
|
|
||||||
DEFFILE = SRCDIR + '/AccessibleHandler.def'
|
DEFFILE = 'AccessibleHandler.def'
|
||||||
|
|
||||||
USE_LIBS += [
|
USE_LIBS += [
|
||||||
'mscom_oop',
|
'mscom_oop',
|
||||||
|
@ -10,7 +10,7 @@ SOURCES += [
|
|||||||
|
|
||||||
SharedLibrary('crashinjectdll')
|
SharedLibrary('crashinjectdll')
|
||||||
|
|
||||||
DEFFILE = SRCDIR + '/crashinjectdll.def'
|
DEFFILE = 'crashinjectdll.def'
|
||||||
|
|
||||||
USE_STATIC_LIBS = True
|
USE_STATIC_LIBS = True
|
||||||
NO_PGO = True
|
NO_PGO = True
|
||||||
|
2
config/external/lgpllibs/moz.build
vendored
2
config/external/lgpllibs/moz.build
vendored
@ -15,4 +15,4 @@ SHARED_LIBRARY_NAME = 'lgpllibs'
|
|||||||
|
|
||||||
if CONFIG['MOZ_LIBAV_FFT']:
|
if CONFIG['MOZ_LIBAV_FFT']:
|
||||||
DIRS += ['/media/libav']
|
DIRS += ['/media/libav']
|
||||||
DEFFILE = SRCDIR + '/lgpllibs.def'
|
DEFFILE = 'lgpllibs.def'
|
||||||
|
@ -170,14 +170,14 @@ CODFILE=$(basename $(@F)).cod
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef DEFFILE
|
ifdef DEFFILE
|
||||||
OS_LDFLAGS += -DEF:$(call normalizepath,$(DEFFILE))
|
OS_LDFLAGS += -DEF:$(DEFFILE)
|
||||||
EXTRA_DEPS += $(DEFFILE)
|
EXTRA_DEPS += $(DEFFILE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
else #!GNU_CC
|
else #!GNU_CC
|
||||||
|
|
||||||
ifdef DEFFILE
|
ifdef DEFFILE
|
||||||
OS_LDFLAGS += $(call normalizepath,$(DEFFILE))
|
OS_LDFLAGS += $(DEFFILE)
|
||||||
EXTRA_DEPS += $(DEFFILE)
|
EXTRA_DEPS += $(DEFFILE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ NO_PGO = True
|
|||||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
||||||
RCFILE = 'nptest.rc'
|
RCFILE = 'nptest.rc'
|
||||||
RESFILE = 'nptest.res'
|
RESFILE = 'nptest.res'
|
||||||
DEFFILE = SRCDIR + '/nptest.def'
|
DEFFILE = 'nptest.def'
|
||||||
|
|
||||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa' and '64' in CONFIG['OS_TEST']:
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa' and '64' in CONFIG['OS_TEST']:
|
||||||
OS_LIBS += ['-framework Carbon']
|
OS_LIBS += ['-framework Carbon']
|
||||||
|
@ -79,6 +79,6 @@ else:
|
|||||||
GeckoSharedLibrary('libEGL', linkage=None)
|
GeckoSharedLibrary('libEGL', linkage=None)
|
||||||
|
|
||||||
RCFILE = SRCDIR + '/libEGL.rc'
|
RCFILE = SRCDIR + '/libEGL.rc'
|
||||||
DEFFILE = SRCDIR + '/libEGL.def'
|
DEFFILE = 'libEGL.def'
|
||||||
|
|
||||||
USE_LIBS += ['libANGLE']
|
USE_LIBS += ['libANGLE']
|
||||||
|
@ -84,7 +84,7 @@ else:
|
|||||||
GeckoSharedLibrary('libGLESv2', linkage=None)
|
GeckoSharedLibrary('libGLESv2', linkage=None)
|
||||||
|
|
||||||
RCFILE = SRCDIR + '/libGLESv2.rc'
|
RCFILE = SRCDIR + '/libGLESv2.rc'
|
||||||
DEFFILE = SRCDIR + '/libGLESv2.def'
|
DEFFILE = 'libGLESv2.def'
|
||||||
|
|
||||||
USE_LIBS += ['libANGLE']
|
USE_LIBS += ['libANGLE']
|
||||||
|
|
||||||
|
@ -562,4 +562,4 @@ ALLOW_COMPILER_WARNINGS = True
|
|||||||
GeckoSharedLibrary('pdfium', linkage=None)
|
GeckoSharedLibrary('pdfium', linkage=None)
|
||||||
|
|
||||||
if CONFIG['OS_TARGET'] == 'WINNT':
|
if CONFIG['OS_TARGET'] == 'WINNT':
|
||||||
DEFFILE = SRCDIR + '/pdfium.def'
|
DEFFILE = 'pdfium.def'
|
||||||
|
@ -22,7 +22,7 @@ if CONFIG['MOZ_ASAN']:
|
|||||||
]
|
]
|
||||||
|
|
||||||
if CONFIG['OS_TARGET'] == 'WINNT':
|
if CONFIG['OS_TARGET'] == 'WINNT':
|
||||||
DEFFILE = 'mozglue.def'
|
DEFFILE = '!mozglue.def'
|
||||||
# We'll break the DLL blocklist if we immediately load user32.dll
|
# We'll break the DLL blocklist if we immediately load user32.dll
|
||||||
DELAYLOAD_DLLS += [
|
DELAYLOAD_DLLS += [
|
||||||
'user32.dll',
|
'user32.dll',
|
||||||
|
@ -1287,7 +1287,7 @@ VARIABLES = {
|
|||||||
This variable can only be used on Windows.
|
This variable can only be used on Windows.
|
||||||
"""),
|
"""),
|
||||||
|
|
||||||
'DEFFILE': (unicode, unicode,
|
'DEFFILE': (Path, unicode,
|
||||||
"""The program .def (module definition) file.
|
"""The program .def (module definition) file.
|
||||||
|
|
||||||
This variable can only be used on Windows.
|
This variable can only be used on Windows.
|
||||||
|
@ -913,7 +913,6 @@ class TreeMetadataEmitter(LoggingMixin):
|
|||||||
'RCFILE',
|
'RCFILE',
|
||||||
'RESFILE',
|
'RESFILE',
|
||||||
'RCINCLUDE',
|
'RCINCLUDE',
|
||||||
'DEFFILE',
|
|
||||||
'WIN32_EXE_LDFLAGS',
|
'WIN32_EXE_LDFLAGS',
|
||||||
'LD_VERSION_SCRIPT',
|
'LD_VERSION_SCRIPT',
|
||||||
'USE_EXTENSION_MANIFEST',
|
'USE_EXTENSION_MANIFEST',
|
||||||
@ -924,6 +923,19 @@ class TreeMetadataEmitter(LoggingMixin):
|
|||||||
if v in context and context[v]:
|
if v in context and context[v]:
|
||||||
passthru.variables[v] = context[v]
|
passthru.variables[v] = context[v]
|
||||||
|
|
||||||
|
deffile = context.get('DEFFILE')
|
||||||
|
if deffile:
|
||||||
|
if isinstance(deffile, SourcePath):
|
||||||
|
if not os.path.exists(deffile.full_path):
|
||||||
|
raise SandboxValidationError(
|
||||||
|
'Path specified in DEFFILE does not exist: %s '
|
||||||
|
'(resolved to %s)' % (deffile,
|
||||||
|
deffile.full_path), context)
|
||||||
|
path = mozpath.relpath(deffile.full_path, context.objdir)
|
||||||
|
else:
|
||||||
|
path = deffile.target_basename
|
||||||
|
passthru.variables['DEFFILE'] = path
|
||||||
|
|
||||||
if context.config.substs.get('OS_TARGET') == 'WINNT' and \
|
if context.config.substs.get('OS_TARGET') == 'WINNT' and \
|
||||||
context['DELAYLOAD_DLLS']:
|
context['DELAYLOAD_DLLS']:
|
||||||
context['LDFLAGS'].extend([('-DELAYLOAD:%s' % dll)
|
context['LDFLAGS'].extend([('-DELAYLOAD:%s' % dll)
|
||||||
|
Loading…
Reference in New Issue
Block a user