Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ppapi / native_client / native_client.gyp
blob7f9e2b217c82939bbe79567b00112853fa91cd0a
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
6   'includes': [
7     '../../build/common_untrusted.gypi',
8   ],
9   'conditions': [
10     ['disable_nacl==0 and disable_nacl_untrusted==0', {
11       'targets': [
12         {
13           'target_name': 'ppapi_lib',
14           'type': 'none',
15           'dependencies': [
16              '../../native_client/src/untrusted/pthread/pthread.gyp:pthread_lib',
17              'src/untrusted/irt_stub/irt_stub.gyp:ppapi_stub_lib',
18           ],
19           'include_dirs': [
20             '..',
21           ],
22           'copies': [
23             {
24               'destination': '>(tc_include_dir_newlib)/nacl',
25               'files': [
26                 'src/shared/ppapi_proxy/ppruntime.h',
27               ],
28             },
30             {
31               'destination': '>(tc_lib_dir_pnacl_newlib)',
32               'files': [
33                 'src/untrusted/irt_stub/libppapi.a',
34               ],
35             },
36           ],
37           'conditions': [
38             ['target_arch=="ia32" or target_arch=="x64"', {
39               'copies': [
40                 {
41                   'destination': '>(tc_include_dir_glibc)/include/nacl',
42                   'files': [
43                     'src/shared/ppapi_proxy/ppruntime.h',
44                   ],
45                 },
46               ],
47             }],
48             ['target_arch=="ia32"', {
49               'copies': [
50                 # Here we copy linker scripts out of the Native Client repo..
51                 # These are source, not build artifacts.
52                 {
53                   'destination': '>(tc_lib_dir_newlib32)',
54                   'files': [
55                     'src/untrusted/irt_stub/libppapi.a',
56                   ],
57                 },
58                 {
59                   'destination': '>(tc_lib_dir_glibc32)',
60                   'files': [
61                     'src/untrusted/irt_stub/libppapi.a',
62                     'src/untrusted/irt_stub/libppapi.so',
63                   ],
64                 },
65               ],
66             }],
67             ['target_arch=="x64" or (target_arch=="ia32" and OS=="win")', {
68               'copies': [
69                 {
70                   'destination': '>(tc_lib_dir_newlib64)',
71                   'files': [
72                     'src/untrusted/irt_stub/libppapi.a',
73                   ],
74                 },
75                 {
76                   'destination': '>(tc_lib_dir_glibc64)',
77                   'files': [
78                     'src/untrusted/irt_stub/libppapi.a',
79                     'src/untrusted/irt_stub/libppapi.so',
80                   ],
81                 },
82               ]
83             }],
84             ['target_arch=="arm"', {
85               'copies': [
86                 {
87                   'destination': '>(tc_lib_dir_newlib_arm)',
88                   'files': [
89                     'src/untrusted/irt_stub/libppapi.a',
90                   ],
91                 },
92                 {
93                   'destination': '>(tc_lib_dir_glibc_arm)',
94                   'files': [
95                     'src/untrusted/irt_stub/libppapi.a',
96                     'src/untrusted/irt_stub/libppapi.so',
97                   ],
98                 },
99               ]
100             }],
101             ['target_arch=="mipsel"', {
102               'copies': [
103                 {
104                   'destination': '>(tc_lib_dir_newlib_mips)',
105                   'files': [
106                     'src/untrusted/irt_stub/libppapi.a',
107                   ],
108                 },
109               ]
110             }]
111           ],
112         },
113         {
114           'target_name': 'nacl_irt',
115           'type': 'none',
116           'variables': {
117             'nexe_target': 'nacl_irt',
118             # These out_* fields override the default filenames, which
119             # include a "_newlib" suffix and places them in the target
120             # directory.
121             'out_newlib64': '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe',
122             'out_newlib32': '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe',
123             'out_newlib_arm': '<(PRODUCT_DIR)/nacl_irt_arm.nexe',
124             'out_newlib_mips': '<(PRODUCT_DIR)/nacl_irt_mips32.nexe',
125             'build_glibc': 0,
126             'build_newlib': 0,
127             'build_irt': 1,
128             'include_dirs': [
129               '..',
130             ],
131             'link_flags': [
132               '-Wl,--start-group',
133               '-lirt_browser',
134               '-llatency_info_nacl',
135               '-lpnacl_irt_shim_for_irt',
136               '-lppapi_proxy_nacl',
137               '-lmojo_irt',
138               '-lppapi_ipc_nacl',
139               '-lppapi_shared_nacl',
140               '-lgles2_implementation_nacl',
141               '-lgles2_cmd_helper_nacl',
142               '-lgles2_utils_nacl',
143               '-lcommand_buffer_client_nacl',
144               '-lcommand_buffer_common_nacl',
145               '-ltracing_nacl',
146               '-lgpu_ipc_nacl',
147               '-lipc_nacl',
148               '-lcrypto_nacl',
149               '-lbase_nacl',
150               '-lshared_memory_support_nacl',
151               '-lsrpc',
152               '-limc_syscalls',
153               '-lplatform',
154               '-lgio',
155               '-Wl,--end-group',
156               '-lm',
157             ],
158             'extra_args': [
159               '--strip-all',
160             ],
161             'conditions': [
162               # untrusted.gypi and build_nexe.py currently build
163               # both x86-32 and x86-64 whenever target_arch is some
164               # flavor of x86.  However, on non-windows platforms
165               # we only need one architecture.
166               ['OS!="win" and target_arch=="ia32"',
167                 {
168                   'enable_x86_64': 0
169                 }
170               ],
171               ['target_arch=="x64"',
172                 {
173                   'enable_x86_32': 0
174                 }
175               ],
176               ['target_arch=="ia32" or target_arch=="x64"', {
177                 'extra_deps_newlib64': [
178                   '>(tc_lib_dir_irt64)/libppapi_proxy_nacl.a',
179                   '>(tc_lib_dir_irt64)/libmojo_irt.a',
180                   '>(tc_lib_dir_irt64)/libppapi_ipc_nacl.a',
181                   '>(tc_lib_dir_irt64)/libppapi_shared_nacl.a',
182                   '>(tc_lib_dir_irt64)/libgles2_implementation_nacl.a',
183                   '>(tc_lib_dir_irt64)/libcommand_buffer_client_nacl.a',
184                   '>(tc_lib_dir_irt64)/libcommand_buffer_common_nacl.a',
185                   '>(tc_lib_dir_irt64)/libgpu_ipc_nacl.a',
186                   '>(tc_lib_dir_irt64)/libtracing_nacl.a',
187                   '>(tc_lib_dir_irt64)/libgles2_cmd_helper_nacl.a',
188                   '>(tc_lib_dir_irt64)/libgles2_utils_nacl.a',
189                   '>(tc_lib_dir_irt64)/libipc_nacl.a',
190                   '>(tc_lib_dir_irt64)/libcrypto_nacl.a',
191                   '>(tc_lib_dir_irt64)/libbase_nacl.a',
192                   '>(tc_lib_dir_irt64)/libirt_browser.a',
193                   '>(tc_lib_dir_irt64)/libpnacl_irt_shim_for_irt.a',
194                   '>(tc_lib_dir_irt64)/libshared_memory_support_nacl.a',
195                   '>(tc_lib_dir_irt64)/libsrpc.a',
196                   '>(tc_lib_dir_irt64)/libplatform.a',
197                   '>(tc_lib_dir_irt64)/libimc_syscalls.a',
198                   '>(tc_lib_dir_irt64)/libgio.a',
199                 ],
200                 'extra_deps_newlib32': [
201                   '>(tc_lib_dir_irt32)/libppapi_proxy_nacl.a',
202                   '>(tc_lib_dir_irt32)/libmojo_irt.a',
203                   '>(tc_lib_dir_irt32)/libppapi_ipc_nacl.a',
204                   '>(tc_lib_dir_irt32)/libppapi_shared_nacl.a',
205                   '>(tc_lib_dir_irt32)/libgles2_implementation_nacl.a',
206                   '>(tc_lib_dir_irt32)/libcommand_buffer_client_nacl.a',
207                   '>(tc_lib_dir_irt32)/libcommand_buffer_common_nacl.a',
208                   '>(tc_lib_dir_irt32)/libgpu_ipc_nacl.a',
209                   '>(tc_lib_dir_irt32)/libtracing_nacl.a',
210                   '>(tc_lib_dir_irt32)/libgles2_cmd_helper_nacl.a',
211                   '>(tc_lib_dir_irt32)/libgles2_utils_nacl.a',
212                   '>(tc_lib_dir_irt32)/libipc_nacl.a',
213                   '>(tc_lib_dir_irt32)/libcrypto_nacl.a',
214                   '>(tc_lib_dir_irt32)/libbase_nacl.a',
215                   '>(tc_lib_dir_irt32)/libirt_browser.a',
216                   '>(tc_lib_dir_irt32)/libpnacl_irt_shim_for_irt.a',
217                   '>(tc_lib_dir_irt32)/libshared_memory_support_nacl.a',
218                   '>(tc_lib_dir_irt32)/libsrpc.a',
219                   '>(tc_lib_dir_irt32)/libplatform.a',
220                   '>(tc_lib_dir_irt32)/libimc_syscalls.a',
221                   '>(tc_lib_dir_irt32)/libgio.a',
222                 ],
223               }],
224               ['target_arch=="arm"', {
225                 'extra_deps_arm': [
226                   '>(tc_lib_dir_irt_arm)/libppapi_proxy_nacl.a',
227                   '>(tc_lib_dir_irt_arm)/libmojo_irt.a',
228                   '>(tc_lib_dir_irt_arm)/libppapi_ipc_nacl.a',
229                   '>(tc_lib_dir_irt_arm)/libppapi_shared_nacl.a',
230                   '>(tc_lib_dir_irt_arm)/libgles2_implementation_nacl.a',
231                   '>(tc_lib_dir_irt_arm)/libcommand_buffer_client_nacl.a',
232                   '>(tc_lib_dir_irt_arm)/libcommand_buffer_common_nacl.a',
233                   '>(tc_lib_dir_irt_arm)/libgpu_ipc_nacl.a',
234                   '>(tc_lib_dir_irt_arm)/libtracing_nacl.a',
235                   '>(tc_lib_dir_irt_arm)/libgles2_cmd_helper_nacl.a',
236                   '>(tc_lib_dir_irt_arm)/libgles2_utils_nacl.a',
237                   '>(tc_lib_dir_irt_arm)/libipc_nacl.a',
238                   '>(tc_lib_dir_irt_arm)/libcrypto_nacl.a',
239                   '>(tc_lib_dir_irt_arm)/libbase_nacl.a',
240                   '>(tc_lib_dir_irt_arm)/libirt_browser.a',
241                   '>(tc_lib_dir_irt_arm)/libpnacl_irt_shim_for_irt.a',
242                   '>(tc_lib_dir_irt_arm)/libshared_memory_support_nacl.a',
243                   '>(tc_lib_dir_irt_arm)/libsrpc.a',
244                   '>(tc_lib_dir_irt_arm)/libplatform.a',
245                   '>(tc_lib_dir_irt_arm)/libimc_syscalls.a',
246                   '>(tc_lib_dir_irt_arm)/libgio.a',
247                 ],
248               }],
249               ['target_arch=="mipsel"', {
250                 'extra_deps_mips': [
251                   '>(tc_lib_dir_irt_mips)/libppapi_proxy_nacl.a',
252                   '>(tc_lib_dir_irt_mips)/libmojo_irt.a',
253                   '>(tc_lib_dir_irt_mips)/libppapi_ipc_nacl.a',
254                   '>(tc_lib_dir_irt_mips)/libppapi_shared_nacl.a',
255                   '>(tc_lib_dir_irt_mips)/libgles2_implementation_nacl.a',
256                   '>(tc_lib_dir_irt_mips)/libcommand_buffer_client_nacl.a',
257                   '>(tc_lib_dir_irt_mips)/libcommand_buffer_common_nacl.a',
258                   '>(tc_lib_dir_irt_mips)/libgpu_ipc_nacl.a',
259                   '>(tc_lib_dir_irt_mips)/libtracing_nacl.a',
260                   '>(tc_lib_dir_irt_mips)/libgles2_cmd_helper_nacl.a',
261                   '>(tc_lib_dir_irt_mips)/libgles2_utils_nacl.a',
262                   '>(tc_lib_dir_irt_mips)/libipc_nacl.a',
263                   '>(tc_lib_dir_irt_mips)/libcrypto_nacl.a',
264                   '>(tc_lib_dir_irt_mips)/libbase_nacl.a',
265                   '>(tc_lib_dir_irt_mips)/libirt_browser.a',
266                   '>(tc_lib_dir_irt_mips)/libpnacl_irt_shim_for_irt.a',
267                   '>(tc_lib_dir_irt_mips)/libshared_memory_support_nacl.a',
268                   '>(tc_lib_dir_irt_mips)/libsrpc.a',
269                   '>(tc_lib_dir_irt_mips)/libplatform.a',
270                   '>(tc_lib_dir_irt_mips)/libimc_syscalls.a',
271                   '>(tc_lib_dir_irt_mips)/libgio.a',
272                 ],
273               }],
274             ],
275           },
276           'dependencies': [
277             'src/untrusted/pnacl_irt_shim/pnacl_irt_shim.gyp:irt',
278             '../ppapi_proxy_nacl.gyp:ppapi_proxy_nacl',
279             '../ppapi_ipc_nacl.gyp:ppapi_ipc_nacl',
280             '../ppapi_shared_nacl.gyp:ppapi_shared_nacl',
281             '../../gpu/command_buffer/command_buffer_nacl.gyp:gles2_utils_nacl',
282             '../../gpu/gpu_nacl.gyp:command_buffer_client_nacl',
283             '../../gpu/gpu_nacl.gyp:command_buffer_common_nacl',
284             '../../gpu/gpu_nacl.gyp:gles2_implementation_nacl',
285             '../../gpu/gpu_nacl.gyp:gles2_cmd_helper_nacl',
286             '../../gpu/gpu_nacl.gyp:gpu_ipc_nacl',
287             '../../components/tracing_nacl.gyp:tracing_nacl',
288             '../../ipc/ipc_nacl.gyp:ipc_nacl',
289             '../../crypto/crypto_nacl.gyp:crypto_nacl',
290             '../../base/base_nacl.gyp:base_nacl',
291             '../../media/media_nacl.gyp:shared_memory_support_nacl',
292             '../../mojo/mojo_nacl_untrusted.gyp:libmojo_irt',
293             '../../native_client/src/untrusted/irt/irt.gyp:irt_browser_lib',
294             '../../native_client/src/shared/srpc/srpc.gyp:srpc_lib',
295             '../../native_client/src/shared/platform/platform.gyp:platform_lib',
296             '../../native_client/src/tools/tls_edit/tls_edit.gyp:tls_edit#host',
297             '../../native_client/src/untrusted/nacl/nacl.gyp:imc_syscalls_lib',
298             '../../native_client/src/shared/gio/gio.gyp:gio_lib',
299           ],
300         },
301       ],
302     }],
303   ],