|
1 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- |
|
2 # vim: set filetype=python: |
|
3 # This Source Code Form is subject to the terms of the Mozilla Public |
|
4 # License, v. 2.0. If a copy of the MPL was not distributed with this |
|
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
6 |
|
7 # Build mozglue as a shared lib on Windows, OSX and Android. |
|
8 # If this is ever changed, update MOZ_SHARED_MOZGLUE in browser/installer/Makefile.in |
|
9 if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android'): |
|
10 FORCE_SHARED_LIB = True |
|
11 else: |
|
12 FORCE_SHARED_LIB = False |
|
13 FORCE_STATIC_LIB = True |
|
14 |
|
15 if CONFIG['MOZ_MEMORY'] and (CONFIG['MOZ_NATIVE_JEMALLOC'] or FORCE_SHARED_LIB): |
|
16 pass |
|
17 # TODO: SHARED_LIBRARY_LIBS go here |
|
18 else: |
|
19 # Temporary, until bug 662814 lands |
|
20 NO_VISIBILITY_FLAGS = True |
|
21 SOURCES += [ |
|
22 'dummy.cpp', |
|
23 ] |
|
24 |
|
25 if CONFIG['OS_TARGET'] == 'Android': |
|
26 SOURCES += [ |
|
27 'BionicGlue.cpp', |
|
28 ] |
|
29 |
|
30 if CONFIG['OS_TARGET'] == 'WINNT': |
|
31 SOURCES += [ |
|
32 'WindowsDllBlocklist.cpp', |
|
33 ] |
|
34 DEFFILE = 'mozglue.def' |
|
35 DISABLE_STL_WRAPPING = True |
|
36 |
|
37 if CONFIG['MOZ_NUWA_PROCESS']: |
|
38 EXPORTS.ipc += [ |
|
39 'Nuwa.h', |
|
40 ] |
|
41 SOURCES += [ |
|
42 'Nuwa.cpp', |
|
43 ] |
|
44 |
|
45 EXPORTS.mozilla += [ |
|
46 'arm.h', |
|
47 'SSE.h', |
|
48 'WindowsDllBlocklist.h', |
|
49 ] |
|
50 |
|
51 if CONFIG['CPU_ARCH'].startswith('x86'): |
|
52 SOURCES += [ |
|
53 'SSE.cpp', |
|
54 ] |
|
55 |
|
56 if CONFIG['CPU_ARCH'] == 'arm': |
|
57 SOURCES += [ |
|
58 'arm.cpp', |
|
59 ] |
|
60 |
|
61 if CONFIG['MOZ_ASAN']: |
|
62 SOURCES += [ |
|
63 'AsanOptions.cpp', |
|
64 ] |
|
65 |
|
66 |
|
67 LIBRARY_NAME = 'mozglue' |
|
68 |
|
69 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': |
|
70 SOURCES += [ |
|
71 'cpuacct.c', |
|
72 ] |
|
73 |
|
74 DEFINES['IMPL_MFBT'] = True |