mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
merge mozilla-inbound to mozilla-central a=merge
This commit is contained in:
commit
f2360c7833
@ -61,7 +61,7 @@ midl_TARGET := export
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
OS_LIBS = $(call EXPAND_LIBNAME,uuid kernel32 rpcns4 rpcrt4 ole32 oleaut32)
|
||||
OS_LIBS += $(call EXPAND_LIBNAME,uuid kernel32 rpcns4 rpcrt4 ole32 oleaut32)
|
||||
|
||||
# generate list of to-be-generated files that are missing
|
||||
# but ignore special file dlldata.c
|
||||
|
@ -16,7 +16,7 @@ MIDL_GENERATED_FILES = \
|
||||
ISimpleDOMText_i.c \
|
||||
$(NULL)
|
||||
|
||||
OS_LIBS = $(call EXPAND_LIBNAME,kernel32 rpcns4 rpcrt4 oleaut32)
|
||||
OS_LIBS += $(call EXPAND_LIBNAME,kernel32 rpcns4 rpcrt4 oleaut32)
|
||||
|
||||
$(MIDL_GENERATED_FILES): done_gen
|
||||
|
||||
|
@ -67,8 +67,7 @@ function zoomDocument(aDocument, aZoom)
|
||||
QueryInterface(Components.interfaces.nsIInterfaceRequestor).
|
||||
getInterface(Components.interfaces.nsIWebNavigation).
|
||||
QueryInterface(Components.interfaces.nsIDocShell);
|
||||
var docViewer = docShell.contentViewer.
|
||||
QueryInterface(Components.interfaces.nsIMarkupDocumentViewer);
|
||||
var docViewer = docShell.contentViewer;
|
||||
|
||||
docViewer.fullZoom = aZoom;
|
||||
}
|
||||
|
@ -156,14 +156,19 @@ const WorkerSandbox = Class({
|
||||
// We need 'this === window === top' to be true in toplevel scope:
|
||||
get window() content,
|
||||
get top() top,
|
||||
get parent() parent,
|
||||
// Use the Greasemonkey naming convention to provide access to the
|
||||
// unwrapped window object so the content script can access document
|
||||
// JavaScript values.
|
||||
// NOTE: this functionality is experimental and may change or go away
|
||||
// at any time!
|
||||
get unsafeWindow() window.wrappedJSObject
|
||||
get parent() parent
|
||||
});
|
||||
// Use the Greasemonkey naming convention to provide access to the
|
||||
// unwrapped window object so the content script can access document
|
||||
// JavaScript values.
|
||||
// NOTE: this functionality is experimental and may change or go away
|
||||
// at any time!
|
||||
//
|
||||
// Note that because waivers aren't propagated between origins, we
|
||||
// need the unsafeWindow getter to live in the sandbox.
|
||||
var unsafeWindowGetter =
|
||||
new content.Function('return window.wrappedJSObject || window;');
|
||||
Object.defineProperty(content, 'unsafeWindow', {get: unsafeWindowGetter});
|
||||
|
||||
// Load trusted code that will inject content script API.
|
||||
let ContentWorker = load(content, CONTENT_WORKER_URL);
|
||||
|
@ -166,14 +166,20 @@ const WorkerSandbox = EventEmitter.compose({
|
||||
// We need "this === window === top" to be true in toplevel scope:
|
||||
get window() content,
|
||||
get top() top,
|
||||
get parent() parent,
|
||||
// Use the Greasemonkey naming convention to provide access to the
|
||||
// unwrapped window object so the content script can access document
|
||||
// JavaScript values.
|
||||
// NOTE: this functionality is experimental and may change or go away
|
||||
// at any time!
|
||||
get unsafeWindow() window.wrappedJSObject
|
||||
get parent() parent
|
||||
});
|
||||
// Use the Greasemonkey naming convention to provide access to the
|
||||
// unwrapped window object so the content script can access document
|
||||
// JavaScript values.
|
||||
// NOTE: this functionality is experimental and may change or go away
|
||||
// at any time!
|
||||
//
|
||||
// Note that because waivers aren't propagated between origins, we
|
||||
// need the unsafeWindow getter to live in the sandbox.
|
||||
var unsafeWindowGetter =
|
||||
new content.Function('return window.wrappedJSObject || window;');
|
||||
Object.defineProperty(content, 'unsafeWindow', {get: unsafeWindowGetter});
|
||||
|
||||
|
||||
// Load trusted code that will inject content script API.
|
||||
let ContentWorker = load(content, CONTENT_WORKER_URL);
|
||||
|
@ -10,32 +10,24 @@ PREF_JS_EXPORTS = $(srcdir)/b2g.js
|
||||
ifndef LIBXUL_SDK
|
||||
|
||||
ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
|
||||
LIBS += \
|
||||
OS_LIBS += \
|
||||
-lui \
|
||||
-lEGL \
|
||||
-lhardware_legacy \
|
||||
-lhardware \
|
||||
-lcutils \
|
||||
$(DEPTH)/media/libpng/$(LIB_PREFIX)mozpng.$(LIB_SUFFIX) \
|
||||
$(DEPTH)/widget/gonk/libdisplay/$(LIB_PREFIX)display.$(LIB_SUFFIX) \
|
||||
$(MOZ_ZLIB_LIBS) \
|
||||
$(NULL)
|
||||
ifeq ($(ANDROID_VERSION),$(findstring $(ANDROID_VERSION),17 18 19))
|
||||
LIBS += \
|
||||
OS_LIBS += \
|
||||
-lgui \
|
||||
-lsuspend \
|
||||
$(NULL)
|
||||
endif
|
||||
endif
|
||||
|
||||
LIBS += $(JEMALLOC_LIBS)
|
||||
|
||||
LIBS += \
|
||||
$(XPCOM_STANDALONE_GLUE_LDOPTS) \
|
||||
$(NULL)
|
||||
|
||||
ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
|
||||
LIBS += \
|
||||
OS_LIBS += \
|
||||
-lbinder \
|
||||
-lutils \
|
||||
$(NULL)
|
||||
|
@ -17,6 +17,11 @@ if not CONFIG['LIBXUL_SDK']:
|
||||
# a console application.
|
||||
WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup']
|
||||
|
||||
if not CONFIG['MOZ_NATIVE_ZLIB'] and not CONFIG['ZLIB_IN_MOZCONFIG']:
|
||||
USE_LIBS += [
|
||||
'mozz',
|
||||
]
|
||||
|
||||
DEFINES['XPCOM_GLUE'] = True
|
||||
|
||||
for var in ('MOZ_APP_NAME', 'MOZ_APP_VERSION', 'MOZ_UPDATER'):
|
||||
@ -39,4 +44,17 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
||||
|
||||
LDFLAGS += ['-Wl,--export-dynamic']
|
||||
|
||||
USE_LIBS += [
|
||||
'display',
|
||||
'mozpng',
|
||||
]
|
||||
if not CONFIG['MOZ_NATIVE_ZLIB']:
|
||||
USE_LIBS += [
|
||||
'mozz',
|
||||
]
|
||||
|
||||
USE_LIBS += [
|
||||
'xpcomglue',
|
||||
]
|
||||
|
||||
DISABLE_STL_WRAPPING = True
|
||||
|
@ -25,16 +25,12 @@ endif #} LIBXUL_SDK
|
||||
|
||||
# Build a binary bootstrapping with XRE_main
|
||||
|
||||
LIBS += \
|
||||
$(XPCOM_STANDALONE_GLUE_LDOPTS) \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_LINKER
|
||||
LIBS += $(MOZ_ZLIB_LIBS)
|
||||
OS_LIBS += $(MOZ_ZLIB_LIBS)
|
||||
endif
|
||||
|
||||
ifdef HAVE_CLOCK_MONOTONIC
|
||||
LIBS += $(REALTIME_LIBS)
|
||||
OS_LIBS += $(REALTIME_LIBS)
|
||||
endif
|
||||
|
||||
ifndef MOZ_WINCONSOLE
|
||||
|
@ -50,4 +50,8 @@ if CONFIG['OS_ARCH'] == 'WINNT':
|
||||
if CONFIG['OS_ARCH'] == 'WINNT' and not CONFIG['GNU_CC']:
|
||||
LDFLAGS += ['/HEAP:0x40000']
|
||||
|
||||
USE_LIBS += [
|
||||
'xpcomglue',
|
||||
]
|
||||
|
||||
DISABLE_STL_WRAPPING = True
|
||||
|
@ -427,7 +427,7 @@ let PageStyleHandler = {
|
||||
},
|
||||
|
||||
get markupDocumentViewer() {
|
||||
return docShell.contentViewer.QueryInterface(Ci.nsIMarkupDocumentViewer);
|
||||
return docShell.contentViewer;
|
||||
},
|
||||
|
||||
// Called synchronously via CPOW from the parent.
|
||||
|
@ -10,15 +10,14 @@ ifeq ($(OS_ARCH),WINNT)
|
||||
OS_LIBS += $(call EXPAND_LIBNAME,version)
|
||||
endif
|
||||
|
||||
EXTRA_DSO_LDOPTS += \
|
||||
$(XPCOM_GLUE_LDOPTS) \
|
||||
$(MOZ_COMPONENT_LIBS) \
|
||||
EXTRA_LIBS += \
|
||||
$(NSPR_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
# Mac: Need to link with CoreFoundation for Mac Migrators (PList reading code)
|
||||
# GTK2: Need to link with glib for GNOME shell service
|
||||
ifneq (,$(filter cocoa gtk2 gtk3,$(MOZ_WIDGET_TOOLKIT)))
|
||||
EXTRA_DSO_LDOPTS += \
|
||||
OS_LIBS += \
|
||||
$(TK_LIBS) \
|
||||
$(NULL)
|
||||
endif
|
||||
|
@ -16,8 +16,6 @@ LIBRARY_NAME = 'browsercomps'
|
||||
|
||||
IS_COMPONENT = True
|
||||
|
||||
FORCE_SHARED_LIB = True
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'../about',
|
||||
'../dirprovider',
|
||||
@ -25,3 +23,9 @@ LOCAL_INCLUDES += [
|
||||
'../migration/src',
|
||||
'../shell/src',
|
||||
]
|
||||
|
||||
USE_LIBS += [
|
||||
'mozalloc',
|
||||
'xpcomglue_s',
|
||||
'xul',
|
||||
]
|
||||
|
@ -45,7 +45,7 @@ let PageStyleInternal = {
|
||||
});
|
||||
|
||||
let markupDocumentViewer =
|
||||
docShell.contentViewer.QueryInterface(Ci.nsIMarkupDocumentViewer);
|
||||
docShell.contentViewer;
|
||||
|
||||
if (markupDocumentViewer.authorStyleDisabled) {
|
||||
result = result || {};
|
||||
@ -68,7 +68,7 @@ let PageStyleInternal = {
|
||||
let disabled = pageStyle == NO_STYLE;
|
||||
|
||||
let markupDocumentViewer =
|
||||
docShell.contentViewer.QueryInterface(Ci.nsIMarkupDocumentViewer);
|
||||
docShell.contentViewer;
|
||||
markupDocumentViewer.authorStyleDisabled = disabled;
|
||||
|
||||
for (let [frame, data] of frameList) {
|
||||
@ -101,7 +101,7 @@ let PageStyleInternal = {
|
||||
restoreTree: function (docShell, data) {
|
||||
let disabled = data.disabled || false;
|
||||
let markupDocumentViewer =
|
||||
docShell.contentViewer.QueryInterface(Ci.nsIMarkupDocumentViewer);
|
||||
docShell.contentViewer;
|
||||
markupDocumentViewer.authorStyleDisabled = disabled;
|
||||
|
||||
function restoreFrame(root, data) {
|
||||
|
@ -107,11 +107,12 @@ let SessionStorageInternal = {
|
||||
let uri = Services.io.newURI(host, null, null);
|
||||
let principal = Services.scriptSecurityManager.getDocShellCodebasePrincipal(uri, aDocShell);
|
||||
let storageManager = aDocShell.QueryInterface(Ci.nsIDOMStorageManager);
|
||||
let window = aDocShell.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindow);
|
||||
|
||||
// There is no need to pass documentURI, it's only used to fill documentURI property of
|
||||
// domstorage event, which in this case has no consumer. Prevention of events in case
|
||||
// of missing documentURI will be solved in a followup bug to bug 600307.
|
||||
let storage = storageManager.createStorage(principal, "", aDocShell.usePrivateBrowsing);
|
||||
let storage = storageManager.createStorage(window, principal, "", aDocShell.usePrivateBrowsing);
|
||||
|
||||
for (let key of Object.keys(data)) {
|
||||
try {
|
||||
@ -135,9 +136,11 @@ let SessionStorageInternal = {
|
||||
let hostData = {};
|
||||
let storage;
|
||||
|
||||
let window = aDocShell.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindow);
|
||||
|
||||
try {
|
||||
let storageManager = aDocShell.QueryInterface(Ci.nsIDOMStorageManager);
|
||||
storage = storageManager.getStorage(aPrincipal);
|
||||
storage = storageManager.getStorage(window, aPrincipal);
|
||||
} catch (e) {
|
||||
// sessionStorage might throw if it's turned off, see bug 458954
|
||||
}
|
||||
|
@ -116,13 +116,13 @@ addMessageListener("ss-test:enableSubDocumentStyleSheetsForSet", function (msg)
|
||||
|
||||
addMessageListener("ss-test:getAuthorStyleDisabled", function (msg) {
|
||||
let {authorStyleDisabled} =
|
||||
docShell.contentViewer.QueryInterface(Ci.nsIMarkupDocumentViewer);
|
||||
docShell.contentViewer;
|
||||
sendSyncMessage("ss-test:getAuthorStyleDisabled", authorStyleDisabled);
|
||||
});
|
||||
|
||||
addMessageListener("ss-test:setAuthorStyleDisabled", function (msg) {
|
||||
let markupDocumentViewer =
|
||||
docShell.contentViewer.QueryInterface(Ci.nsIMarkupDocumentViewer);
|
||||
docShell.contentViewer;
|
||||
markupDocumentViewer.authorStyleDisabled = msg.data;
|
||||
sendSyncMessage("ss-test:setAuthorStyleDisabled");
|
||||
});
|
||||
|
@ -49,8 +49,7 @@ function sendZoomKey(id, times) {
|
||||
|
||||
function getCurrentZoom() {
|
||||
var contViewer = toolbox.frame.docShell.contentViewer;
|
||||
var docViewer = contViewer.QueryInterface(Ci.nsIMarkupDocumentViewer);
|
||||
return docViewer.fullZoom;
|
||||
return contViewer.fullZoom;
|
||||
}
|
||||
|
||||
function tidyUp() {
|
||||
|
@ -441,9 +441,8 @@ Toolbox.prototype = {
|
||||
zoomValue = Math.min(zoomValue, MAX_ZOOM);
|
||||
|
||||
let contViewer = this.frame.docShell.contentViewer;
|
||||
let docViewer = contViewer.QueryInterface(Ci.nsIMarkupDocumentViewer);
|
||||
|
||||
docViewer.fullZoom = zoomValue;
|
||||
contViewer.fullZoom = zoomValue;
|
||||
|
||||
Services.prefs.setCharPref(ZOOM_PREF, zoomValue);
|
||||
},
|
||||
|
@ -59,8 +59,7 @@ function zoomTo(level) {
|
||||
let def = promise.defer();
|
||||
|
||||
waitForBoxModelUpdate().then(def.resolve);
|
||||
let contentViewer = gBrowser.selectedBrowser.docShell.contentViewer
|
||||
.QueryInterface(Ci.nsIMarkupDocumentViewer);
|
||||
let contentViewer = gBrowser.selectedBrowser.docShell.contentViewer;
|
||||
contentViewer.fullZoom = level;
|
||||
|
||||
return def.promise;
|
||||
|
@ -10,7 +10,7 @@ DIST_PROGRAM = CommandExecuteHandler$(BIN_SUFFIX)
|
||||
MOZ_GLUE_LDFLAGS =
|
||||
MOZ_GLUE_PROGRAM_LDFLAGS =
|
||||
|
||||
OS_LIBS = \
|
||||
OS_LIBS += \
|
||||
kernel32.lib \
|
||||
user32.lib \
|
||||
ole32.lib \
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
OS_LIBS = \
|
||||
OS_LIBS += \
|
||||
kernel32.lib \
|
||||
user32.lib \
|
||||
ole32.lib \
|
||||
|
@ -8,7 +8,7 @@ MOZ_GLUE_PROGRAM_LDFLAGS =
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
OS_LIBS = \
|
||||
OS_LIBS += \
|
||||
kernel32.lib \
|
||||
user32.lib \
|
||||
ole32.lib \
|
||||
|
@ -208,7 +208,7 @@ PreviewController.prototype = {
|
||||
|
||||
get zoom() {
|
||||
// Note that winutils.fullZoom accounts for "quantization" of the zoom factor
|
||||
// from nsIMarkupDocumentViewer due to conversion through appUnits.
|
||||
// from nsIContentViewer due to conversion through appUnits.
|
||||
// We do -not- want screenPixelsPerCSSPixel here, because that would -also-
|
||||
// incorporate any scaling that is applied due to hi-dpi resolution options.
|
||||
return this.winutils.fullZoom;
|
||||
|
@ -45,6 +45,16 @@ AC_DIVERT_PUSH(MOZ_DIVERSION_SUBST)dnl
|
||||
AC_DIVERT_POP()dnl
|
||||
])])])])
|
||||
|
||||
dnl Ignore AC_SUBSTs for variables we don't have use for but that autoconf
|
||||
dnl itself exports.
|
||||
define([AC_SUBST_CFLAGS], )
|
||||
define([AC_SUBST_CPPFLAGS], )
|
||||
define([AC_SUBST_CXXFLAGS], )
|
||||
define([AC_SUBST_FFLAGS], )
|
||||
define([AC_SUBST_DEFS], )
|
||||
define([AC_SUBST_LDFLAGS], )
|
||||
define([AC_SUBST_LIBS], )
|
||||
|
||||
dnl Wrap AC_DEFINE to store values in a format suitable for python.
|
||||
dnl autoconf's AC_DEFINE still needs to be used to fill confdefs.h,
|
||||
dnl which is #included during some compile checks.
|
||||
|
237
build/docs/defining-binaries.rst
Normal file
237
build/docs/defining-binaries.rst
Normal file
@ -0,0 +1,237 @@
|
||||
.. _defining_binaries:
|
||||
|
||||
======================================
|
||||
Defining Binaries for the Build System
|
||||
======================================
|
||||
|
||||
One part of what the build system does is compile C/C++ and link the resulting
|
||||
objects to produce executables and/or libraries. This document describes the
|
||||
basics of defining what is going to be built and how. All the following
|
||||
describes constructs to use in moz.build files.
|
||||
|
||||
|
||||
Source files
|
||||
============
|
||||
|
||||
Source files to be used in a given directory are registered in the ``SOURCES``
|
||||
and ``UNIFIED_SOURCES`` variables. ``UNIFIED_SOURCES`` have a special behavior
|
||||
in that they are aggregated by batches of 16, requiring, for example, that there
|
||||
are no conflicting variables in those source files.
|
||||
|
||||
``SOURCES`` and ``UNIFIED_SOURCES`` are lists which must be appended to, and
|
||||
each append requires the given list to be alphanumerically ordered.
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'FirstSource.cpp',
|
||||
'SecondSource.cpp',
|
||||
'ThirdSource.cpp',
|
||||
]
|
||||
|
||||
SOURCES += [
|
||||
'OtherSource.cpp',
|
||||
]
|
||||
|
||||
``SOURCES`` and ``UNIFIED_SOURCES`` can contain a mix of different file types,
|
||||
for C, C++, and Objective C.
|
||||
|
||||
|
||||
Static Libraries
|
||||
================
|
||||
|
||||
To build a static library, other than defining the source files (see above), one
|
||||
just needs to define a library name with the ``LIBRARY_NAME`` variable.
|
||||
|
||||
LIBRARY_NAME = 'foo'
|
||||
|
||||
The library file name will be ``libfoo.a`` on UNIX systems and ``foo.lib`` on
|
||||
Windows.
|
||||
|
||||
If the static library needs to aggregate other static libraries, a list of
|
||||
``LIBRARY_NAME`` can be added to the ``USE_LIBS`` variable. Like ``SOURCES``, it
|
||||
requires the appended list to be alphanumerically ordered.
|
||||
|
||||
USE_LIBS += ['bar', 'baz']
|
||||
|
||||
If there are multiple directories containing the same ``LIBRARY_NAME``, it is
|
||||
possible to disambiguate by prefixing with the path to the wanted one (relative
|
||||
or absolute):
|
||||
|
||||
USE_LIBS += [
|
||||
'/path/from/topsrcdir/to/bar',
|
||||
'../relative/baz',
|
||||
]
|
||||
|
||||
Note that the leaf name in those paths is the ``LIBRARY_NAME``, not an actual
|
||||
file name.
|
||||
|
||||
Note that currently, the build system may not create an actual library for
|
||||
static libraries. It is an implementation detail that shouldn't need to be
|
||||
worried about.
|
||||
|
||||
As a special rule, USE_LIBS is allowed to contain references to shared
|
||||
libraries. In such cases, programs and shared libraries linking this static
|
||||
library will inherit those shared library dependencies.
|
||||
|
||||
|
||||
Intermediate (Static) Libraries
|
||||
===============================
|
||||
|
||||
In many cases in the tree, static libraries are built with the only purpose
|
||||
of being linked into another, bigger one (like libxul). Instead of adding all
|
||||
required libraries to ``USE_LIBS`` for the bigger one, it is possible to tell
|
||||
the build system that the library built in the current directory is meant to
|
||||
be linked to that bigger library, with the ``FINAL_LIBRARY`` variable.
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
The ``FINAL_LIBRARY`` value must match a unique ``LIBRARY_NAME`` somewhere
|
||||
in the tree.
|
||||
|
||||
As a special rule, those intermediate libraries don't need a ``LIBRARY_NAME``
|
||||
for themselves.
|
||||
|
||||
|
||||
Shared Libraries
|
||||
================
|
||||
|
||||
Sometimes, we want shared libraries, a.k.a. dynamic libraries. Such libraries
|
||||
are defined with the same variables as static libraries, with the addition of
|
||||
the ``FORCE_SHARED_LIB`` boolean variable:
|
||||
|
||||
FORCE_SHARED_LIB = True
|
||||
|
||||
When this variable is set, no static library is built. See further below to
|
||||
build both types of libraries.
|
||||
|
||||
With a ``LIBRARY_NAME`` of ``foo``, the library file name will be
|
||||
``libfoo.dylib`` on OSX, ``libfoo.so`` on ELF systems (Linux, etc.), and
|
||||
``foo.dll`` on Windows. On Windows, there is also an import library named
|
||||
``foo.lib``, used on the linker command line. ``libfoo.dylib`` and
|
||||
``libfoo.so`` are considered the import library name for, resp. OSX and ELF
|
||||
systems.
|
||||
|
||||
On OSX, one may want to create a special kind of dynamic library: frameworks.
|
||||
This is done with the ``IS_FRAMEWORK`` boolean variable.
|
||||
|
||||
IS_FRAMEWORK = True
|
||||
|
||||
With a ``LIBRARY_NAME`` of ``foo``, the framework file name will be ``foo``.
|
||||
This variable however affects the behavior on all platforms, so it needs to
|
||||
be set only on OSX.
|
||||
|
||||
Another special kind of library, XPCOM-specific, are XPCOM components. One can
|
||||
build such a component with the ``IS_COMPONENT`` boolean variable.
|
||||
|
||||
IS_COMPONENT = True
|
||||
|
||||
|
||||
Executables
|
||||
===========
|
||||
|
||||
Executables, a.k.a. programs, are, in the simplest form, defined with the
|
||||
``PROGRAM`` variable.
|
||||
|
||||
PROGRAM = 'foobar'
|
||||
|
||||
On UNIX systems, the executable file name will be ``foobar``, while on Windows,
|
||||
it will be ``foobar.exe``.
|
||||
|
||||
Like static and shared libraries, the build system can be instructed to link
|
||||
libraries to the executable with ``USE_LIBS``, listing various ``LIBRARY_NAME``.
|
||||
|
||||
In some cases, we want to create an executable per source file in the current
|
||||
directory, in which case we can use the ``SIMPLE_PROGRAMS`` list:
|
||||
|
||||
SIMPLE_PROGRAMS = [
|
||||
'FirstProgram',
|
||||
'SecondProgram',
|
||||
]
|
||||
|
||||
The corresponding ``SOURCES`` must match:
|
||||
|
||||
SOURCES += [
|
||||
'FirstProgram.cpp',
|
||||
'SecondProgram.c',
|
||||
]
|
||||
|
||||
Similar to ``SIMPLE_PROGRAMS``, is ``CPP_UNIT_TESTS``, which defines, with the
|
||||
same rules, C++ unit tests programs.
|
||||
|
||||
|
||||
Building both static and shared libraries
|
||||
=========================================
|
||||
|
||||
When both types of libraries are required, one needs to set both
|
||||
``FORCE_SHARED_LIB`` and ``FORCE_STATIC_LIB`` boolean variables.
|
||||
|
||||
FORCE_SHARED_LIB = True
|
||||
FORCE_STATIC_LIB = True
|
||||
|
||||
But because static libraries and Windows import libraries have the same file
|
||||
names, either the static or the shared library name needs to be different
|
||||
than ``LIBRARY_NAME``.
|
||||
|
||||
The ``STATIC_LIBRARY_NAME`` and ``SHARED_LIBRARY_NAME`` variables can be used
|
||||
to change either the static or the shared library name.
|
||||
|
||||
LIBRARY_NAME = 'foo'
|
||||
STATIC_LIBRARY_NAME = 'foo_s'
|
||||
|
||||
With the above, on Windows, ``foo_s.lib`` will be the static library,
|
||||
``foo.dll`` the shared library, and ``foo.lib`` the import library.
|
||||
|
||||
In some cases, for convenience, it is possible to set both
|
||||
``STATIC_LIBRARY_NAME`` and ``SHARED_LIBRARY_NAME``. For example:
|
||||
|
||||
LIBRARY_NAME = 'mylib'
|
||||
STATIC_LIBRARY_NAME = 'mylib_s'
|
||||
SHARED_LIBRARY_NAME = CONFIG['SHARED_NAME']
|
||||
|
||||
This allows to use ``mylib`` in the ``USE_LIBS`` of another library or
|
||||
executable.
|
||||
|
||||
When refering to a ``LIBRARY_NAME`` building both types of libraries in
|
||||
``USE_LIBS``, the shared library is chosen to be linked. But sometimes,
|
||||
it is wanted to link the static version, in which case the ``LIBRARY_NAME``
|
||||
needs to be prefixed with ``static:`` in ``USE_LIBS``
|
||||
|
||||
a/moz.build:
|
||||
LIBRARY_NAME = 'mylib'
|
||||
FORCE_SHARED_LIB = True
|
||||
FORCE_STATIC_LIB = True
|
||||
STATIC_LIBRARY_NAME = 'mylib_s'
|
||||
b/moz.build:
|
||||
PROGRAM = 'myprog'
|
||||
USE_LIBS += [
|
||||
'static:mylib',
|
||||
]
|
||||
|
||||
|
||||
Miscellaneous
|
||||
=============
|
||||
|
||||
The ``SDK_LIBRARY`` boolean variable defines whether the library in the current
|
||||
directory is going to be installed in the SDK.
|
||||
|
||||
The ``SONAME`` variable declares a "shared object name" for the library. It
|
||||
defaults to the ``LIBRARY_NAME`` or the ``SHARED_LIBRARY_NAME`` if set. When
|
||||
linking to a library with a ``SONAME``, the resulting library or program will
|
||||
have a dependency on the library with the name corresponding to the ``SONAME``
|
||||
instead of ``LIBRARY_NAME``. This only impacts ELF systems.
|
||||
|
||||
a/moz.build:
|
||||
LIBRARY_NAME = 'mylib'
|
||||
b/moz.build:
|
||||
LIBRARY_NAME = 'otherlib'
|
||||
SONAME = 'foo'
|
||||
c/moz.build:
|
||||
PROGRAM = 'myprog'
|
||||
USE_LIBS += [
|
||||
'mylib',
|
||||
'otherlib',
|
||||
]
|
||||
|
||||
On e.g. Linux, the above ``myprog`` will have DT_NEEDED markers for
|
||||
``libmylib.so`` and ``libfoo.so`` instead of ``libmylib.so`` and
|
||||
``libotherlib.so`` if there weren't a ``SONAME``. This means the runtime
|
||||
requirement for ``myprog`` is ``libfoo.so`` instead of ``libotherlib.so``.
|
@ -22,6 +22,7 @@ Important Concepts
|
||||
mozinfo
|
||||
preprocessor
|
||||
jar-manifests
|
||||
defining-binaries
|
||||
|
||||
integrated development environment (IDE)
|
||||
========================================
|
||||
|
@ -6,7 +6,7 @@ MODULES = stlport
|
||||
|
||||
# Force to build a static library, instead of a fake library, without
|
||||
# installing it in dist/lib.
|
||||
LIBRARY = $(LIB_PREFIX)$(LIBRARY_NAME).$(LIB_SUFFIX)
|
||||
NO_EXPAND_LIBS = 1
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
@ -36,5 +36,5 @@ LOCAL_INCLUDES += [
|
||||
'/js/xpconnect/src',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
|
@ -4,5 +4,38 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
DIRS += ['public', 'src']
|
||||
TEST_DIRS += ['test']
|
||||
|
||||
XPIDL_SOURCES += [
|
||||
'nsIChromeRegistry.idl',
|
||||
'nsIToolkitChromeRegistry.idl',
|
||||
]
|
||||
|
||||
XPIDL_MODULE = 'chrome'
|
||||
|
||||
EXPORTS.mozilla.chrome += [
|
||||
'RegistryMessageUtils.h',
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'nsChromeProtocolHandler.cpp',
|
||||
'nsChromeRegistry.cpp',
|
||||
'nsChromeRegistryChrome.cpp',
|
||||
'nsChromeRegistryContent.cpp',
|
||||
]
|
||||
|
||||
MSVC_ENABLE_PGO = True
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
GENERATED_INCLUDES += [
|
||||
'/xpcom',
|
||||
]
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'/netwerk/base/src',
|
||||
'/netwerk/protocol/res',
|
||||
'/xpcom/components'
|
||||
]
|
||||
|
@ -1,13 +0,0 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; 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 distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
XPIDL_SOURCES += [
|
||||
'nsIChromeRegistry.idl',
|
||||
'nsIToolkitChromeRegistry.idl',
|
||||
]
|
||||
|
||||
XPIDL_MODULE = 'chrome'
|
||||
|
@ -1,32 +0,0 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; 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 distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
EXPORTS.mozilla.chrome += [
|
||||
'RegistryMessageUtils.h',
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'nsChromeProtocolHandler.cpp',
|
||||
'nsChromeRegistry.cpp',
|
||||
'nsChromeRegistryChrome.cpp',
|
||||
'nsChromeRegistryContent.cpp',
|
||||
]
|
||||
|
||||
MSVC_ENABLE_PGO = True
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'xpcom_core'
|
||||
|
||||
GENERATED_INCLUDES += [
|
||||
'/xpcom',
|
||||
]
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'/netwerk/base/src',
|
||||
'/netwerk/protocol/res',
|
||||
'/xpcom/components'
|
||||
]
|
@ -40,6 +40,7 @@ _MOZBUILD_EXTERNAL_VARIABLES := \
|
||||
CMMSRCS \
|
||||
CPP_UNIT_TESTS \
|
||||
DIRS \
|
||||
EXTRA_DSO_LDOPTS \
|
||||
EXTRA_PP_COMPONENTS \
|
||||
EXTRA_PP_JS_MODULES \
|
||||
FORCE_SHARED_LIB \
|
||||
@ -56,6 +57,8 @@ _MOZBUILD_EXTERNAL_VARIABLES := \
|
||||
JS_MODULES_PATH \
|
||||
LD_VERSION_SCRIPT \
|
||||
LIBRARY_NAME \
|
||||
LIBS \
|
||||
MAKE_FRAMEWORK \
|
||||
MODULE \
|
||||
MSVC_ENABLE_PGO \
|
||||
NO_DIST_INSTALL \
|
||||
@ -63,8 +66,12 @@ _MOZBUILD_EXTERNAL_VARIABLES := \
|
||||
PROGRAM \
|
||||
RESOURCE_FILES \
|
||||
SDK_HEADERS \
|
||||
SDK_LIBRARY \
|
||||
SHARED_LIBRARY_LIBS \
|
||||
SHARED_LIBRARY_NAME \
|
||||
SIMPLE_PROGRAMS \
|
||||
SONAME \
|
||||
STATIC_LIBRARY_NAME \
|
||||
TEST_DIRS \
|
||||
TIERS \
|
||||
TOOL_DIRS \
|
||||
@ -75,6 +82,7 @@ _MOZBUILD_EXTERNAL_VARIABLES := \
|
||||
_DEPRECATED_VARIABLES := \
|
||||
ANDROID_RESFILES \
|
||||
EXPORT_LIBRARY \
|
||||
HOST_LIBS \
|
||||
LIBXUL_LIBRARY \
|
||||
MOCHITEST_A11Y_FILES \
|
||||
MOCHITEST_BROWSER_FILES \
|
||||
@ -259,8 +267,6 @@ ifneq (,$(MOZ_DEBUG)$(MOZ_DEBUG_SYMBOLS))
|
||||
_DEBUG_LDFLAGS += $(MOZ_DEBUG_LDFLAGS)
|
||||
endif
|
||||
|
||||
MOZALLOC_LIB = $(call EXPAND_LIBNAME_PATH,mozalloc,$(DIST)/lib)
|
||||
|
||||
ASFLAGS += $(_DEBUG_ASFLAGS)
|
||||
OS_CFLAGS += $(_DEBUG_CFLAGS)
|
||||
OS_CXXFLAGS += $(_DEBUG_CFLAGS)
|
||||
@ -335,32 +341,6 @@ ifdef LIBXUL_LIBRARY
|
||||
ifdef IS_COMPONENT
|
||||
$(error IS_COMPONENT is set, but is not compatible with LIBXUL_LIBRARY)
|
||||
endif
|
||||
ifeq (,$(filter xul xul-%,$(LIBRARY_NAME)))
|
||||
FORCE_STATIC_LIB=1
|
||||
endif
|
||||
endif
|
||||
|
||||
# If we are building this component into an extension/xulapp, it cannot be
|
||||
# statically linked. In the future we may want to add a xulapp meta-component
|
||||
# build option.
|
||||
|
||||
ifdef XPI_NAME
|
||||
ifdef IS_COMPONENT
|
||||
FORCE_STATIC_LIB=
|
||||
FORCE_SHARED_LIB=1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef SHARED_LIBRARY_NAME
|
||||
ifdef LIBRARY_NAME
|
||||
SHARED_LIBRARY_NAME=$(LIBRARY_NAME)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef STATIC_LIBRARY_NAME
|
||||
ifdef LIBRARY_NAME
|
||||
STATIC_LIBRARY_NAME=$(LIBRARY_NAME)
|
||||
endif
|
||||
endif
|
||||
|
||||
# PGO on MSVC is opt-in
|
||||
@ -607,8 +587,6 @@ SDK_BIN_DIR = $(DIST)/sdk/bin
|
||||
|
||||
DEPENDENCIES = .md
|
||||
|
||||
MOZ_COMPONENT_LIBS=$(XPCOM_LIBS) $(MOZ_COMPONENT_NSPR_LIBS)
|
||||
|
||||
ifdef MACOSX_DEPLOYMENT_TARGET
|
||||
export MACOSX_DEPLOYMENT_TARGET
|
||||
endif # MACOSX_DEPLOYMENT_TARGET
|
||||
@ -796,7 +774,7 @@ CHECK_STDCXX = @$(TOOLCHAIN_PREFIX)objdump -p $(1) | grep -e 'GLIBCXX_3\.4\.\(9\
|
||||
endif
|
||||
|
||||
ifdef MOZ_LIBSTDCXX_TARGET_VERSION
|
||||
EXTRA_LIBS += $(call EXPAND_LIBNAME_PATH,stdc++compat,$(DEPTH)/build/unix/stdc++compat)
|
||||
OS_LIBS += $(call EXPAND_LIBNAME_PATH,stdc++compat,$(DEPTH)/build/unix/stdc++compat)
|
||||
endif
|
||||
ifdef MOZ_LIBSTDCXX_HOST_VERSION
|
||||
HOST_EXTRA_LIBS += $(call EXPAND_LIBNAME_PATH,host_stdc++compat,$(DEPTH)/build/unix/stdc++compat)
|
||||
|
@ -51,7 +51,6 @@ ifneq (,$(filter-out 0 1,$(words $(CURRENT_TIER))))
|
||||
$(error $(CURRENT_TIER) not supported on the same make command line)
|
||||
endif
|
||||
CURRENT_TIER := $(subst recurse_,,$(CURRENT_TIER:-deps=))
|
||||
CURRENT_SUBTIERS := $($(CURRENT_TIER)_subtiers)
|
||||
|
||||
# The rules here are doing directory traversal, so we don't want further
|
||||
# recursion to happen when running make -C subdir $tier. But some make files
|
||||
@ -70,35 +69,24 @@ endif
|
||||
# Get all directories traversed for all subtiers in the current tier, or use
|
||||
# directly the $(*_dirs) variables available in root.mk when there is no
|
||||
# TIERS (like for js/src).
|
||||
TIER_DIRS = $(or $($(1)_dirs),$(foreach subtier,$($(1)_subtiers),$($(1)_subtier_$(subtier))))
|
||||
CURRENT_DIRS := $(call TIER_DIRS,$(CURRENT_TIER))
|
||||
CURRENT_DIRS := $($(CURRENT_TIER)_dirs)
|
||||
|
||||
ifneq (,$(filter binaries libs,$(CURRENT_TIER)))
|
||||
WANT_STAMPS = 1
|
||||
STAMP_TOUCH = $(TOUCH) $(@D)/binaries
|
||||
endif
|
||||
|
||||
# Subtier delimiter rules
|
||||
$(addprefix subtiers/,$(addsuffix _start/$(CURRENT_TIER),$(CURRENT_SUBTIERS))): subtiers/%_start/$(CURRENT_TIER): $(if $(WANT_STAMPS),$(call mkdir_deps,subtiers/%_start))
|
||||
@$(STAMP_TOUCH)
|
||||
|
||||
$(addprefix subtiers/,$(addsuffix _finish/$(CURRENT_TIER),$(CURRENT_SUBTIERS))): subtiers/%_finish/$(CURRENT_TIER): $(if $(WANT_STAMPS),$(call mkdir_deps,subtiers/%_finish))
|
||||
@$(STAMP_TOUCH)
|
||||
|
||||
$(addprefix subtiers/,$(addsuffix /$(CURRENT_TIER),$(CURRENT_SUBTIERS))): %/$(CURRENT_TIER): $(if $(WANT_STAMPS),$(call mkdir_deps,%))
|
||||
@$(STAMP_TOUCH)
|
||||
|
||||
GARBAGE_DIRS += subtiers
|
||||
|
||||
# Recursion rule for all directories traversed for all subtiers in the
|
||||
# current tier.
|
||||
# root.mk defines subtier_of_* variables, that map a normalized subdir path to
|
||||
# a subtier name (e.g. subtier_of_memory_jemalloc = base)
|
||||
$(addsuffix /$(CURRENT_TIER),$(CURRENT_DIRS)): %/$(CURRENT_TIER):
|
||||
$(call SUBMAKE,$(if $(filter $*,$(tier_$(subtier_of_$(subst /,_,$*))_staticdirs)),,$(CURRENT_TIER)),$*)
|
||||
$(call SUBMAKE,$(if $(filter $*,$(staticdirs)),,$(CURRENT_TIER)),$*)
|
||||
# Ensure existing stamps are up-to-date, but don't create one if submake didn't create one.
|
||||
$(if $(wildcard $@),@$(STAMP_TOUCH))
|
||||
|
||||
ifndef STAMP_TOUCH
|
||||
.PHONY: $(addsuffix /$(CURRENT_TIER),$(CURRENT_DIRS))
|
||||
endif
|
||||
|
||||
# Dummy rules for possibly inexisting dependencies for the above tier targets
|
||||
$(addsuffix /Makefile,$(CURRENT_DIRS)) $(addsuffix /backend.mk,$(CURRENT_DIRS)):
|
||||
|
||||
|
@ -81,19 +81,17 @@ ifdef COMPILE_ENVIRONMENT
|
||||
# Compile the tests to $(DIST)/bin. Make lots of niceties available by default
|
||||
# through TestHarness.h, by modifying the list of includes and the libs against
|
||||
# which stuff links.
|
||||
CPPSRCS += $(CPP_UNIT_TESTS)
|
||||
CPP_UNIT_TEST_BINS := $(CPP_UNIT_TESTS:.cpp=$(BIN_SUFFIX))
|
||||
SIMPLE_PROGRAMS += $(CPP_UNIT_TEST_BINS)
|
||||
SIMPLE_PROGRAMS += $(CPP_UNIT_TESTS)
|
||||
INCLUDES += -I$(DIST)/include/testing
|
||||
LIBS += $(XPCOM_GLUE_LDOPTS) $(NSPR_LIBS)
|
||||
LIBS += $(NSPR_LIBS)
|
||||
|
||||
ifndef MOZ_PROFILE_GENERATE
|
||||
libs:: $(CPP_UNIT_TEST_BINS) $(call mkdir_deps,$(DIST)/cppunittests)
|
||||
$(NSINSTALL) $(CPP_UNIT_TEST_BINS) $(DIST)/cppunittests
|
||||
libs:: $(CPP_UNIT_TESTS) $(call mkdir_deps,$(DIST)/cppunittests)
|
||||
$(NSINSTALL) $(CPP_UNIT_TESTS) $(DIST)/cppunittests
|
||||
endif
|
||||
|
||||
run-cppunittests::
|
||||
@$(PYTHON) $(topsrcdir)/testing/runcppunittests.py --xre-path=$(DIST)/bin --symbols-path=$(DIST)/crashreporter-symbols $(subst .cpp,$(BIN_SUFFIX),$(CPP_UNIT_TESTS))
|
||||
@$(PYTHON) $(topsrcdir)/testing/runcppunittests.py --xre-path=$(DIST)/bin --symbols-path=$(DIST)/crashreporter-symbols $(CPP_UNIT_TESTS)
|
||||
|
||||
cppunittests-remote: DM_TRANS?=adb
|
||||
cppunittests-remote:
|
||||
@ -103,7 +101,7 @@ cppunittests-remote:
|
||||
--localLib=$(DEPTH)/dist/$(MOZ_APP_NAME) \
|
||||
--dm_trans=$(DM_TRANS) \
|
||||
--deviceIP=${TEST_DEVICE} \
|
||||
$(subst .cpp,$(BIN_SUFFIX),$(CPP_UNIT_TESTS)) $(EXTRA_TEST_ARGS); \
|
||||
$(CPP_UNIT_TESTS) $(EXTRA_TEST_ARGS); \
|
||||
else \
|
||||
echo 'please prepare your host with environment variables for TEST_DEVICE'; \
|
||||
fi
|
||||
@ -137,15 +135,24 @@ endif # ENABLE_TESTS
|
||||
#
|
||||
|
||||
ifndef LIBRARY
|
||||
ifdef STATIC_LIBRARY_NAME
|
||||
REAL_LIBRARY := $(LIB_PREFIX)$(STATIC_LIBRARY_NAME).$(LIB_SUFFIX)
|
||||
ifdef REAL_LIBRARY
|
||||
# Don't build actual static library if a shared library is also built
|
||||
ifdef FORCE_SHARED_LIB
|
||||
# ... except when we really want one
|
||||
ifdef NO_EXPAND_LIBS
|
||||
LIBRARY := $(REAL_LIBRARY) $(REAL_LIBRARY).$(LIBS_DESC_SUFFIX)
|
||||
else
|
||||
LIBRARY := $(REAL_LIBRARY).$(LIBS_DESC_SUFFIX)
|
||||
endif
|
||||
else
|
||||
# Only build actual library if it is installed in DIST/lib or SDK
|
||||
ifeq (,$(SDK_LIBRARY)$(DIST_INSTALL)$(NO_EXPAND_LIBS))
|
||||
LIBRARY := $(REAL_LIBRARY).$(LIBS_DESC_SUFFIX)
|
||||
else
|
||||
LIBRARY := $(REAL_LIBRARY) $(REAL_LIBRARY).$(LIBS_DESC_SUFFIX)
|
||||
endif
|
||||
endif # STATIC_LIBRARY_NAME
|
||||
endif
|
||||
endif # REAL_LIBRARY
|
||||
endif # LIBRARY
|
||||
|
||||
ifndef HOST_LIBRARY
|
||||
@ -162,44 +169,12 @@ ifdef LIB_IS_C_ONLY
|
||||
MKSHLIB = $(MKCSHLIB)
|
||||
endif
|
||||
|
||||
ifneq (,$(filter WINNT,$(OS_ARCH)))
|
||||
IMPORT_LIBRARY := $(LIB_PREFIX)$(SHARED_LIBRARY_NAME).$(IMPORT_LIB_SUFFIX)
|
||||
endif
|
||||
|
||||
ifdef MAKE_FRAMEWORK
|
||||
SHARED_LIBRARY := $(SHARED_LIBRARY_NAME)
|
||||
else
|
||||
SHARED_LIBRARY := $(DLL_PREFIX)$(SHARED_LIBRARY_NAME)$(DLL_SUFFIX)
|
||||
endif
|
||||
|
||||
EMBED_MANIFEST_AT=2
|
||||
|
||||
endif # MKSHLIB
|
||||
endif # FORCE_SHARED_LIB
|
||||
endif # LIBRARY
|
||||
|
||||
ifdef MKSHLIB
|
||||
ifdef SONAME
|
||||
DSO_SONAME = $(DLL_PREFIX)$(SONAME)$(DLL_SUFFIX)
|
||||
else
|
||||
DSO_SONAME = $(notdir $@)
|
||||
endif
|
||||
endif # MKSHLIB
|
||||
|
||||
ifdef FORCE_STATIC_LIB
|
||||
ifndef FORCE_SHARED_LIB
|
||||
SHARED_LIBRARY := $(NULL)
|
||||
DEF_FILE := $(NULL)
|
||||
IMPORT_LIBRARY := $(NULL)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef FORCE_SHARED_LIB
|
||||
ifndef FORCE_STATIC_LIB
|
||||
LIBRARY := $(NULL)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
ifndef GNU_CC
|
||||
|
||||
@ -306,7 +281,7 @@ ALL_TRASH = \
|
||||
$(GARBAGE) $(TARGETS) $(OBJS) $(PROGOBJS) LOGS TAGS a.out \
|
||||
$(filter-out $(ASFILES),$(OBJS:.$(OBJ_SUFFIX)=.s)) $(OBJS:.$(OBJ_SUFFIX)=.ii) \
|
||||
$(OBJS:.$(OBJ_SUFFIX)=.i) $(OBJS:.$(OBJ_SUFFIX)=.i_o) \
|
||||
$(HOST_PROGOBJS) $(HOST_OBJS) $(IMPORT_LIBRARY) $(DEF_FILE)\
|
||||
$(HOST_PROGOBJS) $(HOST_OBJS) $(IMPORT_LIBRARY) \
|
||||
$(EXE_DEF_FILE) so_locations _gen _stubs $(wildcard *.res) $(wildcard *.RES) \
|
||||
$(wildcard *.pdb) $(CODFILE) $(IMPORT_LIBRARY) \
|
||||
$(SHARED_LIBRARY:$(DLL_SUFFIX)=.exp) $(wildcard *.ilk) \
|
||||
@ -653,7 +628,7 @@ ifdef PROGRAM
|
||||
endif
|
||||
ifdef SHARED_LIBRARY
|
||||
$(PYTHON) $(topsrcdir)/build/win32/pgomerge.py \
|
||||
$(SHARED_LIBRARY_NAME) $(DIST)/bin
|
||||
$(patsubst $(DLL_PREFIX)%$(DLL_SUFFIX),%,$(SHARED_LIBRARY)) $(DIST)/bin
|
||||
endif
|
||||
endif # SHARED_LIBRARY || PROGRAM
|
||||
endif # WINNT_
|
||||
@ -740,7 +715,7 @@ ifdef MOZ_PROFILE_GENERATE
|
||||
touch -t `date +%Y%m%d%H%M.%S -d 'now+5seconds'` pgo.relink
|
||||
endif
|
||||
else # !WINNT || GNU_CC
|
||||
$(EXPAND_CCC) -o $@ $(CXXFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(LIBS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE) $(STLPORT_LIBS)
|
||||
$(EXPAND_CCC) -o $@ $(CXXFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(LIBS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(EXTRA_LIBS) $(OS_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE) $(STLPORT_LIBS)
|
||||
$(call CHECK_BINARY,$@)
|
||||
endif # WINNT && !GNU_CC
|
||||
|
||||
@ -796,7 +771,7 @@ ifdef MSMANIFEST_TOOL
|
||||
fi
|
||||
endif # MSVC with manifest tool
|
||||
else
|
||||
$(EXPAND_CCC) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(LIBS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(STLPORT_LIBS)
|
||||
$(EXPAND_CCC) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(LIBS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(EXTRA_LIBS) $(OS_LIBS) $(BIN_FLAGS) $(STLPORT_LIBS)
|
||||
$(call CHECK_BINARY,$@)
|
||||
endif # WINNT && !GNU_CC
|
||||
|
||||
@ -827,13 +802,13 @@ endif
|
||||
$(filter %.$(LIB_SUFFIX),$(LIBRARY)): $(OBJS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
|
||||
$(REPORT_BUILD)
|
||||
$(RM) $(LIBRARY)
|
||||
$(EXPAND_AR) $(AR_FLAGS) $(OBJS) $(SHARED_LIBRARY_LIBS)
|
||||
$(EXPAND_AR) $(AR_FLAGS) $(OBJS) $(SHARED_LIBRARY_LIBS) $(filter %.$(LIB_SUFFIX),$(EXTRA_LIBS))
|
||||
|
||||
$(filter-out %.$(LIB_SUFFIX),$(LIBRARY)): $(filter %.$(LIB_SUFFIX),$(LIBRARY)) $(OBJS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
|
||||
# When we only build a library descriptor, blow out any existing library
|
||||
$(REPORT_BUILD)
|
||||
$(if $(filter %.$(LIB_SUFFIX),$(LIBRARY)),,$(RM) $(REAL_LIBRARY))
|
||||
$(EXPAND_LIBS_GEN) -o $@ $(OBJS) $(SHARED_LIBRARY_LIBS)
|
||||
$(EXPAND_LIBS_GEN) -o $@ $(OBJS) $(SHARED_LIBRARY_LIBS) $(filter %.$(LIB_SUFFIX),$(EXTRA_LIBS))
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
# Import libraries are created by the rules creating shared libraries.
|
||||
@ -868,7 +843,7 @@ endif
|
||||
# symlinks back to the originals. The symlinks are a no-op for stabs debugging,
|
||||
# so no need to conditionalize on OS version or debugging format.
|
||||
|
||||
$(SHARED_LIBRARY): $(OBJS) $(DEF_FILE) $(RESFILE) $(LIBRARY) $(EXTRA_DEPS) $(GLOBAL_DEPS)
|
||||
$(SHARED_LIBRARY): $(OBJS) $(RESFILE) $(LIBRARY) $(EXTRA_DEPS) $(GLOBAL_DEPS)
|
||||
$(REPORT_BUILD)
|
||||
ifndef INCREMENTAL_LINKER
|
||||
$(RM) $@
|
||||
@ -877,10 +852,10 @@ ifdef DTRACE_LIB_DEPENDENT
|
||||
ifndef XP_MACOSX
|
||||
dtrace -G -C -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(shell $(EXPAND_LIBS) $(MOZILLA_PROBE_LIBS))
|
||||
endif
|
||||
$(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(SUB_SHLOBJS) $(DTRACE_PROBE_OBJ) $(MOZILLA_PROBE_LIBS) $(RESFILE) $(LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE) $(if $(LIB_IS_C_ONLY),,$(STLPORT_LIBS))
|
||||
$(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(SUB_SHLOBJS) $(DTRACE_PROBE_OBJ) $(MOZILLA_PROBE_LIBS) $(RESFILE) $(LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(EXTRA_LIBS) $(OS_LIBS) $(SHLIB_LDENDFILE) $(if $(LIB_IS_C_ONLY),,$(STLPORT_LIBS))
|
||||
@$(RM) $(DTRACE_PROBE_OBJ)
|
||||
else # ! DTRACE_LIB_DEPENDENT
|
||||
$(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(SUB_SHLOBJS) $(RESFILE) $(LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE) $(if $(LIB_IS_C_ONLY),,$(STLPORT_LIBS))
|
||||
$(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(SUB_SHLOBJS) $(RESFILE) $(LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(EXTRA_LIBS) $(OS_LIBS) $(SHLIB_LDENDFILE) $(if $(LIB_IS_C_ONLY),,$(STLPORT_LIBS))
|
||||
endif # DTRACE_LIB_DEPENDENT
|
||||
$(call CHECK_BINARY,$@)
|
||||
|
||||
|
87
configure.in
87
configure.in
@ -959,37 +959,10 @@ TARGET_MD_ARCH=unix
|
||||
DIRENT_INO=d_ino
|
||||
MOZ_USER_DIR=".mozilla"
|
||||
|
||||
MOZ_JPEG_CFLAGS=
|
||||
MOZ_JPEG_LIBS='$(call EXPAND_LIBNAME_PATH,mozjpeg,$(DEPTH)/media/libjpeg)'
|
||||
MOZ_BZ2_CFLAGS=
|
||||
MOZ_BZ2_LIBS='$(call EXPAND_LIBNAME_PATH,bz2,$(DEPTH)/modules/libbz2/src)'
|
||||
MOZ_PNG_CFLAGS="-I$_objdir/dist/include" # needed for freetype compilation
|
||||
MOZ_PNG_LIBS='$(call EXPAND_LIBNAME_PATH,mozpng,$(DEPTH)/media/libpng)'
|
||||
|
||||
MOZ_JS_STATIC_LIBS='$(call EXPAND_LIBNAME_PATH,js_static,$(LIBXUL_DIST)/lib)'
|
||||
MOZ_JS_SHARED_LIBS='$(call EXPAND_LIBNAME_PATH,mozjs,$(LIBXUL_DIST)/lib)'
|
||||
MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib'
|
||||
XPCOM_FROZEN_LDOPTS='$(call EXPAND_LIBNAME_PATH,xul mozalloc,$(LIBXUL_DIST)/bin)'
|
||||
LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS)'
|
||||
XPCOM_GLUE_LDOPTS='$(LIBXUL_DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) $(XPCOM_FROZEN_LDOPTS)'
|
||||
XPCOM_STANDALONE_GLUE_LDOPTS='$(LIBXUL_DIST)/lib/$(LIB_PREFIX)xpcomglue.$(LIB_SUFFIX)'
|
||||
|
||||
# These are specially defined on Windows only
|
||||
case "$target" in
|
||||
*-mingw*)
|
||||
XPCOM_STATICRUNTIME_GLUE_LDOPTS='$(LIBXUL_DIST)/lib/$(LIB_PREFIX)xpcomglue_staticruntime_s.$(LIB_SUFFIX) $(XPCOM_FROZEN_LDOPTS)'
|
||||
XPCOM_STANDALONE_STATICRUNTIME_GLUE_LDOPTS='$(LIBXUL_DIST)/lib/$(LIB_PREFIX)xpcomglue_staticruntime.$(LIB_SUFFIX)'
|
||||
;;
|
||||
*)
|
||||
XPCOM_STATICRUNTIME_GLUE_LDOPTS=$XPCOM_GLUE_LDOPTS
|
||||
XPCOM_STANDALONE_STATICRUNTIME_GLUE_LDOPTS=$XPCOM_STANDALONE_GLUE_LDOPTS
|
||||
;;
|
||||
esac
|
||||
|
||||
MOZ_FS_LAYOUT=unix
|
||||
|
||||
MOZ_COMPONENT_NSPR_LIBS='-L$(LIBXUL_DIST)/bin $(NSPR_LIBS)'
|
||||
|
||||
USE_DEPENDENT_LIBS=1
|
||||
|
||||
_PLATFORM_DEFAULT_TOOLKIT=cairo-gtk2
|
||||
@ -2061,7 +2034,6 @@ ia64*-hpux*)
|
||||
MC=mc.exe
|
||||
# certain versions of cygwin's makedepend barf on the
|
||||
# #include <string> vs -I./dist/include/string issue so don't use it
|
||||
XPCOM_FROZEN_LDOPTS='$(call EXPAND_LIBNAME_PATH,xul mozalloc,$(LIBXUL_DIST)/lib)'
|
||||
if test -n "$GNU_CC" -o -n "$CLANG_CC"; then
|
||||
CC="$CC -mwindows"
|
||||
CXX="$CXX -mwindows"
|
||||
@ -3023,16 +2995,18 @@ fi
|
||||
|
||||
AC_LANG_CPLUSPLUS
|
||||
|
||||
ICONV_LIBS=
|
||||
|
||||
case $target_os in
|
||||
darwin*|mingw*)
|
||||
;;
|
||||
*)
|
||||
|
||||
AC_CHECK_LIB(c, iconv, [_ICONV_LIBS="$_ICONV_LIBS"],
|
||||
AC_CHECK_LIB(iconv, iconv, [_ICONV_LIBS="$_ICONV_LIBS -liconv"],
|
||||
AC_CHECK_LIB(iconv, libiconv, [_ICONV_LIBS="$_ICONV_LIBS -liconv"])))
|
||||
AC_CHECK_LIB(c, iconv, [ICONV_LIBS=],
|
||||
AC_CHECK_LIB(iconv, iconv, [ICONV_LIBS="-liconv"],
|
||||
AC_CHECK_LIB(iconv, libiconv, [ICONV_LIBS="-liconv"])))
|
||||
_SAVE_LIBS=$LIBS
|
||||
LIBS="$LIBS $_ICONV_LIBS"
|
||||
LIBS="$LIBS $ICONV_LIBS"
|
||||
AC_CACHE_CHECK(
|
||||
[for iconv()],
|
||||
ac_cv_func_iconv,
|
||||
@ -3051,8 +3025,7 @@ AC_CACHE_CHECK(
|
||||
)
|
||||
if test "$ac_cv_func_iconv" = "yes"; then
|
||||
AC_DEFINE(HAVE_ICONV)
|
||||
LIBXUL_LIBS="$LIBXUL_LIBS $_ICONV_LIBS"
|
||||
LIBICONV="$_ICONV_LIBS"
|
||||
LIBICONV="$ICONV_LIBS"
|
||||
AC_CACHE_CHECK(
|
||||
[for iconv() with const input],
|
||||
ac_cv_func_const_iconv,
|
||||
@ -3079,6 +3052,8 @@ LIBS=$_SAVE_LIBS
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(ICONV_LIBS)
|
||||
|
||||
AM_LANGINFO_CODESET
|
||||
|
||||
AC_LANG_C
|
||||
@ -3625,11 +3600,6 @@ dnl system ZLIB support
|
||||
dnl ========================================================
|
||||
MOZ_ZLIB_CHECK([1.2.3])
|
||||
|
||||
if test "$MOZ_NATIVE_ZLIB" != 1; then
|
||||
MOZ_ZLIB_CFLAGS="-I${_topsrcdir}/modules/zlib/src"
|
||||
MOZ_ZLIB_LIBS='$(call EXPAND_LIBNAME_PATH,mozz,'"$MOZ_BUILD_ROOT"'/modules/zlib/src)'
|
||||
fi
|
||||
|
||||
if test "$MOZ_LINKER" = 1 -a "$MOZ_NATIVE_ZLIB" != 1; then
|
||||
AC_MSG_ERROR([Custom dynamic linker requires --with-system-zlib])
|
||||
fi
|
||||
@ -3760,10 +3730,6 @@ dnl system libffi Support
|
||||
dnl ========================================================
|
||||
MOZ_CONFIG_FFI()
|
||||
|
||||
if test -n "$MOZ_NATIVE_FFI"; then
|
||||
MOZ_JS_STATIC_LIBS="$MOZ_JS_STATIC_LIBS $MOZ_FFI_LIBS"
|
||||
fi
|
||||
|
||||
# split JS out by default to avoid VS2005 PGO crash (bug 591836).
|
||||
if test "$OS_ARCH" = "WINNT"; then
|
||||
JS_SHARED_LIBRARY=1
|
||||
@ -4247,7 +4213,6 @@ cairo-cocoa)
|
||||
TK_CFLAGS="-DNO_X11"
|
||||
CFLAGS="$CFLAGS $TK_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $TK_CFLAGS"
|
||||
XPCOM_FROZEN_LDOPTS='$(LIBXUL_DIST)/bin/XUL $(call EXPAND_LIBNAME_PATH,mozalloc,$(LIBXUL_DIST)/bin)'
|
||||
MOZ_USER_DIR="Mozilla"
|
||||
MOZ_FS_LAYOUT=bundle
|
||||
MOZ_WEBGL=1
|
||||
@ -4262,7 +4227,6 @@ cairo-uikit)
|
||||
TK_LIBS='-framework Foundation -framework CoreFoundation -framework CoreGraphics -framework CoreText'
|
||||
CFLAGS="$CFLAGS $TK_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $TK_CFLAGS"
|
||||
XPCOM_FROZEN_LDOPTS='$(LIBXUL_DIST)/bin/XUL $(call EXPAND_LIBNAME_PATH,mozalloc,$(LIBXUL_DIST)/bin)'
|
||||
MOZ_USER_DIR="Mozilla"
|
||||
MOZ_FS_LAYOUT=bundle
|
||||
;;
|
||||
@ -4278,7 +4242,6 @@ cairo-android)
|
||||
;;
|
||||
|
||||
cairo-gonk)
|
||||
XPCOM_FROZEN_LDOPTS='$(call EXPAND_LIBNAME_PATH,xul mozalloc,$(LIBXUL_DIST)/lib)'
|
||||
AC_DEFINE(MOZ_WIDGET_GONK)
|
||||
AC_DEFINE(MOZ_TOUCH)
|
||||
MOZ_WIDGET_TOOLKIT=gonk
|
||||
@ -6475,11 +6438,8 @@ MOZ_ARG_ENABLE_BOOL(system-sqlite,
|
||||
MOZ_NATIVE_SQLITE=1,
|
||||
MOZ_NATIVE_SQLITE= )
|
||||
|
||||
if test -z "$MOZ_NATIVE_SQLITE"
|
||||
if test -n "$MOZ_NATIVE_SQLITE"
|
||||
then
|
||||
SQLITE_CFLAGS=
|
||||
SQLITE_LIBS='$(call EXPAND_LIBNAME_PATH,mozsqlite3,$(DIST)/lib)'
|
||||
else
|
||||
dnl ============================
|
||||
dnl === SQLite Version check ===
|
||||
dnl ============================
|
||||
@ -7844,9 +7804,6 @@ dnl =
|
||||
dnl ========================================================
|
||||
MOZ_ARG_HEADER(Static build options)
|
||||
|
||||
AC_SUBST(LIBXUL_LIBS)
|
||||
XPCOM_LIBS="$LIBXUL_LIBS"
|
||||
|
||||
if test "$OS_ARCH" = "WINNT"; then
|
||||
GKMEDIAS_SHARED_LIBRARY=1
|
||||
AC_DEFINE(GKMEDIAS_SHARED_LIBRARY)
|
||||
@ -8019,8 +7976,6 @@ fi
|
||||
|
||||
if test "$MOZ_TREE_PIXMAN"; then
|
||||
AC_DEFINE(MOZ_TREE_PIXMAN)
|
||||
MOZ_PIXMAN_CFLAGS=""
|
||||
MOZ_PIXMAN_LIBS='$(call EXPAND_LIBNAME_PATH,mozlibpixman,$(DEPTH)/gfx/cairo/libpixman/src)'
|
||||
else
|
||||
PKG_CHECK_MODULES(PIXMAN, pixman-1 >= 0.19.2)
|
||||
MOZ_PIXMAN_CFLAGS="$PIXMAN_CFLAGS"
|
||||
@ -8397,7 +8352,6 @@ AC_SUBST(MOZ_UPDATE_XTERM)
|
||||
AC_SUBST(MOZ_AUTH_EXTENSION)
|
||||
AC_SUBST(MOZ_PERMISSIONS)
|
||||
AC_SUBST(MOZ_PREF_EXTENSIONS)
|
||||
AC_SUBST(MOZ_JS_LIBS)
|
||||
AC_SUBST(MOZ_DEBUG)
|
||||
AC_SUBST(MOZ_DEBUG_SYMBOLS)
|
||||
AC_SUBST(MOZ_DEBUG_ENABLE_DEFS)
|
||||
@ -8473,12 +8427,6 @@ AC_SUBST(MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS)
|
||||
AC_SUBST(MOZ_COMPONENT_NSPR_LIBS)
|
||||
|
||||
AC_SUBST(MOZ_FIX_LINK_PATHS)
|
||||
AC_SUBST(XPCOM_LIBS)
|
||||
AC_SUBST(XPCOM_FROZEN_LDOPTS)
|
||||
AC_SUBST(XPCOM_GLUE_LDOPTS)
|
||||
AC_SUBST(XPCOM_STANDALONE_GLUE_LDOPTS)
|
||||
AC_SUBST(XPCOM_STATICRUNTIME_GLUE_LDOPTS)
|
||||
AC_SUBST(XPCOM_STANDALONE_STATICRUNTIME_GLUE_LDOPTS)
|
||||
|
||||
AC_SUBST(USE_DEPENDENT_LIBS)
|
||||
|
||||
@ -8934,14 +8882,7 @@ fi
|
||||
|
||||
MOZ_CONFIG_ICU()
|
||||
|
||||
if test -n "$MOZ_NATIVE_ICU"; then
|
||||
MOZ_JS_STATIC_LIBS="$MOZ_JS_STATIC_LIBS $MOZ_ICU_LIBS"
|
||||
fi
|
||||
|
||||
if test -n "$JS_SHARED_LIBRARY"; then
|
||||
MOZ_JS_LIBS="$MOZ_JS_SHARED_LIBS"
|
||||
else
|
||||
MOZ_JS_LIBS="$MOZ_JS_STATIC_LIBS"
|
||||
if test -z "$JS_SHARED_LIBRARY"; then
|
||||
AC_DEFINE(MOZ_STATIC_JS)
|
||||
fi
|
||||
AC_SUBST(JS_SHARED_LIBRARY)
|
||||
@ -9055,7 +8996,11 @@ if test "$MOZ_TREE_FREETYPE"; then
|
||||
export LDFLAGS="$LDFLAGS $MOZ_DEBUG_LDFLAGS"
|
||||
# Spaces in the *_CFLAGS and *_LIBS variables are intentionally placed
|
||||
# to force freetype to use our settings rather than autodetecting
|
||||
export LIBPNG_CFLAGS="$MOZ_PNG_CFLAGS "
|
||||
if test -n "$MOZ_NATIVE_PNG"; then
|
||||
export LIBPNG_CFLAGS="$MOZ_PNG_CFLAGS "
|
||||
else
|
||||
export LIBPNG_CFLAGS="-I$_objdir/dist/include"
|
||||
fi
|
||||
export LIBPNG_LIBS="$MOZ_PNG_LIBS "
|
||||
export ZLIB_CFLAGS="$MOZ_ZLIB_CFLAGS "
|
||||
export ZLIB_LIBS="$MOZ_ZLIB_LIBS "
|
||||
|
@ -217,7 +217,7 @@ MSVC_ENABLE_PGO = True
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
LOCAL_INCLUDES += [
|
||||
'/caps',
|
||||
'/content/html/content/src',
|
||||
|
@ -16,12 +16,14 @@ if CONFIG['OS_ARCH'] != 'Darwin':
|
||||
XPCSHELL_TESTS_MANIFESTS += ['unit_ipc/xpcshell.ini']
|
||||
|
||||
CPP_UNIT_TESTS += [
|
||||
'TestCSPParser.cpp',
|
||||
'TestGetURL.cpp',
|
||||
'TestNativeXMLHttpRequest.cpp',
|
||||
'TestPlainTextSerializer.cpp',
|
||||
'TestCSPParser',
|
||||
'TestGetURL',
|
||||
'TestNativeXMLHttpRequest',
|
||||
'TestPlainTextSerializer',
|
||||
]
|
||||
|
||||
SOURCES += sorted('%s.cpp' % t for t in CPP_UNIT_TESTS)
|
||||
|
||||
MOCHITEST_MANIFESTS += [
|
||||
'chrome/mochitest.ini',
|
||||
'mochitest.ini',
|
||||
@ -41,3 +43,8 @@ MOCHITEST_CHROME_MANIFESTS += [
|
||||
|
||||
BROWSER_CHROME_MANIFESTS += ['browser.ini']
|
||||
|
||||
USE_LIBS += [
|
||||
'mozalloc',
|
||||
'xpcomglue_s',
|
||||
'xul',
|
||||
]
|
||||
|
@ -5,12 +5,19 @@
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
CPP_UNIT_TESTS += [
|
||||
'TestWebGLElementArrayCache.cpp',
|
||||
'TestWebGLElementArrayCache',
|
||||
]
|
||||
|
||||
SOURCES += sorted('%s.cpp' % t for t in CPP_UNIT_TESTS)
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'../src',
|
||||
]
|
||||
|
||||
USE_LIBS += [
|
||||
'mozalloc',
|
||||
'xpcomglue_s',
|
||||
'xul',
|
||||
]
|
||||
|
@ -98,7 +98,7 @@ MSVC_ENABLE_PGO = True
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
LOCAL_INCLUDES += [
|
||||
'/content/base/src',
|
||||
'/content/html/content/src',
|
||||
|
@ -13,7 +13,6 @@
|
||||
#include "nsIDocument.h"
|
||||
#include "nsHTMLStyleSheet.h"
|
||||
#include "nsIEditor.h"
|
||||
#include "nsIMarkupDocumentViewer.h"
|
||||
#include "nsMappedAttributes.h"
|
||||
#include "nsRuleData.h"
|
||||
#include "nsIDocShell.h"
|
||||
|
@ -168,7 +168,7 @@ MSVC_ENABLE_PGO = True
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
LOCAL_INCLUDES += [
|
||||
'/content/base/src',
|
||||
'/content/canvas/src',
|
||||
|
@ -37,7 +37,6 @@
|
||||
#include "nsURILoader.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIMarkupDocumentViewer.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsIScrollableFrame.h"
|
||||
#include "nsContentUtils.h"
|
||||
@ -772,9 +771,8 @@ ImageDocument::ResetZoomLevel()
|
||||
|
||||
nsCOMPtr<nsIContentViewer> cv;
|
||||
docShell->GetContentViewer(getter_AddRefs(cv));
|
||||
nsCOMPtr<nsIMarkupDocumentViewer> mdv = do_QueryInterface(cv);
|
||||
if (mdv) {
|
||||
mdv->SetFullZoom(mOriginalZoomLevel);
|
||||
if (cv) {
|
||||
cv->SetFullZoom(mOriginalZoomLevel);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -787,9 +785,8 @@ ImageDocument::GetZoomLevel()
|
||||
if (docShell) {
|
||||
nsCOMPtr<nsIContentViewer> cv;
|
||||
docShell->GetContentViewer(getter_AddRefs(cv));
|
||||
nsCOMPtr<nsIMarkupDocumentViewer> mdv = do_QueryInterface(cv);
|
||||
if (mdv) {
|
||||
mdv->GetFullZoom(&zoomLevel);
|
||||
if (cv) {
|
||||
cv->GetFullZoom(&zoomLevel);
|
||||
}
|
||||
}
|
||||
return zoomLevel;
|
||||
|
@ -13,7 +13,6 @@
|
||||
#include "nsITextToSubURI.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIMarkupDocumentViewer.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsCharsetSource.h" // kCharsetFrom* macro definition
|
||||
#include "nsNodeInfoManager.h"
|
||||
|
@ -40,4 +40,4 @@ LOCAL_INCLUDES += [
|
||||
'/layout/style',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include "nsIURI.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIMarkupDocumentViewer.h"
|
||||
#include "mozilla/dom/NodeInfo.h"
|
||||
#include "nsToken.h"
|
||||
#include "nsIAppShell.h"
|
||||
|
@ -32,7 +32,6 @@
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIContentViewerContainer.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIMarkupDocumentViewer.h"
|
||||
#include "nsDocShell.h"
|
||||
#include "nsDocShellLoadTypes.h"
|
||||
#include "nsIWebNavigation.h"
|
||||
@ -289,17 +288,17 @@ nsHTMLDocument::CreateShell(nsPresContext* aContext,
|
||||
}
|
||||
|
||||
void
|
||||
nsHTMLDocument::TryHintCharset(nsIMarkupDocumentViewer* aMarkupDV,
|
||||
nsHTMLDocument::TryHintCharset(nsIContentViewer* aCv,
|
||||
int32_t& aCharsetSource, nsACString& aCharset)
|
||||
{
|
||||
if (aMarkupDV) {
|
||||
if (aCv) {
|
||||
int32_t requestCharsetSource;
|
||||
nsresult rv = aMarkupDV->GetHintCharacterSetSource(&requestCharsetSource);
|
||||
nsresult rv = aCv->GetHintCharacterSetSource(&requestCharsetSource);
|
||||
|
||||
if(NS_SUCCEEDED(rv) && kCharsetUninitialized != requestCharsetSource) {
|
||||
nsAutoCString requestCharset;
|
||||
rv = aMarkupDV->GetHintCharacterSet(requestCharset);
|
||||
aMarkupDV->SetHintCharacterSetSource((int32_t)(kCharsetUninitialized));
|
||||
rv = aCv->GetHintCharacterSet(requestCharset);
|
||||
aCv->SetHintCharacterSetSource((int32_t)(kCharsetUninitialized));
|
||||
|
||||
if(requestCharsetSource <= aCharsetSource)
|
||||
return;
|
||||
@ -317,7 +316,7 @@ nsHTMLDocument::TryHintCharset(nsIMarkupDocumentViewer* aMarkupDV,
|
||||
|
||||
|
||||
void
|
||||
nsHTMLDocument::TryUserForcedCharset(nsIMarkupDocumentViewer* aMarkupDV,
|
||||
nsHTMLDocument::TryUserForcedCharset(nsIContentViewer* aCv,
|
||||
nsIDocShell* aDocShell,
|
||||
int32_t& aCharsetSource,
|
||||
nsACString& aCharset)
|
||||
@ -333,9 +332,9 @@ nsHTMLDocument::TryUserForcedCharset(nsIMarkupDocumentViewer* aMarkupDV,
|
||||
}
|
||||
|
||||
nsAutoCString forceCharsetFromDocShell;
|
||||
if (aMarkupDV) {
|
||||
if (aCv) {
|
||||
// XXX mailnews-only
|
||||
rv = aMarkupDV->GetForceCharacterSet(forceCharsetFromDocShell);
|
||||
rv = aCv->GetForceCharacterSet(forceCharsetFromDocShell);
|
||||
}
|
||||
|
||||
if(NS_SUCCEEDED(rv) &&
|
||||
@ -648,15 +647,12 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIMarkupDocumentViewer> muCV;
|
||||
nsCOMPtr<nsIContentViewer> cv;
|
||||
if (docShell) {
|
||||
docShell->GetContentViewer(getter_AddRefs(cv));
|
||||
}
|
||||
if (cv) {
|
||||
muCV = do_QueryInterface(cv);
|
||||
} else {
|
||||
muCV = do_QueryInterface(parentContentViewer);
|
||||
if (!cv) {
|
||||
cv = parentContentViewer.forget();
|
||||
}
|
||||
|
||||
nsAutoCString urlSpec;
|
||||
@ -715,9 +711,9 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
|
||||
TryChannelCharset(aChannel, charsetSource, charset, executor);
|
||||
}
|
||||
|
||||
TryUserForcedCharset(muCV, docShell, charsetSource, charset);
|
||||
TryUserForcedCharset(cv, docShell, charsetSource, charset);
|
||||
|
||||
TryHintCharset(muCV, charsetSource, charset); // XXX mailnews-only
|
||||
TryHintCharset(cv, charsetSource, charset); // XXX mailnews-only
|
||||
TryParentCharset(docShell, charsetSource, charset);
|
||||
|
||||
if (cachingChan && !urlSpec.IsEmpty()) {
|
||||
|
@ -24,7 +24,6 @@
|
||||
class nsIEditor;
|
||||
class nsIParser;
|
||||
class nsIURI;
|
||||
class nsIMarkupDocumentViewer;
|
||||
class nsIDocShell;
|
||||
class nsICachingChannel;
|
||||
class nsIWyciwygChannel;
|
||||
@ -300,10 +299,10 @@ protected:
|
||||
|
||||
static uint32_t gWyciwygSessionCnt;
|
||||
|
||||
static void TryHintCharset(nsIMarkupDocumentViewer* aMarkupDV,
|
||||
static void TryHintCharset(nsIContentViewer* aContentViewer,
|
||||
int32_t& aCharsetSource,
|
||||
nsACString& aCharset);
|
||||
void TryUserForcedCharset(nsIMarkupDocumentViewer* aMarkupDV,
|
||||
void TryUserForcedCharset(nsIContentViewer* aCv,
|
||||
nsIDocShell* aDocShell,
|
||||
int32_t& aCharsetSource,
|
||||
nsACString& aCharset);
|
||||
|
@ -29,8 +29,7 @@ addLoadEvent(function() {
|
||||
.QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor)
|
||||
.getInterface(SpecialPowers.Ci.nsIWebNavigation)
|
||||
.QueryInterface(SpecialPowers.Ci.nsIDocShell)
|
||||
.contentViewer
|
||||
.QueryInterface(SpecialPowers.Ci.nsIMarkupDocumentViewer);
|
||||
.contentViewer;
|
||||
|
||||
viewer.fullZoom = 1.5;
|
||||
|
||||
|
@ -13,7 +13,7 @@ FAIL_ON_WARNINGS = True
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
LOCAL_INCLUDES += [
|
||||
'/content/base/src',
|
||||
]
|
||||
|
@ -24,4 +24,4 @@ LOCAL_INCLUDES += [
|
||||
'/content/html/content/src',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
@ -16,6 +16,6 @@ UNIFIED_SOURCES += [
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
LDFLAGS += ['-framework AudioToolbox']
|
||||
|
@ -5,12 +5,19 @@
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
CPP_UNIT_TESTS += [
|
||||
'TestAudioMixer.cpp',
|
||||
'TestAudioMixer',
|
||||
]
|
||||
|
||||
SOURCES += sorted('%s.cpp' % t for t in CPP_UNIT_TESTS)
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'..',
|
||||
]
|
||||
|
||||
USE_LIBS += [
|
||||
'mozalloc',
|
||||
'xpcomglue_s',
|
||||
'xul',
|
||||
]
|
||||
|
@ -37,7 +37,7 @@ if not CONFIG['MOZ_WEBRTC']:
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
LOCAL_INCLUDES += [
|
||||
'/media/webrtc/trunk/webrtc/modules/video_capture/windows',
|
||||
]
|
||||
|
@ -26,6 +26,6 @@ UNIFIED_SOURCES += [
|
||||
'MediaKeySession.cpp',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
@ -20,4 +20,4 @@ UNIFIED_SOURCES += [
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
@ -39,7 +39,7 @@ if CONFIG['MOZ_WEBM_ENCODER']:
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
# These includes are from Android JB, for use of MediaCodec.
|
||||
LOCAL_INCLUDES += ['/ipc/chromium/src']
|
||||
|
@ -15,6 +15,6 @@ LOCAL_INCLUDES += [
|
||||
'include',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
@ -15,6 +15,6 @@ LOCAL_INCLUDES += [
|
||||
'include',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
@ -16,6 +16,6 @@ LOCAL_INCLUDES += [
|
||||
]
|
||||
CXXFLAGS += [ '-Wno-deprecated-declarations' ]
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
@ -40,6 +40,6 @@ if CONFIG['MOZ_FFMPEG']:
|
||||
'ffmpeg',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
@ -19,6 +19,6 @@ UNIFIED_SOURCES += [
|
||||
'WMFVideoMFTManager.cpp',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "mozIGeckoMediaPluginService.h"
|
||||
#include "mozilla/unused.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "mtransport/runnable_utils.h"
|
||||
#include "runnable_utils.h"
|
||||
|
||||
#include "mozilla/dom/CrashReporterParent.h"
|
||||
using mozilla::dom::CrashReporterParent;
|
||||
@ -321,7 +321,6 @@ GMPParent::GetCrashID(nsString& aResult)
|
||||
GetIDFromMinidump(dumpFile, aResult);
|
||||
cr->GenerateCrashReportForMinidump(dumpFile, ¬es);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
GMPNotifyObservers(nsAString& aData)
|
||||
@ -332,6 +331,7 @@ GMPNotifyObservers(nsAString& aData)
|
||||
obs->NotifyObservers(nullptr, "gmp-plugin-crash", temp.get());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
GMPParent::ActorDestroy(ActorDestroyReason aWhy)
|
||||
|
@ -74,8 +74,6 @@ IPDL_SOURCES += [
|
||||
'PGMPVideoEncoder.ipdl',
|
||||
]
|
||||
|
||||
LIBRARY_NAME = 'mozgmp'
|
||||
|
||||
if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
|
||||
NO_VISIBILITY_FLAGS = True
|
||||
|
||||
@ -87,8 +85,10 @@ FAIL_ON_WARNINGS = True
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
# media/mtransport so we work with --disable-webrtc
|
||||
LOCAL_INCLUDES += [
|
||||
'../base',
|
||||
'/media/mtransport',
|
||||
'/xpcom/base',
|
||||
'/xpcom/build',
|
||||
'/xpcom/threads',
|
||||
|
@ -30,7 +30,7 @@ else:
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
LOCAL_INCLUDES += [
|
||||
'/content/base/src',
|
||||
'/content/html/content/src',
|
||||
|
@ -4,8 +4,6 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
LIBRARY_NAME = 'media_gtest'
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'TestAudioCompactor.cpp',
|
||||
'TestTrackEncoder.cpp',
|
||||
|
@ -28,4 +28,4 @@ UNIFIED_SOURCES += [
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
@ -190,7 +190,7 @@ MSVC_ENABLE_PGO = True
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
LOCAL_INCLUDES += [
|
||||
'/content/base/src',
|
||||
'/layout/generic',
|
||||
|
@ -22,4 +22,4 @@ UNIFIED_SOURCES += [
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
@ -35,4 +35,4 @@ CXXFLAGS += [
|
||||
]
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
@ -48,7 +48,7 @@ if 'rtsp' in CONFIG['NECKO_PROTOCOLS']:
|
||||
'RtspOmxReader.cpp',
|
||||
]
|
||||
|
||||
if int(CONFIG['ANDROID_VERSION']) >= 16:
|
||||
if CONFIG['ANDROID_VERSION'] >= '16':
|
||||
EXPORTS += [
|
||||
'I420ColorConverterHelper.h',
|
||||
'MediaCodecDecoder.h',
|
||||
@ -64,7 +64,7 @@ if int(CONFIG['ANDROID_VERSION']) >= 16:
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
LOCAL_INCLUDES += [
|
||||
'/content/base/src',
|
||||
'/content/html/content/src',
|
||||
|
@ -22,4 +22,4 @@ LOCAL_INCLUDES += [
|
||||
'/content/html/content/src',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
@ -16,4 +16,4 @@ UNIFIED_SOURCES += [
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
@ -26,7 +26,7 @@ UNIFIED_SOURCES += [
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
LOCAL_INCLUDES += [
|
||||
'/content/media/webaudio',
|
||||
]
|
||||
|
@ -5,12 +5,19 @@
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
CPP_UNIT_TESTS += [
|
||||
'TestAudioEventTimeline.cpp',
|
||||
'TestAudioEventTimeline',
|
||||
]
|
||||
|
||||
SOURCES += sorted('%s.cpp' % t for t in CPP_UNIT_TESTS)
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'..',
|
||||
]
|
||||
|
||||
USE_LIBS += [
|
||||
'mozalloc',
|
||||
'xpcomglue_s',
|
||||
'xul',
|
||||
]
|
||||
|
@ -85,4 +85,4 @@ FAIL_ON_WARNINGS = True
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
@ -3,6 +3,7 @@
|
||||
<head>
|
||||
<title>Test the support of cycles.</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="webaudio.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
@ -12,42 +13,29 @@
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
const sampleRate = 48000;
|
||||
const inputLength = 2048;
|
||||
|
||||
addLoadEvent(function() {
|
||||
function getSineBuffer(ctx) {
|
||||
var buffer = ctx.createBuffer(1, 2048, ctx.sampleRate);
|
||||
var b = buffer.getChannelData(0);
|
||||
for (var i = 0; i < 2048; i++) {
|
||||
b[i] = Math.sin(440 * 2 * Math.PI * i / ctx.sampleRate);
|
||||
function addSine(b) {
|
||||
for (var i = 0; i < b.length; i++) {
|
||||
b[i] += Math.sin(440 * 2 * Math.PI * i / sampleRate);
|
||||
}
|
||||
}
|
||||
|
||||
function getSineBuffer(ctx) {
|
||||
var buffer = ctx.createBuffer(1, inputLength, ctx.sampleRate);
|
||||
addSine(buffer.getChannelData(0));
|
||||
return buffer;
|
||||
}
|
||||
|
||||
function createAndPlayWithCycleAndDelayNode(ctx) {
|
||||
function createAndPlayWithCycleAndDelayNode(ctx, delayFrames) {
|
||||
var source = ctx.createBufferSource();
|
||||
source.loop = true;
|
||||
source.buffer = getSineBuffer(ctx);
|
||||
|
||||
var gain = ctx.createGain();
|
||||
var delay = ctx.createDelay();
|
||||
delay.delayTime = 0.5;
|
||||
|
||||
source.connect(gain);
|
||||
gain.connect(delay);
|
||||
delay.connect(ctx.destination);
|
||||
// cycle
|
||||
delay.connect(gain);
|
||||
|
||||
source.start(0);
|
||||
}
|
||||
|
||||
function createAndPlayWithCycleAndDelayNodeButNullDelayTime(ctx) {
|
||||
var source = ctx.createBufferSource();
|
||||
source.loop = true;
|
||||
source.buffer = getSineBuffer(ctx);
|
||||
|
||||
var gain = ctx.createGain();
|
||||
var delay = ctx.createDelay();
|
||||
delay.delayTime = 0.0;
|
||||
delay.delayTime.value = delayFrames/ctx.sampleRate;
|
||||
|
||||
source.connect(gain);
|
||||
gain.connect(delay);
|
||||
@ -103,7 +91,7 @@ addLoadEvent(function() {
|
||||
}
|
||||
|
||||
function getOfflineContext(oncomplete) {
|
||||
var ctx = new OfflineAudioContext(1, 48000, 48000);
|
||||
var ctx = new OfflineAudioContext(1, sampleRate, sampleRate);
|
||||
ctx.oncomplete = oncomplete;
|
||||
return ctx;
|
||||
}
|
||||
@ -121,18 +109,16 @@ addLoadEvent(function() {
|
||||
finish();
|
||||
}
|
||||
|
||||
function checkNoisyBuffer(e) {
|
||||
var buffer = e.renderedBuffer.getChannelData(0);
|
||||
for (var i = 0; i < buffer.length; i++) {
|
||||
if (buffer[i] != 0.0) {
|
||||
ok(true, "buffer should be noisy.");
|
||||
finish();
|
||||
return true;
|
||||
}
|
||||
function checkNoisyBuffer(e, aDelayFrames) {
|
||||
delayFrames = Math.max(128, aDelayFrames);
|
||||
|
||||
var expected = new Float32Array(e.renderedBuffer.length);
|
||||
for (var i = delayFrames; i < expected.length; i += delayFrames) {
|
||||
addSine(expected.subarray(i, i + inputLength));
|
||||
}
|
||||
ok(false, "buffer should be noisy.");
|
||||
|
||||
compareChannels(e.renderedBuffer.getChannelData(0), expected);
|
||||
finish();
|
||||
return false;
|
||||
}
|
||||
|
||||
function expectSilentOutput(f) {
|
||||
@ -142,10 +128,11 @@ addLoadEvent(function() {
|
||||
ctx.startRendering();
|
||||
}
|
||||
|
||||
function expectNoisyOutput(f) {
|
||||
function expectNoisyOutput(delayFrames) {
|
||||
remainingTests++;
|
||||
var ctx = getOfflineContext(checkNoisyBuffer);
|
||||
f(ctx);
|
||||
var ctx = getOfflineContext();
|
||||
ctx.oncomplete = function(e) { checkNoisyBuffer(e, delayFrames); };
|
||||
createAndPlayWithCycleAndDelayNode(ctx, delayFrames);
|
||||
ctx.startRendering();
|
||||
}
|
||||
|
||||
@ -158,10 +145,10 @@ addLoadEvent(function() {
|
||||
expectSilentOutput(createAndPlayWithCycleAndNoDelayNodeInCycle);
|
||||
// Those are making legal graphs, with at least one DelayNode in the cycle.
|
||||
// There should be some non-silent output.
|
||||
expectNoisyOutput(createAndPlayWithCycleAndDelayNode);
|
||||
expectNoisyOutput(sampleRate/4);
|
||||
// DelayNode.delayTime will be clamped to 128/ctx.sampleRate.
|
||||
// There should be some non-silent output.
|
||||
expectNoisyOutput(createAndPlayWithCycleAndDelayNodeButNullDelayTime);
|
||||
expectNoisyOutput(0);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
@ -23,4 +23,4 @@ if CONFIG['MOZ_WEBM_ENCODER']:
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
@ -54,7 +54,7 @@ EXPORTS.mozilla += [
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
if CONFIG['OS_ARCH'] == 'WINNT':
|
||||
DEFINES['NOMINMAX'] = True
|
||||
|
||||
|
@ -42,4 +42,4 @@ LOCAL_INCLUDES += [
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
@ -46,7 +46,7 @@ FAIL_ON_WARNINGS = True
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
LOCAL_INCLUDES += [
|
||||
'ipc',
|
||||
]
|
||||
|
@ -11,4 +11,4 @@ UNIFIED_SOURCES += [
|
||||
FAIL_ON_WARNINGS = True
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
@ -26,4 +26,4 @@ SOURCES += [
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
@ -251,7 +251,7 @@ FAIL_ON_WARNINGS = True
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
LOCAL_INCLUDES += [
|
||||
'/content/base/src',
|
||||
'/content/html/content/src',
|
||||
|
@ -22,4 +22,4 @@ LOCAL_INCLUDES += [
|
||||
'/layout/style',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
@ -22,7 +22,7 @@ FAIL_ON_WARNINGS = True
|
||||
|
||||
MSVC_ENABLE_PGO = True
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
LOCAL_INCLUDES += [
|
||||
'/content/base/src',
|
||||
]
|
||||
|
@ -13,7 +13,6 @@
|
||||
#include "nsIContentViewerContainer.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIMarkupDocumentViewer.h"
|
||||
#include "nsHTMLParts.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIDOMElement.h"
|
||||
|
@ -28,4 +28,4 @@ LOCAL_INCLUDES += [
|
||||
'/layout/style',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
@ -28,4 +28,4 @@ LOCAL_INCLUDES += [
|
||||
'/layout/xul',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
@ -35,4 +35,4 @@ LOCAL_INCLUDES += [
|
||||
'/layout/xul',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user