OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # This GYP file defines untrusted (NaCl) targets. All targets in this | 5 # This GYP file defines untrusted (NaCl) targets. All targets in this |
6 # file should be conditionally depended upon via 'disable_nacl!=1' to avoid | 6 # file should be conditionally depended upon via 'disable_nacl!=1' to avoid |
7 # requiring NaCl sources for building. | 7 # requiring NaCl sources for building. |
8 | 8 |
9 { | 9 { |
10 'includes': [ | 10 'includes': [ |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 '-lppapi', | 91 '-lppapi', |
92 '-pthread', | 92 '-pthread', |
93 ], | 93 ], |
94 'link_flags!': [ | 94 'link_flags!': [ |
95 '-O3', | 95 '-O3', |
96 ], | 96 ], |
97 'translate_flags': [ | 97 'translate_flags': [ |
98 '-O0', | 98 '-O0', |
99 ], | 99 ], |
100 'conditions': [ | 100 'conditions': [ |
101 ['target_arch=="ia32" or target_arch=="x64"', { | 101 ['target_arch=="ia32"', { |
102 'extra_deps_newlib64': [ | |
103 '>(tc_lib_dir_newlib64)/libppapi_cpp.a', | |
104 '>(tc_lib_dir_newlib64)/libppapi.a', | |
105 ], | |
106 'extra_deps_newlib32': [ | 102 'extra_deps_newlib32': [ |
107 '>(tc_lib_dir_newlib32)/libppapi_cpp.a', | 103 '>(tc_lib_dir_newlib32)/libppapi_cpp.a', |
108 '>(tc_lib_dir_newlib32)/libppapi.a', | 104 '>(tc_lib_dir_newlib32)/libppapi.a', |
109 ], | 105 ], |
110 'extra_deps_glibc64': [ | |
111 '>(tc_lib_dir_glibc64)/libppapi_cpp.so', | |
112 '>(tc_lib_dir_glibc64)/libppapi.so', | |
113 ], | |
114 'extra_deps_glibc32': [ | 106 'extra_deps_glibc32': [ |
115 '>(tc_lib_dir_glibc32)/libppapi_cpp.so', | 107 '>(tc_lib_dir_glibc32)/libppapi_cpp.so', |
116 '>(tc_lib_dir_glibc32)/libppapi.so', | 108 '>(tc_lib_dir_glibc32)/libppapi.so', |
117 ], | 109 ], |
118 }], | 110 }], |
| 111 ['target_arch=="x64" or (target_arch=="ia32" and OS=="win")', { |
| 112 'extra_deps_newlib64': [ |
| 113 '>(tc_lib_dir_newlib64)/libppapi_cpp.a', |
| 114 '>(tc_lib_dir_newlib64)/libppapi.a', |
| 115 ], |
| 116 'extra_deps_glibc64': [ |
| 117 '>(tc_lib_dir_glibc64)/libppapi_cpp.so', |
| 118 '>(tc_lib_dir_glibc64)/libppapi.so', |
| 119 ], |
| 120 }], |
119 ['target_arch=="arm"', { | 121 ['target_arch=="arm"', { |
120 'extra_deps_arm': [ | 122 'extra_deps_arm': [ |
121 '>(tc_lib_dir_newlib_arm)/libppapi_cpp.a', | 123 '>(tc_lib_dir_newlib_arm)/libppapi_cpp.a', |
122 '>(tc_lib_dir_newlib_arm)/libppapi.a', | 124 '>(tc_lib_dir_newlib_arm)/libppapi.a', |
123 ], | 125 ], |
124 }], | 126 }], |
125 ], | 127 ], |
126 'extra_deps_pnacl_newlib': [ | 128 'extra_deps_pnacl_newlib': [ |
127 '>(tc_lib_dir_pnacl_newlib)/libppapi_cpp.a', | 129 '>(tc_lib_dir_pnacl_newlib)/libppapi_cpp.a', |
128 '>(tc_lib_dir_pnacl_newlib)/libppapi.a', | 130 '>(tc_lib_dir_pnacl_newlib)/libppapi.a', |
129 ], | 131 ], |
130 'sources': [ | 132 'sources': [ |
131 '<@(test_common_source_files)', | 133 '<@(test_common_source_files)', |
132 '<@(test_nacl_source_files)', | 134 '<@(test_nacl_source_files)', |
133 ], | 135 ], |
134 'extra_args': [ | 136 'extra_args': [ |
135 '--strip-all', | 137 '--strip-all', |
136 ], | 138 ], |
137 'create_nmf': '<(DEPTH)/native_client_sdk/src/tools/create_nmf.py', | 139 'create_nmf': '<(DEPTH)/native_client_sdk/src/tools/create_nmf.py', |
138 'create_nonsfi_test_nmf': 'tests/create_nonsfi_test_nmf.py', | 140 'create_nonsfi_test_nmf': 'tests/create_nonsfi_test_nmf.py', |
139 }, | 141 }, |
140 'conditions': [ | 142 'conditions': [ |
141 ['target_arch!="arm" and target_arch!="mipsel" and disable_glibc==0', { | 143 ['(target_arch=="ia32" or target_arch=="x64") and disable_glibc==0', { |
142 'variables': { | 144 'variables': { |
143 'build_glibc': 1, | 145 'build_glibc': 1, |
144 # NOTE: Use /lib, not /lib64 here; it is a symbolic link which | 146 # NOTE: Use /lib, not /lib64 here; it is a symbolic link which |
145 # doesn't work on Windows. | 147 # doesn't work on Windows. |
146 'libdir_glibc64': '>(nacl_glibc_tc_root)/x86_64-nacl/lib', | 148 'libdir_glibc64': '>(nacl_glibc_tc_root)/x86_64-nacl/lib', |
147 'libdir_glibc32': '>(nacl_glibc_tc_root)/x86_64-nacl/lib32', | 149 'libdir_glibc32': '>(nacl_glibc_tc_root)/x86_64-nacl/lib32', |
148 'nacl_objdump': '>(nacl_glibc_tc_root)/bin/x86_64-nacl-objdump', | 150 'nacl_objdump': '>(nacl_glibc_tc_root)/bin/x86_64-nacl-objdump', |
149 'nmf_glibc%': '<(PRODUCT_DIR)/>(nexe_target)_glibc.nmf', | 151 'nmf_glibc%': '<(PRODUCT_DIR)/>(nexe_target)_glibc.nmf', |
150 }, | 152 }, |
151 'actions': [ | 153 'actions': [ |
152 { | 154 { |
153 'action_name': 'Generate GLIBC NMF and copy libs', | 155 'action_name': 'Generate GLIBC NMF and copy libs', |
154 # NOTE: create_nmf must be first, it is the script python executes | 156 # NOTE: create_nmf must be first, it is the script python executes |
155 # below. | 157 # below. |
156 'inputs': ['>(create_nmf)', '>(out_glibc64)', '>(out_glibc32)'], | 158 'inputs': ['>(create_nmf)'], |
157 # NOTE: There is no explicit dependency for the lib32 | 159 # NOTE: There is no explicit dependency for the lib32 |
158 # and lib64 directories created in the PRODUCT_DIR. | 160 # and lib64 directories created in the PRODUCT_DIR. |
159 # They are created as a side-effect of NMF creation. | 161 # They are created as a side-effect of NMF creation. |
160 'outputs': ['>(nmf_glibc)'], | 162 'outputs': ['>(nmf_glibc)'], |
161 'action': [ | 163 'action': [ |
162 'python', | 164 'python', |
163 '>@(_inputs)', | 165 '>@(_inputs)', |
164 '--objdump=>(nacl_objdump)', | 166 '--objdump=>(nacl_objdump)', |
165 '--library-path=>(libdir_glibc64)', | |
166 '--library-path=>(libdir_glibc32)', | |
167 '--library-path=>(tc_lib_dir_glibc32)', | |
168 '--library-path=>(tc_lib_dir_glibc64)', | |
169 '--output=>(nmf_glibc)', | 167 '--output=>(nmf_glibc)', |
170 '--stage-dependencies=<(PRODUCT_DIR)', | 168 '--stage-dependencies=<(PRODUCT_DIR)', |
171 ], | 169 ], |
| 170 'conditions': [ |
| 171 ['target_arch=="ia32"', { |
| 172 'actions': [ |
| 173 '--library-path=>(libdir_glibc32)', |
| 174 '--library-path=>(tc_lib_dir_glibc32)', |
| 175 ], |
| 176 'inputs': ['>(out_glibc32)'], |
| 177 }], |
| 178 ['target_arch=="x64" or (target_arch=="ia32" and OS=="win")', { |
| 179 'actions': [ |
| 180 '--library-path=>(libdir_glibc64)', |
| 181 '--library-path=>(tc_lib_dir_glibc64)', |
| 182 ], |
| 183 'inputs': ['>(out_glibc64)'], |
| 184 }], |
| 185 ], |
172 }, | 186 }, |
173 ], | 187 ], |
174 }], | 188 }], |
175 # Test PNaCl pre-translated code (pre-translated to save bot time). | 189 # Test PNaCl pre-translated code (pre-translated to save bot time). |
176 # We only care about testing that code generation is correct, | 190 # We only care about testing that code generation is correct, |
177 # and in-browser translation is tested elsewhere. | 191 # and in-browser translation is tested elsewhere. |
178 # NOTE: native_client/build/untrusted.gypi dictates that | 192 # NOTE: native_client/build/untrusted.gypi dictates that |
179 # PNaCl only generate x86-32 and x86-64 on x86 platforms, | 193 # PNaCl only generate x86-32 and x86-64 on x86 platforms, |
180 # ARM on ARM platforms, or MIPS on MIPS platforms, not all | 194 # ARM on ARM platforms, or MIPS on MIPS platforms, not all |
181 # versions always. | 195 # versions always. |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 '>@(_inputs)', | 294 '>@(_inputs)', |
281 '--output=>(nmf_pnacl)', | 295 '--output=>(nmf_pnacl)', |
282 ], | 296 ], |
283 }, | 297 }, |
284 ], | 298 ], |
285 }], | 299 }], |
286 ], | 300 ], |
287 }, | 301 }, |
288 ], | 302 ], |
289 } | 303 } |
OLD | NEW |