OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libppapi.so', | 96 '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64/libppapi.so', |
97 ], | 97 ], |
98 'extra_deps_glibc32': [ | 98 'extra_deps_glibc32': [ |
99 '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libppapi_cpp.so', | 99 '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libppapi_cpp.so', |
100 '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libppapi.so', | 100 '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32/libppapi.so', |
101 ], | 101 ], |
102 'extra_deps_arm': [ | 102 'extra_deps_arm': [ |
103 '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libppapi_cpp.a', | 103 '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libppapi_cpp.a', |
104 '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libppapi.a', | 104 '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm/libppapi.a', |
105 ], | 105 ], |
| 106 'extra_deps_pnacl': [ |
| 107 '<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_newlib/lib/libppapi_cpp.a', |
| 108 '<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_newlib/lib/libppapi.a', |
| 109 ], |
106 'sources': [ | 110 'sources': [ |
107 '<@(test_common_source_files)', | 111 '<@(test_common_source_files)', |
108 '<@(test_nacl_source_files)', | 112 '<@(test_nacl_source_files)', |
109 ], | 113 ], |
110 'extra_args': [ | 114 'extra_args': [ |
111 '--strip-all', | 115 '--strip-all', |
112 ], | 116 ], |
113 }, | 117 }, |
114 'conditions': [ | 118 'conditions': [ |
115 ['target_arch!="arm"', { | 119 ['target_arch!="arm"', { |
| 120 # This is user code (vs IRT code), so tls accesses do not |
| 121 # need to be indirect through a function call. |
| 122 # For PNaCl, the -mtls-use-call flag is localized to the |
| 123 # IRT's translation command, so it is unnecessary to |
| 124 # counteract that flag here. |
116 'variables': { | 125 'variables': { |
117 'compile_flags': [ | 126 'gcc_compile_flags': [ |
118 '-mno-tls-use-call', | 127 '-mno-tls-use-call', |
119 ], | 128 ], |
120 }, | 129 }, |
121 }], | 130 }], |
122 ['target_arch!="arm" and disable_glibc==0', { | 131 ['target_arch!="arm" and disable_glibc==0', { |
123 'variables': { | 132 'variables': { |
124 'build_glibc': 1, | 133 'build_glibc': 1, |
125 # NOTE: Use /lib, not /lib64 here; it is a symbolic link which | 134 # NOTE: Use /lib, not /lib64 here; it is a symbolic link which |
126 # doesn't work on Windows. | 135 # doesn't work on Windows. |
127 'libdir_glibc64': '>(nacl_glibc_tc_root)/x86_64-nacl/lib', | 136 'libdir_glibc64': '>(nacl_glibc_tc_root)/x86_64-nacl/lib', |
(...skipping 18 matching lines...) Expand all Loading... |
146 '--library-path=>(libdir_glibc32)', | 155 '--library-path=>(libdir_glibc32)', |
147 '--library-path=<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32', | 156 '--library-path=<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32', |
148 '--library-path=<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64', | 157 '--library-path=<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64', |
149 '--output=>(nmf_glibc)', | 158 '--output=>(nmf_glibc)', |
150 '--stage-dependencies=<(PRODUCT_DIR)', | 159 '--stage-dependencies=<(PRODUCT_DIR)', |
151 ], | 160 ], |
152 'msvs_cygwin_shell': 1, | 161 'msvs_cygwin_shell': 1, |
153 }, | 162 }, |
154 ], | 163 ], |
155 }], | 164 }], |
| 165 # Test PNaCl pre-translated code (pre-translated to save bot time). |
| 166 # We only care about testing that code generation is correct, |
| 167 # and in-browser translation is tested elsewhere. |
| 168 # NOTE: native_client/build/untrusted.gypi dictates that |
| 169 # PNaCl only generate x86-32 and x86-64 on x86 platforms, |
| 170 # or ARM on ARM platforms, not all versions always. |
| 171 # The same goes for the PNaCl shims. So, we have two variations here. |
| 172 ['disable_pnacl==0 and target_arch!="arm"', { |
| 173 'variables': { |
| 174 'build_pnacl_newlib': 1, |
| 175 'nmf_pnacl%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl.nmf', |
| 176 }, |
| 177 # Shim is a dependency for the nexe because we pre-translate. |
| 178 'dependencies': [ |
| 179 '<(DEPTH)/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_irt
_shim.gyp:pnacl_irt_shim', |
| 180 ], |
| 181 'actions': [ |
| 182 { |
| 183 'action_name': 'Generate PNACL NEWLIB NMF', |
| 184 'inputs': ['>(out_pnacl_newlib_x86_32_nexe)', |
| 185 '>(out_pnacl_newlib_x86_64_nexe)'], |
| 186 'outputs': ['>(nmf_pnacl)'], |
| 187 'action': [ |
| 188 'python', |
| 189 '<(DEPTH)/native_client_sdk/src/tools/create_nmf.py', |
| 190 '>@(_inputs)', |
| 191 '--output=>(nmf_pnacl)', |
| 192 ], |
| 193 }, |
| 194 ], |
| 195 }], |
| 196 ['disable_pnacl==0 and target_arch=="arm"', { |
| 197 'variables': { |
| 198 'build_pnacl_newlib': 1, |
| 199 'nmf_pnacl%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl.nmf', |
| 200 }, |
| 201 # Shim is a dependency for the nexe because we pre-translate. |
| 202 'dependencies': [ |
| 203 '<(DEPTH)/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_irt
_shim.gyp:pnacl_irt_shim', |
| 204 ], |
| 205 'actions': [ |
| 206 { |
| 207 'action_name': 'Generate PNACL NEWLIB NMF', |
| 208 'inputs': ['>(out_pnacl_newlib_arm_nexe)'], |
| 209 'outputs': ['>(nmf_pnacl)'], |
| 210 'action': [ |
| 211 'python', |
| 212 '<(DEPTH)/native_client_sdk/src/tools/create_nmf.py', |
| 213 '>@(_inputs)', |
| 214 '--output=>(nmf_pnacl)', |
| 215 ], |
| 216 }, |
| 217 ], |
| 218 }], |
156 ], | 219 ], |
157 }, | 220 }, |
158 ], | 221 ], |
159 } | 222 } |
OLD | NEW |