Bug 1041941 - Use templates for programs, simple programs, libraries and C++ unit tests. r=gps

This commit is contained in:
Mike Hommey 2014-09-03 14:10:54 +09:00
Родитель 0ab8d06eec
Коммит ed70c5f377
187 изменённых файлов: 468 добавлений и 295 удалений

Просмотреть файл

@ -4,7 +4,7 @@
# 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 = 'IA2Marshal'
Library('IA2Marshal')
FORCE_SHARED_LIB = True

Просмотреть файл

@ -4,7 +4,7 @@
# 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 = 'AccessibleMarshal'
Library('AccessibleMarshal')
GENERATED_SOURCES += [
'dlldata.c',

Просмотреть файл

@ -6,9 +6,9 @@
if not CONFIG['LIBXUL_SDK']:
if CONFIG['GAIADIR']:
PROGRAM = CONFIG['MOZ_APP_NAME'] + "-bin"
Program(CONFIG['MOZ_APP_NAME'] + "-bin")
else:
PROGRAM = CONFIG['MOZ_APP_NAME']
Program(CONFIG['MOZ_APP_NAME'])
if CONFIG['MOZ_B2G_LOADER']:
SOURCES += [
'B2GLoader.cpp',

Просмотреть файл

@ -4,7 +4,7 @@
# 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/.
PROGRAM = CONFIG['MOZ_APP_NAME']
Program(CONFIG['MOZ_APP_NAME'])
if CONFIG['OS_ARCH'] == 'WINNT':
SOURCES += [

Просмотреть файл

@ -6,7 +6,7 @@
DIRS += ['profile/extensions']
PROGRAM = CONFIG['MOZ_APP_NAME']
Program(CONFIG['MOZ_APP_NAME'])
SOURCES += [
'nsBrowserApp.cpp',

Просмотреть файл

@ -4,7 +4,7 @@
# 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/.
PROGRAM = 'CommandExecuteHandler'
Program('CommandExecuteHandler')
SOURCES += [
'CEHHelper.cpp',

Просмотреть файл

@ -4,7 +4,7 @@
# 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/.
PROGRAM = 'linktool'
Program('linktool')
SOURCES += [
'linktool.cpp',

Просмотреть файл

@ -4,7 +4,7 @@
# 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/.
PROGRAM = 'metrotestharness'
Program('metrotestharness')
SOURCES += [
'metrotestharness.cpp',

Просмотреть файл

@ -39,20 +39,20 @@ 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.
just needs to define a library name with the ``Library`` template.
LIBRARY_NAME = 'foo'
Library('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
``Library`` names 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
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):
@ -61,7 +61,7 @@ or absolute):
'../relative/baz',
]
Note that the leaf name in those paths is the ``LIBRARY_NAME``, not an actual
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
@ -84,10 +84,10 @@ 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
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``
As a special rule, those intermediate libraries don't need a ``Library`` name
for themselves.
@ -103,7 +103,7 @@ the ``FORCE_SHARED_LIB`` boolean variable:
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
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
@ -115,7 +115,7 @@ 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``.
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.
@ -129,23 +129,24 @@ Executables
===========
Executables, a.k.a. programs, are, in the simplest form, defined with the
``PROGRAM`` variable.
``Program`` template.
PROGRAM = 'foobar'
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``.
libraries to the executable with ``USE_LIBS``, listing various ``Library``
names.
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:
directory, in which case we can use the ``SimplePrograms`` template
SIMPLE_PROGRAMS = [
SimplePrograms([
'FirstProgram',
'SecondProgram',
]
])
The corresponding ``SOURCES`` must match:
@ -154,8 +155,8 @@ The corresponding ``SOURCES`` must match:
'SecondProgram.c',
]
Similar to ``SIMPLE_PROGRAMS``, is ``CPP_UNIT_TESTS``, which defines, with the
same rules, C++ unit tests programs.
Similar to ``SimplePrograms``, is the ``CppUnitTests`` template, which defines,
with the same rules, C++ unit tests programs.
Linking with system libraries
@ -189,10 +190,10 @@ Libraries from third party build system
=======================================
Some libraries in the tree are not built by the moz.build-governed build
system, and there is no ``LIBRARY_NAME`` corresponding to them.
system, and there is no ``Library`` corresponding to them.
However, ``USE_LIBS`` allows to reference such libraries by giving a full
path (like when disambiguating identical ``LIBRARY_NAME``). The same naming
path (like when disambiguating identical ``Library`` names). The same naming
rules apply as other uses of ``USE_LIBS``, so only the library name without
prefix and suffix shall be given.
@ -217,12 +218,12 @@ When both types of libraries are required, one needs to set both
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``.
than the name given to the ``Library`` template.
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'
Library('foo')
STATIC_LIBRARY_NAME = 'foo_s'
With the above, on Windows, ``foo_s.lib`` will be the static library,
@ -231,25 +232,25 @@ With the above, on Windows, ``foo_s.lib`` will be the static library,
In some cases, for convenience, it is possible to set both
``STATIC_LIBRARY_NAME`` and ``SHARED_LIBRARY_NAME``. For example:
LIBRARY_NAME = 'mylib'
Library('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
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``
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'
Library('mylib')
FORCE_SHARED_LIB = True
FORCE_STATIC_LIB = True
STATIC_LIBRARY_NAME = 'mylib_s'
b/moz.build:
PROGRAM = 'myprog'
Program('myprog')
USE_LIBS += [
'static:mylib',
]
@ -262,18 +263,18 @@ 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
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.
instead of the ``Library`` name. This only impacts ELF systems.
a/moz.build:
LIBRARY_NAME = 'mylib'
Library('mylib')
b/moz.build:
LIBRARY_NAME = 'otherlib'
Library('otherlib')
SONAME = 'foo'
c/moz.build:
PROGRAM = 'myprog'
Program('myprog')
USE_LIBS += [
'mylib',
'otherlib',

Просмотреть файл

@ -4,7 +4,7 @@
# 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 = 'stlport_static'
Library('stlport_static')
FORCE_STATIC_LIB = True

Просмотреть файл

@ -4,6 +4,57 @@
# 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/.
@template
def Program(name):
'''Template for program executables.'''
PROGRAM = name
@template
def SimplePrograms(names):
'''Template for simple program executables.
Those have a single source with the same base name as the executable.
'''
SIMPLE_PROGRAMS += names
@template
def CppUnitTests(names):
'''Template for C++ unit tests.
Those have a single source with the same base name as the executable.
'''
CPP_UNIT_TESTS += names
@template
def Library(name):
'''Template for libraries.'''
LIBRARY_NAME = name
@template
def HostProgram(name):
'''Template for build tools executables.'''
HOST_PROGRAM = name
@template
def HostSimplePrograms(names):
'''Template for simple build tools executables.
Those have a single source with the same base name as the executable.
'''
HOST_SIMPLE_PROGRAMS += names
@template
def HostLibrary(name):
'''Template for build tools libraries.'''
HOST_LIBRARY_NAME = name
@template
def GeckoBinary():
'''Template for binaries using Gecko.

Просмотреть файл

@ -19,7 +19,7 @@ HOST_SOURCES += [
'elfhack.cpp',
]
HOST_PROGRAM = 'elfhack'
HostProgram('elfhack')
DEFINES['ELFHACK_BUILD'] = True

Просмотреть файл

@ -5,11 +5,11 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
if CONFIG['MOZ_LIBSTDCXX_TARGET_VERSION']:
LIBRARY_NAME = 'stdc++compat'
Library('stdc++compat')
SOURCES += ['stdc++compat.cpp']
if CONFIG['MOZ_LIBSTDCXX_HOST_VERSION']:
HOST_LIBRARY_NAME = 'host_stdc++compat'
HostLibrary('host_stdc++compat')
HOST_SOURCES += [
'stdc++compat.cpp',
]

Просмотреть файл

@ -8,7 +8,7 @@ SOURCES += [
'crashinjectdll.cpp',
]
LIBRARY_NAME = 'crashinjectdll'
Library('crashinjectdll')
FORCE_SHARED_LIB = True

Просмотреть файл

@ -10,7 +10,7 @@ if CONFIG['_MSC_VER'] and CONFIG['OS_TEST'] != 'x86_64':
TEST_DIRS += ['crashinjectdll']
if CONFIG['ENABLE_TESTS']:
PROGRAM = 'crashinject'
Program('crashinject')
SOURCES += [
'crashinject.cpp',
]

Просмотреть файл

@ -8,7 +8,7 @@ SOURCES += [
'vmwarerecordinghelper.cpp',
]
LIBRARY_NAME = 'vmwarerecordinghelper'
Library('vmwarerecordinghelper')
FORCE_SHARED_LIB = True

2
config/external/ffi/moz.build поставляемый
Просмотреть файл

@ -4,7 +4,7 @@
# 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 = 'ffi'
Library('ffi')
if CONFIG['MOZ_NATIVE_FFI']:
OS_LIBS += CONFIG['MOZ_FFI_LIBS']

2
config/external/freetype2/moz.build поставляемый
Просмотреть файл

@ -4,7 +4,7 @@
# 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 = 'freetype'
Library('freetype')
if CONFIG['MOZ_TREE_FREETYPE']:
USE_LIBS += [

2
config/external/icu/moz.build поставляемый
Просмотреть файл

@ -4,7 +4,7 @@
# 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 = 'icu'
Library('icu')
if CONFIG['MOZ_NATIVE_ICU']:
OS_LIBS += CONFIG['MOZ_ICU_LIBS']

2
config/external/nspr/moz.build поставляемый
Просмотреть файл

@ -4,7 +4,7 @@
# 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 = 'nspr'
Library('nspr')
if CONFIG['MOZ_FOLD_LIBS']:
# When folding libraries, nspr is actually in the nss library.

2
config/external/nss/crmf/moz.build поставляемый
Просмотреть файл

@ -4,7 +4,7 @@
# 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 = 'crmf'
Library('crmf')
if CONFIG['MOZ_NATIVE_NSS']:
OS_LIBS += [l for l in CONFIG['NSS_LIBS'] if l.startswith('-L')]

2
config/external/nss/moz.build поставляемый
Просмотреть файл

@ -4,7 +4,7 @@
# 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 = 'nss'
Library('nss')
DIRS += ['crmf']

2
config/external/sqlite/moz.build поставляемый
Просмотреть файл

@ -4,7 +4,7 @@
# 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 = 'sqlite'
Library('sqlite')
if CONFIG['MOZ_NATIVE_SQLITE']:
OS_LIBS += CONFIG['SQLITE_LIBS']

2
config/external/zlib/moz.build поставляемый
Просмотреть файл

@ -4,7 +4,7 @@
# 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 = 'zlib'
Library('zlib')
if CONFIG['MOZ_NATIVE_ZLIB']:
OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']

Просмотреть файл

@ -21,7 +21,7 @@ if CONFIG['HOST_OS_ARCH'] != 'WINNT':
'nsinstall.c',
'pathsub.c',
]
HOST_PROGRAM = 'nsinstall_real'
HostProgram('nsinstall_real')
if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
DEFINES['GKMEDIAS_SHARED_LIBRARY'] = True

Просмотреть файл

@ -10,12 +10,12 @@ XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
if CONFIG['OS_ARCH'] != 'Darwin':
XPCSHELL_TESTS_MANIFESTS += ['unit_ipc/xpcshell.ini']
CPP_UNIT_TESTS += [
CppUnitTests([
'TestCSPParser',
'TestGetURL',
'TestNativeXMLHttpRequest',
'TestPlainTextSerializer',
]
])
SOURCES += sorted('%s.cpp' % t for t in CPP_UNIT_TESTS)

Просмотреть файл

@ -4,10 +4,10 @@
# 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/.
CPP_UNIT_TESTS += [
CppUnitTests([
'TestAudioBuffers',
'TestAudioMixer'
]
])
SOURCES += sorted('%s.cpp' % t for t in CPP_UNIT_TESTS)

Просмотреть файл

@ -4,9 +4,9 @@
# 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/.
CPP_UNIT_TESTS += [
CppUnitTests([
'TestAudioEventTimeline',
]
])
SOURCES += sorted('%s.cpp' % t for t in CPP_UNIT_TESTS)

Просмотреть файл

@ -4,9 +4,9 @@
# 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/.
CPP_UNIT_TESTS += [
CppUnitTests([
'TestAudioChannelService',
]
])
SOURCES += sorted('%s.cpp' % t for t in CPP_UNIT_TESTS)

Просмотреть файл

@ -12,7 +12,7 @@ DEFINES.update({
# Do NOT export this library. We don't actually want our test code
# being added to libxul or anything.
LIBRARY_NAME = 'dombindings_test_s'
Library('dombindings_test_s')
EXTRA_COMPONENTS += [
'TestInterfaceJS.js',

Просмотреть файл

@ -4,9 +4,9 @@
# 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/.
CPP_UNIT_TESTS += [
CppUnitTests([
'TestWebGLElementArrayCache',
]
])
SOURCES += sorted('%s.cpp' % t for t in CPP_UNIT_TESTS)

Просмотреть файл

@ -9,7 +9,7 @@ SOURCES += [
'gmp-fake.cpp'
]
LIBRARY_NAME = "fake"
Library("fake")
USE_STATIC_LIBS = True
FORCE_SHARED_LIB = True

Просмотреть файл

@ -6,7 +6,7 @@
FAIL_ON_WARNINGS = True
PROGRAM = 'plugin-hang-ui'
Program('plugin-hang-ui')
UNIFIED_SOURCES += [
'MiniShmChild.cpp',

Просмотреть файл

@ -4,7 +4,7 @@
# 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 = 'plugin_child_interpose'
Library('plugin_child_interpose')
UNIFIED_SOURCES += [ "%s.mm" % (LIBRARY_NAME) ]

Просмотреть файл

@ -4,7 +4,7 @@
# 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 = 'nptestjava'
Library('nptestjava')
relative_path = '..'
include('../testplugin.mozbuild')

Просмотреть файл

@ -6,7 +6,7 @@
DIRS += ['secondplugin', 'javaplugin']
LIBRARY_NAME = 'nptest'
Library('nptest')
FAIL_ON_WARNINGS = not CONFIG['_MSC_VER']

Просмотреть файл

@ -4,7 +4,7 @@
# 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 = 'npsecondtest'
Library('npsecondtest')
relative_path = '..'
include('../testplugin.mozbuild')

Просмотреть файл

@ -4,9 +4,9 @@
# 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/.
CPP_UNIT_TESTS += [
CppUnitTests([
'TestTXMgr',
]
])
SOURCES += sorted('%s.cpp' % t for t in CPP_UNIT_TESTS)

Просмотреть файл

@ -4,7 +4,7 @@
# 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/.
PROGRAM = 'winEmbed'
Program('winEmbed')
SOURCES += [
'WebBrowserChrome.cpp',

Просмотреть файл

@ -54,7 +54,7 @@ DISABLE_STL_WRAPPING = True
LOCAL_INCLUDES += [ '../../include', '../../src' ]
USE_LIBS += [ 'libGLESv2' ]
LIBRARY_NAME = 'libEGL'
Library('libEGL')
FORCE_SHARED_LIB = True
RCFILE = SRCDIR + '/libEGL.rc'

Просмотреть файл

@ -204,7 +204,7 @@ else:
'\'%s/lib/%s/dxguid.lib\'' % (CONFIG['MOZ_DIRECTX_SDK_PATH'], CONFIG['MOZ_D3D_CPU_SUFFIX']),
]
LIBRARY_NAME = 'libGLESv2'
Library('libGLESv2')
FORCE_SHARED_LIB = True
RCFILE = SRCDIR + '/libGLESv2.rc'

Просмотреть файл

@ -4,9 +4,9 @@
# 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/.
CPP_UNIT_TESTS += [
CppUnitTests([
'TestLineBreak',
]
])
SOURCES += sorted('%s.cpp' % t for t in CPP_UNIT_TESTS)

Просмотреть файл

@ -4,9 +4,9 @@
# 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/.
SIMPLE_PROGRAMS += [
SimplePrograms([
'umaptable',
]
])
SOURCES += [
'%s.c' % s for s in SIMPLE_PROGRAMS

Просмотреть файл

@ -11,9 +11,9 @@ SOURCES += [
'UnicharSelfTest.cpp',
]
SIMPLE_PROGRAMS += [
SimplePrograms([
"%s" % (fyl[0:-4]) for fyl in SOURCES
]
])
USE_STATIC_LIBS = True

Просмотреть файл

@ -4,7 +4,7 @@
# 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/.
PROGRAM = 'ucgendat'
Program('ucgendat')
SOURCES += [
'ucgendat.c',

Просмотреть файл

@ -21,7 +21,7 @@ include('objs.mozbuild')
UNIFIED_SOURCES += intl_unicharutil_util_cppsrcs
LIBRARY_NAME = 'unicharutil_external_s'
Library('unicharutil_external_s')
FORCE_STATIC_LIB = True

Просмотреть файл

@ -4,7 +4,7 @@
# 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/.
PROGRAM = CONFIG['MOZ_CHILD_PROCESS_NAME']
Program(CONFIG['MOZ_CHILD_PROCESS_NAME'])
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
SOURCES += [

Просмотреть файл

@ -4,7 +4,7 @@
# 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 = 'plugin-container'
Library('plugin-container')
if CONFIG['MOZ_B2G_LOADER']:
FINAL_LIBRARY = 'xul'

Просмотреть файл

@ -4,7 +4,7 @@
# 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/.
PROGRAM = 'ipdlunittest'
Program('ipdlunittest')
SOURCES += [
'TestIPDL.cpp',

Просмотреть файл

@ -4,7 +4,7 @@
# 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 = 'editline'
Library('editline')
UNIFIED_SOURCES += [
'editline.c',

Просмотреть файл

@ -4,7 +4,7 @@
# 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/.
PROGRAM = 'gdb-tests'
Program('gdb-tests')
UNIFIED_SOURCES += [
'gdb-tests.cpp',

Просмотреть файл

@ -4,7 +4,7 @@
# 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/.
PROGRAM = 'jsapi-tests'
Program('jsapi-tests')
UNIFIED_SOURCES += [
'selfTest.cpp',

Просмотреть файл

@ -427,9 +427,9 @@ HOST_SOURCES += [
'jskwgen.cpp',
]
HOST_SIMPLE_PROGRAMS += [
HostSimplePrograms([
'host_%s' % f.replace('.cpp', '') for f in HOST_SOURCES
]
])
# JavaScript must be built shared, even for static builds, as it is used by
# other modules which are always built shared. Failure to do so results in
@ -439,7 +439,7 @@ HOST_SIMPLE_PROGRAMS += [
# In fact, we now build both a static and a shared library, as the
# JS shell would like to link to the static library.
LIBRARY_NAME = 'js'
Library('js')
if CONFIG['JS_SHARED_LIBRARY']:
FORCE_SHARED_LIB = True

Просмотреть файл

@ -5,7 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
if CONFIG['JS_SHELL_NAME']:
PROGRAM = CONFIG['JS_SHELL_NAME']
Program(CONFIG['JS_SHELL_NAME'])
if CONFIG['JS_BUNDLED_EDITLINE']:
USE_LIBS += ['editline']
USE_LIBS += ['static:js']

Просмотреть файл

@ -6,7 +6,7 @@
FAIL_ON_WARNINGS = True
PROGRAM = 'xpcshell'
Program('xpcshell')
SOURCES += [
'xpcshell.cpp',

Просмотреть файл

@ -4,7 +4,7 @@
# 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 = 'gkmedias'
Library('gkmedias')
if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
FORCE_SHARED_LIB = True

Просмотреть файл

@ -4,5 +4,5 @@
# 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 = 'webrtc'
Library('webrtc')
FINAL_LIBRARY = 'xul'

Просмотреть файл

@ -8,9 +8,9 @@ HOST_SOURCES += [
'ListCSSProperties.cpp',
]
HOST_SIMPLE_PROGRAMS += [
HostSimplePrograms([
'host_%s' % f.replace('.cpp', '') for f in HOST_SOURCES
]
])
MOCHITEST_MANIFESTS += [
'chrome/mochitest.ini',

Просмотреть файл

@ -4,7 +4,7 @@
# 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 = 'cubeb'
Library('cubeb')
SOURCES += [
'cubeb.c',

Просмотреть файл

@ -4,16 +4,16 @@
# 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/.
CPP_UNIT_TESTS += [
CppUnitTests([
'test_tone'
]
])
if CONFIG['OS_TARGET'] != 'Android':
CPP_UNIT_TESTS += [
CppUnitTests([
'test_audio',
'test_latency',
'test_sanity'
]
])
SOURCES += sorted('%s.cpp' % t for t in CPP_UNIT_TESTS)

Просмотреть файл

@ -38,7 +38,7 @@ if CONFIG['MOZ_PNG_ARM_NEON']:
'arm/filter_neon.S'
]
LIBRARY_NAME = 'mozpng'
Library('mozpng')
MSVC_ENABLE_PGO = True

Просмотреть файл

@ -4,7 +4,7 @@
# 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 = 'speex'
Library('speex')
EXPORTS.speex += [
'speex_resampler.h',

Просмотреть файл

@ -13,7 +13,7 @@ if CONFIG['VPX_NEED_OBJ_INT_EXTRACT']:
'build/make/obj_int_extract.c',
]
HOST_PROGRAM = 'host_obj_int_extract'
HostProgram('host_obj_int_extract')
# Unify fewer files together to reduce the chance of name collision
FILES_PER_UNIFIED_FILE = 8

Просмотреть файл

@ -9,7 +9,7 @@ include('../objs.mozbuild')
# These files cannot be built in unified mode because they force NSPR logging.
SOURCES += mtransport_cppsrcs
LIBRARY_NAME = 'mtransport_s'
Library('mtransport_s')
LOCAL_INCLUDES += [
'/media/mtransport/',

Просмотреть файл

@ -5,7 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
if CONFIG['OS_TARGET'] != 'WINNT' and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
CPP_UNIT_TESTS += [
CppUnitTests([
'buffered_stun_socket_unittest',
'ice_unittest',
'nrappkit_unittest',
@ -16,12 +16,12 @@ if CONFIG['OS_TARGET'] != 'WINNT' and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
'TestSyncRunnable',
'transport_unittests',
'turn_unittest',
]
])
if CONFIG['MOZ_SCTP']:
CPP_UNIT_TESTS += [
CppUnitTests([
'sctp_unittest',
]
])
SOURCES += sorted('%s.cpp' % t for t in CPP_UNIT_TESTS)

Просмотреть файл

@ -8,7 +8,7 @@ SOURCES += [
'OmxPluginFroyo.cpp',
]
LIBRARY_NAME = 'omxpluginfroyo'
Library('omxpluginfroyo')
FORCE_SHARED_LIB = True

Просмотреть файл

@ -8,7 +8,7 @@ SOURCES += [
'OmxPlugin236.cpp',
]
LIBRARY_NAME = 'omxplugingb'
Library('omxplugingb')
FORCE_SHARED_LIB = True

Просмотреть файл

@ -8,7 +8,7 @@ SOURCES += [
'OmxPlugin235.cpp',
]
LIBRARY_NAME = 'omxplugingb235'
Library('omxplugingb235')
FORCE_SHARED_LIB = True

Просмотреть файл

@ -8,7 +8,7 @@ SOURCES += [
'OmxPluginHoneycomb.cpp',
]
LIBRARY_NAME = 'omxpluginhc'
Library('omxpluginhc')
FORCE_SHARED_LIB = True

Просмотреть файл

@ -8,7 +8,7 @@ SOURCES += [
'OmxPluginKitKat.cpp',
]
LIBRARY_NAME = 'omxpluginkk'
Library('omxpluginkk')
FORCE_SHARED_LIB = True

Просмотреть файл

@ -10,7 +10,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
'libstagefright.cpp',
]
LIBRARY_NAME = 'stagefright'
Library('stagefright')
FORCE_SHARED_LIB = True

Просмотреть файл

@ -10,7 +10,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
'libstagefright.cpp',
]
LIBRARY_NAME = 'stagefright'
Library('stagefright')
FORCE_SHARED_LIB = True

Просмотреть файл

@ -10,7 +10,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
'libstagefright_color_conversion.cpp',
]
LIBRARY_NAME = 'stagefright_color_conversion'
Library('stagefright_color_conversion')
FORCE_SHARED_LIB = True

Просмотреть файл

@ -10,7 +10,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
'libutils.cpp',
]
LIBRARY_NAME = 'utils'
Library('utils')
FORCE_SHARED_LIB = True

Просмотреть файл

@ -10,7 +10,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
'libstagefright.cpp',
]
LIBRARY_NAME = 'stagefright'
Library('stagefright')
FORCE_SHARED_LIB = True

Просмотреть файл

@ -10,7 +10,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
'libstagefright.cpp',
]
LIBRARY_NAME = 'stagefright'
Library('stagefright')
FORCE_SHARED_LIB = True

Просмотреть файл

@ -10,7 +10,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
'libstagefright.cpp',
]
LIBRARY_NAME = 'stagefright'
Library('stagefright')
FORCE_SHARED_LIB = True

Просмотреть файл

@ -10,7 +10,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
'libutils.cpp',
]
LIBRARY_NAME = 'utils'
Library('utils')
FORCE_SHARED_LIB = True

Просмотреть файл

@ -10,7 +10,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
'libvideoeditorplayer.cpp',
]
LIBRARY_NAME = 'videoeditorplayer'
Library('videoeditorplayer')
FORCE_SHARED_LIB = True

Просмотреть файл

@ -18,7 +18,7 @@ SOURCES += [
'OmxPlugin.cpp',
]
LIBRARY_NAME = 'omxplugin'
Library('omxplugin')
FORCE_SHARED_LIB = True

Просмотреть файл

@ -5,12 +5,12 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
if CONFIG['OS_TARGET'] != 'WINNT' and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
CPP_UNIT_TESTS += [
CppUnitTests([
'mediaconduit_unittests',
'mediapipeline_unittest',
'sdp_unittests',
'signaling_unittests',
]
])
SOURCES += sorted('%s.cpp' % t for t in CPP_UNIT_TESTS)

Просмотреть файл

@ -36,7 +36,7 @@ if CONFIG['MOZ_REPLACE_MALLOC']:
'replace_malloc.c',
]
LIBRARY_NAME = 'memory'
Library('memory')
if CONFIG['MOZ_JEMALLOC3']:
if not CONFIG['MOZ_NATIVE_JEMALLOC']:

Просмотреть файл

@ -36,7 +36,7 @@ if CONFIG['OS_TARGET'] == 'Darwin' and not CONFIG['MOZ_REPLACE_MALLOC']:
'src/src/zone.c',
]
LIBRARY_NAME = 'jemalloc'
Library('jemalloc')
FORCE_STATIC_LIB = True

Просмотреть файл

@ -57,7 +57,7 @@ else:
'VolatileBufferFallback.cpp',
]
LIBRARY_NAME = 'mozalloc'
Library('mozalloc')
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
FORCE_STATIC_LIB = True

Просмотреть файл

@ -4,9 +4,9 @@
# 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/.
CPP_UNIT_TESTS += [
CppUnitTests([
'TestVolatileBuffer',
]
])
SOURCES += sorted('%s.cpp' % t for t in CPP_UNIT_TESTS)

Просмотреть файл

@ -12,7 +12,7 @@ if not CONFIG['MOZ_JEMALLOC3']:
SOURCES += [
'jemalloc.c',
]
LIBRARY_NAME = 'mozjemalloc'
Library('mozjemalloc')
STATIC_LIBRARY_NAME = 'jemalloc'
FORCE_STATIC_LIB = True

Просмотреть файл

@ -18,7 +18,7 @@ SOURCES += [
'../../../nsprpub/lib/libc/src/strcpy.c',
]
LIBRARY_NAME = 'dmd'
Library('dmd')
FORCE_SHARED_LIB = True

Просмотреть файл

@ -9,7 +9,7 @@ SOURCES += [
'dummy_replace_malloc.c',
]
LIBRARY_NAME = 'replace_malloc'
Library('replace_malloc')
FORCE_SHARED_LIB = True

Просмотреть файл

@ -17,7 +17,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
'pthread_atfork.c',
]
LIBRARY_NAME = 'replace_jemalloc'
Library('replace_jemalloc')
USE_LIBS += [
'jemalloc',

Просмотреть файл

@ -6,7 +6,7 @@
TEST_DIRS += ['tests']
LIBRARY_NAME = 'mfbt'
Library('mfbt')
EXPORTS.mozilla = [
'Alignment.h',

Просмотреть файл

@ -4,7 +4,7 @@
# 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/.
CPP_UNIT_TESTS += [
CppUnitTests([
'TestArrayUtils',
'TestAtomics',
'TestBinarySearch',
@ -30,12 +30,12 @@ CPP_UNIT_TESTS += [
'TestTypeTraits',
'TestUniquePtr',
'TestWeakPtr',
]
])
if not CONFIG['MOZ_ASAN']:
CPP_UNIT_TESTS += [
CppUnitTests([
'TestPoisonArea',
]
])
SOURCES += sorted('%s.cpp' % t for t in CPP_UNIT_TESTS)

Просмотреть файл

@ -20,9 +20,9 @@ csrcs = [
]
HOST_SOURCES += csrcs
HOST_LIBRARY_NAME = 'hostbz2'
HostLibrary('hostbz2')
LIBRARY_NAME = 'bz2'
Library('bz2')
UNIFIED_SOURCES += [
'blocksort.c',

Просмотреть файл

@ -4,7 +4,7 @@
# 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 = 'signmar'
Library('signmar')
UNIFIED_SOURCES += [
'mar_sign.c',

Просмотреть файл

@ -14,9 +14,9 @@ HOST_SOURCES += [
'mar_extract.c',
'mar_read.c',
]
HOST_LIBRARY_NAME = 'hostmar'
HostLibrary('hostmar')
LIBRARY_NAME = 'mar'
Library('mar')
UNIFIED_SOURCES += [
'mar_create.c',

Просмотреть файл

@ -8,14 +8,14 @@ HOST_SOURCES += [
'mar.c',
]
HOST_PROGRAM = 'mar'
HostProgram('mar')
HOST_USE_LIBS += [
'hostmar',
]
if CONFIG['MOZ_ENABLE_SIGNMAR']:
PROGRAM = 'signmar'
Program('signmar')
SOURCES += HOST_SOURCES

Просмотреть файл

@ -4,7 +4,7 @@
# 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 = 'verifymar'
Library('verifymar')
UNIFIED_SOURCES += [
'cryptox.c',

Просмотреть файл

@ -69,7 +69,7 @@ if CONFIG['MOZ_ASAN']:
]
LIBRARY_NAME = 'mozglue'
Library('mozglue')
USE_LIBS += [
'mfbt',

Просмотреть файл

@ -12,14 +12,14 @@ SOURCES += [
'Zip.cpp',
]
LIBRARY_NAME = 'linker'
Library('linker')
HOST_SOURCES += [
'SeekableZStream.cpp',
'szip.cpp',
]
HOST_PROGRAM = 'szip'
HostProgram('szip')
FINAL_LIBRARY = 'mozglue'

Просмотреть файл

@ -9,9 +9,9 @@ NO_DIST_INSTALL = True
SOURCES += [
'TestZip.cpp',
]
SIMPLE_PROGRAMS += [
SimplePrograms([
'TestZip',
]
])
LOCAL_INCLUDES += ['..']
USE_LIBS += [
'linker',

Просмотреть файл

@ -10,6 +10,6 @@ SOURCES += [
'ShowSSEConfig.cpp',
]
CPP_UNIT_TESTS += [
CppUnitTests([
'ShowSSEConfig',
]
])

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше