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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 "loader/run_all_unittests.cc", | 173 "loader/run_all_unittests.cc", |
174 ] | 174 ] |
175 | 175 |
176 deps = [ | 176 deps = [ |
177 ":nacl", | 177 ":nacl", |
178 "//base/test:test_support", | 178 "//base/test:test_support", |
179 "//ipc:test_support", | 179 "//ipc:test_support", |
180 "//ppapi/c", | 180 "//ppapi/c", |
181 "//testing/gtest", | 181 "//testing/gtest", |
182 ] | 182 ] |
| 183 |
| 184 if (is_nacl_nonsfi) { |
| 185 sources += [ |
| 186 # TODO(hamaji): Currently, we build them twice. Stop building |
| 187 # them for components_unittests. See crbug.com/364751 |
| 188 "loader/nonsfi/nonsfi_sandbox_sigsys_unittest.cc", |
| 189 "loader/nonsfi/nonsfi_sandbox_unittest.cc", |
| 190 ] |
| 191 |
| 192 deps += [ |
| 193 ":nacl_linux", |
| 194 "//sandbox/linux:sandbox_linux_test_utils", |
| 195 ] |
| 196 } |
183 } | 197 } |
184 | 198 |
185 if (is_linux) { | 199 if (is_linux) { |
186 executable("nacl_helper") { | 200 executable("nacl_helper") { |
187 sources = [ | 201 sources = [ |
188 "loader/nacl_helper_linux.cc", | 202 "loader/nacl_helper_linux.cc", |
189 "loader/nacl_helper_linux.h", | 203 "loader/nacl_helper_linux.h", |
190 ] | 204 ] |
191 | 205 |
192 deps = [ | 206 deps = [ |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 ] | 255 ] |
242 | 256 |
243 if (use_glib) { | 257 if (use_glib) { |
244 configs += [ "//build/config/linux:glib" ] | 258 configs += [ "//build/config/linux:glib" ] |
245 } | 259 } |
246 | 260 |
247 if (use_seccomp_bpf) { | 261 if (use_seccomp_bpf) { |
248 defines += [ "USE_SECCOMP_BPF" ] | 262 defines += [ "USE_SECCOMP_BPF" ] |
249 } | 263 } |
250 } | 264 } |
| 265 |
| 266 test("nacl_helper_nonsfi_unittests") { |
| 267 sources = [ |
| 268 "loader/nonsfi/nacl_helper_nonsfi_unittests.cc", |
| 269 ] |
| 270 deps = [ |
| 271 "//base", |
| 272 "//base/test:test_launcher_nacl_nonsfi", |
| 273 ] |
| 274 } |
| 275 |
| 276 group("helper_nonsfi") { |
| 277 deps = [ |
| 278 ":nacl_helper_nonsfi_copy(//build/toolchain/nacl:newlib_pnacl_nonsfi)", |
| 279 ] |
| 280 } |
| 281 |
| 282 group("helper_nonsfi_unittests") { |
| 283 testonly = true |
| 284 data_deps = [ |
| 285 ":nacl_helper_nonsfi_unittests", |
| 286 ":nacl_helper_nonsfi_unittests_main_copy(//build/toolchain/nacl:newlib_p
nacl_nonsfi)", |
| 287 ] |
| 288 } |
| 289 |
| 290 # TODO(GYP): Delete this after we've converted everything to GN. |
| 291 # The _run targets exist only for compatibility w/ GYP. |
| 292 group("nacl_helper_nonsfi_unittests_run") { |
| 293 testonly = true |
| 294 data_deps = [ |
| 295 ":helper_nonsfi_unittests", |
| 296 ] |
| 297 } |
251 } | 298 } |
252 | 299 |
253 if (is_nacl_nonsfi) { | 300 if (is_nacl_nonsfi) { |
254 executable("nacl_helper_nonsfi_nexe") { | 301 executable("nacl_helper_nonsfi_nexe") { |
255 output_name = "nacl_helper_nonsfi" | 302 output_name = "nacl_helper_nonsfi" |
256 set_sources_assignment_filter([]) | 303 set_sources_assignment_filter([]) |
257 sources = [ | 304 sources = [ |
258 "common/nacl_messages.cc", | 305 "common/nacl_messages.cc", |
259 "common/nacl_messages.h", | 306 "common/nacl_messages.h", |
260 "common/nacl_types.cc", | 307 "common/nacl_types.cc", |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 sources = [ | 353 sources = [ |
307 "${root_out_dir}/nacl_helper_nonsfi", | 354 "${root_out_dir}/nacl_helper_nonsfi", |
308 ] | 355 ] |
309 outputs = [ | 356 outputs = [ |
310 "${root_build_dir}/{{source_file_part}}", | 357 "${root_build_dir}/{{source_file_part}}", |
311 ] | 358 ] |
312 deps = [ | 359 deps = [ |
313 ":nacl_helper_nonsfi_nexe", | 360 ":nacl_helper_nonsfi_nexe", |
314 ] | 361 ] |
315 } | 362 } |
316 } | |
317 | 363 |
318 group("helper_nonsfi") { | 364 test("nacl_helper_nonsfi_unittests_main") { |
319 deps = [ | 365 sources = [ |
320 ":nacl_helper_nonsfi_copy(//build/toolchain/nacl:newlib_pnacl_nonsfi)", | 366 "loader/nonsfi/nonsfi_sandbox_sigsys_unittest.cc", |
321 ] | 367 "loader/nonsfi/nonsfi_sandbox_unittest.cc", |
| 368 "loader/nonsfi/run_all_unittests.cc", |
| 369 ] |
| 370 deps = [ |
| 371 ":nacl_helper_nonsfi_sandbox", |
| 372 "//base", |
| 373 "//base/test:test_support", |
| 374 "//content", |
| 375 "//native_client/src/nonsfi/irt:nacl_sys_private", |
| 376 "//native_client/src/untrusted/nacl:nacl", |
| 377 "//sandbox/linux:sandbox", |
| 378 "//sandbox/linux:sandbox_linux_test_utils", |
| 379 "//sandbox/linux:sandbox_services_headers", |
| 380 "//testing/gtest", |
| 381 ] |
| 382 } |
| 383 |
| 384 copy("nacl_helper_nonsfi_unittests_main_copy") { |
| 385 testonly = true |
| 386 sources = [ |
| 387 "${root_out_dir}/nacl_helper_nonsfi_unittests_main", |
| 388 ] |
| 389 outputs = [ |
| 390 "${root_build_dir}/{{source_file_part}}", |
| 391 ] |
| 392 deps = [ |
| 393 ":nacl_helper_nonsfi_unittests_main", |
| 394 ] |
| 395 } |
322 } | 396 } |
323 } | 397 } |
324 | 398 |
325 # TODO(brettw) move to //components/nacl/common:switches | 399 # TODO(brettw) move to //components/nacl/common:switches |
326 source_set("nacl_switches") { | 400 source_set("nacl_switches") { |
327 sources = [ | 401 sources = [ |
328 "common/nacl_switches.cc", | 402 "common/nacl_switches.cc", |
329 "common/nacl_switches.h", | 403 "common/nacl_switches.h", |
330 ] | 404 ] |
331 } | 405 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 | 439 |
366 if (is_linux) { | 440 if (is_linux) { |
367 sources += [ | 441 sources += [ |
368 "common/nacl_paths.cc", | 442 "common/nacl_paths.cc", |
369 "common/nacl_paths.h", | 443 "common/nacl_paths.h", |
370 ] | 444 ] |
371 | 445 |
372 defines = [ "__STDC_LIMIT_MACROS=1" ] | 446 defines = [ "__STDC_LIMIT_MACROS=1" ] |
373 } | 447 } |
374 } | 448 } |
OLD | NEW |