OLD | NEW |
| (Empty) |
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. | |
4 | |
5 { | |
6 'includes': [ | |
7 '../../../../native_client/build/untrusted.gypi', | |
8 ], | |
9 # TODO(ncbray) factor nexe building code into a common file. | |
10 'targets': [ | |
11 { | |
12 'target_name': 'nacl_tests', | |
13 'type': 'none', | |
14 'dependencies': [ | |
15 '../../../../ppapi/ppapi_untrusted.gyp:ppapi_cpp_lib', | |
16 '../../../../ppapi/native_client/native_client.gyp:ppapi_lib', | |
17 '../../../../ppapi/native_client/native_client.gyp:nacl_irt', | |
18 ], | |
19 'copies': [ | |
20 { | |
21 'destination': '<(PRODUCT_DIR)/nacl_test_data/newlib', | |
22 'files': [ | |
23 'nacl_load_test.html', | |
24 ], | |
25 }, | |
26 { | |
27 'destination': '<(PRODUCT_DIR)/nacl_test_data/glibc', | |
28 'files': [ | |
29 'nacl_load_test.html', | |
30 ], | |
31 }, | |
32 ], | |
33 'variables': { | |
34 'nexe_target': 'simple', | |
35 'build_newlib': 1, | |
36 'out_newlib32': '<(PRODUCT_DIR)/nacl_test_data/newlib/>(nexe_target)_new
lib_x86_32.nexe', | |
37 'out_newlib64': '<(PRODUCT_DIR)/nacl_test_data/newlib/>(nexe_target)_new
lib_x86_64.nexe', | |
38 'out_newlib_arm': '<(PRODUCT_DIR)/nacl_test_data/newlib/>(nexe_target)_n
ewlib_arm.nexe', | |
39 'out_glibc32': '<(PRODUCT_DIR)/nacl_test_data/glibc/>(nexe_target)_glibc
_x86_32.nexe', | |
40 'out_glibc64': '<(PRODUCT_DIR)/nacl_test_data/glibc/>(nexe_target)_glibc
_x86_64.nexe', | |
41 'out_glibc_arm': '<(PRODUCT_DIR)/nacl_test_data/glibc/>(nexe_target)_gli
bc_arm.nexe', | |
42 'nmf_newlib%': '<(PRODUCT_DIR)/nacl_test_data/newlib/>(nexe_target).nmf'
, | |
43 'include_dirs': [ | |
44 '../../../..', | |
45 ], | |
46 'link_flags': [ | |
47 '-lppapi_cpp', | |
48 '-lppapi', | |
49 '-lpthread', | |
50 ], | |
51 'sources': [ | |
52 'simple.cc', | |
53 ], | |
54 }, | |
55 'actions': [ | |
56 { | |
57 'action_name': 'Generate NEWLIB NMF', | |
58 # Unlike glibc, nexes are not actually inputs - only the names matter. | |
59 'inputs': [], | |
60 'outputs': ['>(nmf_newlib)'], | |
61 'action': [ | |
62 'python', | |
63 '<(DEPTH)/native_client_sdk/src/tools/create_nmf.py', | |
64 '>(out_newlib64)', '>(out_newlib32)', '>(out_newlib_arm)', | |
65 '--output=>(nmf_newlib)', | |
66 '--toolchain=newlib', | |
67 ], | |
68 }, | |
69 ], | |
70 'conditions': [ | |
71 ['target_arch!="arm" and disable_glibc==0', { | |
72 'variables': { | |
73 'build_glibc': 1, | |
74 # NOTE: Use /lib, not /lib64 here; it is a symbolic link which | |
75 # doesn't work on Windows. | |
76 'libdir_glibc64': '>(nacl_glibc_tc_root)/x86_64-nacl/lib', | |
77 'libdir_glibc32': '>(nacl_glibc_tc_root)/x86_64-nacl/lib32', | |
78 'nacl_objdump': '>(nacl_glibc_tc_root)/bin/x86_64-nacl-objdump', | |
79 'nmf_glibc%': '<(PRODUCT_DIR)/nacl_test_data/glibc/>(nexe_target).nm
f', | |
80 }, | |
81 'actions': [ | |
82 { | |
83 'action_name': 'Generate GLIBC NMF and copy libs', | |
84 'inputs': ['>(out_glibc64)', '>(out_glibc32)'], | |
85 # NOTE: There is no explicit dependency for the lib32 | |
86 # and lib64 directories created in the PRODUCT_DIR. | |
87 # They are created as a side-effect of NMF creation. | |
88 'outputs': ['>(nmf_glibc)'], | |
89 'action': [ | |
90 'python', | |
91 '<(DEPTH)/native_client_sdk/src/tools/create_nmf.py', | |
92 '>@(_inputs)', | |
93 '--objdump=>(nacl_objdump)', | |
94 '--library-path=>(libdir_glibc64)', | |
95 '--library-path=>(libdir_glibc32)', | |
96 '--output=>(nmf_glibc)', | |
97 '--stage-dependencies=<(PRODUCT_DIR)/nacl_test_data/glibc', | |
98 '--toolchain=glibc', | |
99 ], | |
100 }, | |
101 ], | |
102 }], | |
103 ], | |
104 }, | |
105 ], | |
106 | |
107 } | |
108 | |
OLD | NEW |