OLD | NEW |
---|---|
1 # Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2015 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 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
6 import("//build/config/nacl/config.gni") | 6 import("//build/config/nacl/config.gni") |
7 import("//build/config/ui.gni") | 7 import("//build/config/ui.gni") |
8 import("//testing/test.gni") | 8 import("//testing/test.gni") |
9 | 9 |
10 if (enable_nacl) { | 10 if (enable_nacl) { |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
172 "loader/run_all_unittests.cc", | 172 "loader/run_all_unittests.cc", |
173 ] | 173 ] |
174 | 174 |
175 deps = [ | 175 deps = [ |
176 ":nacl", | 176 ":nacl", |
177 "//base/test:test_support", | 177 "//base/test:test_support", |
178 "//ipc:test_support", | 178 "//ipc:test_support", |
179 "//ppapi/c", | 179 "//ppapi/c", |
180 "//testing/gtest", | 180 "//testing/gtest", |
181 ] | 181 ] |
182 | |
183 if (is_nacl_nonsfi) { | |
184 sources += [ | |
185 # TODO(hamaji): Currently, we build them twice. Stop building | |
186 # them for components_unittests. See crbug.com/364751 | |
187 "loader/nonsfi/nonsfi_sandbox_sigsys_unittest.cc", | |
188 "loader/nonsfi/nonsfi_sandbox_unittest.cc", | |
189 ] | |
190 | |
191 deps += [ | |
192 ":nacl_linux", | |
193 "//sandbox/linux:sandbox_linux_test_utils", | |
194 ] | |
195 } | |
182 } | 196 } |
183 | 197 |
184 if (is_linux) { | 198 if (is_linux) { |
185 executable("nacl_helper") { | 199 executable("nacl_helper") { |
186 sources = [ | 200 sources = [ |
187 "loader/nacl_helper_linux.cc", | 201 "loader/nacl_helper_linux.cc", |
188 "loader/nacl_helper_linux.h", | 202 "loader/nacl_helper_linux.h", |
189 ] | 203 ] |
190 | 204 |
191 deps = [ | 205 deps = [ |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
240 ] | 254 ] |
241 | 255 |
242 if (use_glib) { | 256 if (use_glib) { |
243 configs += [ "//build/config/linux:glib" ] | 257 configs += [ "//build/config/linux:glib" ] |
244 } | 258 } |
245 | 259 |
246 if (use_seccomp_bpf) { | 260 if (use_seccomp_bpf) { |
247 defines += [ "USE_SECCOMP_BPF" ] | 261 defines += [ "USE_SECCOMP_BPF" ] |
248 } | 262 } |
249 } | 263 } |
264 | |
265 test("nacl_helper_nonsfi_unittests") { | |
266 sources = [ | |
267 "loader/nonsfi/nacl_helper_nonsfi_unittests.cc", | |
268 ] | |
269 deps = [ | |
270 "//base", | |
271 "//base/test:test_launcher_nacl_nonsfi", | |
272 ] | |
273 } | |
250 } | 274 } |
251 | 275 |
252 if (is_nacl_nonsfi) { | 276 if (is_nacl_nonsfi) { |
253 executable("nacl_helper_nonsfi_nexe") { | 277 executable("nacl_helper_nonsfi_nexe") { |
254 output_name = "nacl_helper_nonsfi" | 278 output_name = "nacl_helper_nonsfi" |
255 set_sources_assignment_filter([]) | 279 set_sources_assignment_filter([]) |
256 sources = [ | 280 sources = [ |
257 "common/nacl_messages.cc", | 281 "common/nacl_messages.cc", |
258 "common/nacl_messages.h", | 282 "common/nacl_messages.h", |
259 "common/nacl_types.cc", | 283 "common/nacl_types.cc", |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
305 sources = [ | 329 sources = [ |
306 "${root_out_dir}/nacl_helper_nonsfi", | 330 "${root_out_dir}/nacl_helper_nonsfi", |
307 ] | 331 ] |
308 outputs = [ | 332 outputs = [ |
309 "${root_build_dir}/{{source_file_part}}", | 333 "${root_build_dir}/{{source_file_part}}", |
310 ] | 334 ] |
311 deps = [ | 335 deps = [ |
312 ":nacl_helper_nonsfi_nexe", | 336 ":nacl_helper_nonsfi_nexe", |
313 ] | 337 ] |
314 } | 338 } |
339 | |
340 test("nacl_helper_nonsfi_unittests_main") { | |
341 sources = [ | |
342 "loader/nonsfi/nonsfi_sandbox_sigsys_unittest.cc", | |
343 "loader/nonsfi/nonsfi_sandbox_unittest.cc", | |
344 "loader/nonsfi/run_all_unittests.cc", | |
345 ] | |
346 deps = [ | |
347 ":nacl_helper_nonsfi_sandbox", | |
348 "//base", | |
349 "//base/test:test_support_nonsfi", | |
350 "//content", | |
351 "//native_client/src/nonsfi/irt:nacl_sys_private", | |
352 "//native_client/src/untrusted/nacl:nacl", | |
353 "//sandbox/linux:sandbox", | |
354 "//sandbox/linux:sandbox_linux_test_utils", | |
355 "//testing/gtest", | |
356 ] | |
357 } | |
358 | |
359 copy("nacl_helper_nonsfi_unittests_main_copy") { | |
360 testonly = true | |
361 sources = [ | |
362 "${root_out_dir}/nacl_helper_nonsfi_unittests_main", | |
363 ] | |
364 outputs = [ | |
365 "${root_build_dir}/{{source_file_part}}", | |
Mark Seaborn
2015/12/03 19:05:07
Does {{source_file_part}} expand to "nacl_helper_n
Petr Hosek
2015/12/04 05:57:46
Yes and no, this is the preferred GN way.
| |
366 ] | |
367 deps = [ | |
368 ":nacl_helper_nonsfi_unittests_main", | |
369 ] | |
370 } | |
315 } | 371 } |
316 | 372 |
317 group("helper_nonsfi") { | 373 group("helper_nonsfi") { |
318 deps = [ | 374 deps = [ |
319 ":nacl_helper_nonsfi_copy(//build/toolchain/nacl:newlib_pnacl_nonsfi)", | 375 ":nacl_helper_nonsfi_copy(//build/toolchain/nacl:newlib_pnacl_nonsfi)", |
320 ] | 376 ] |
321 } | 377 } |
378 | |
379 group("helper_nonsfi_unittests") { | |
380 testonly = true | |
381 deps = [ | |
382 ":nacl_helper_nonsfi_unittests", | |
383 ":nacl_helper_nonsfi_unittests_main_copy(//build/toolchain/nacl:newlib_pna cl_nonsfi)", | |
384 ] | |
385 } | |
322 } | 386 } |
323 | 387 |
324 # TODO(brettw) move to //components/nacl/common:switches | 388 # TODO(brettw) move to //components/nacl/common:switches |
325 source_set("nacl_switches") { | 389 source_set("nacl_switches") { |
326 sources = [ | 390 sources = [ |
327 "common/nacl_switches.cc", | 391 "common/nacl_switches.cc", |
328 "common/nacl_switches.h", | 392 "common/nacl_switches.h", |
329 ] | 393 ] |
330 } | 394 } |
331 | 395 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
364 | 428 |
365 if (is_linux) { | 429 if (is_linux) { |
366 sources += [ | 430 sources += [ |
367 "common/nacl_paths.cc", | 431 "common/nacl_paths.cc", |
368 "common/nacl_paths.h", | 432 "common/nacl_paths.h", |
369 ] | 433 ] |
370 | 434 |
371 defines = [ "__STDC_LIMIT_MACROS=1" ] | 435 defines = [ "__STDC_LIMIT_MACROS=1" ] |
372 } | 436 } |
373 } | 437 } |
OLD | NEW |