| 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 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("//testing/test.gni") | 7 import("//testing/test.gni") |
| 8 | 8 |
| 9 if (is_android) { | 9 if (is_android) { |
| 10 import("//build/config/android/rules.gni") | 10 import("//build/config/android/rules.gni") |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 group("sandbox") { | 35 group("sandbox") { |
| 36 public_deps = [ | 36 public_deps = [ |
| 37 ":sandbox_services", | 37 ":sandbox_services", |
| 38 ] | 38 ] |
| 39 | 39 |
| 40 if (compile_suid_client || is_nacl_nonsfi) { | 40 if (compile_suid_client || is_nacl_nonsfi) { |
| 41 public_deps += [ ":suid_sandbox_client" ] | 41 public_deps += [ ":suid_sandbox_client" ] |
| 42 } | 42 } |
| 43 if (use_seccomp_bpf || is_nacl_nonsfi) { | 43 if (use_seccomp_bpf || is_nacl_nonsfi) { |
| 44 public_deps += [ | 44 public_deps += [ ":seccomp_bpf" ] |
| 45 ":seccomp_bpf", | |
| 46 ":seccomp_bpf_helpers", | |
| 47 ] | |
| 48 } | 45 } |
| 49 } | 46 } |
| 50 | 47 |
| 51 source_set("sandbox_linux_test_utils") { | 48 source_set("sandbox_linux_test_utils") { |
| 52 testonly = true | 49 testonly = true |
| 53 sources = [ | 50 sources = [ |
| 54 "tests/sandbox_test_runner.cc", | 51 "tests/sandbox_test_runner.cc", |
| 55 "tests/sandbox_test_runner.h", | 52 "tests/sandbox_test_runner.h", |
| 56 "tests/sandbox_test_runner_function_pointer.cc", | 53 "tests/sandbox_test_runner_function_pointer.cc", |
| 57 "tests/sandbox_test_runner_function_pointer.h", | 54 "tests/sandbox_test_runner_function_pointer.h", |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 "bpf_dsl/errorcode.h", | 211 "bpf_dsl/errorcode.h", |
| 215 "bpf_dsl/linux_syscall_ranges.h", | 212 "bpf_dsl/linux_syscall_ranges.h", |
| 216 "bpf_dsl/policy.cc", | 213 "bpf_dsl/policy.cc", |
| 217 "bpf_dsl/policy.h", | 214 "bpf_dsl/policy.h", |
| 218 "bpf_dsl/policy_compiler.cc", | 215 "bpf_dsl/policy_compiler.cc", |
| 219 "bpf_dsl/policy_compiler.h", | 216 "bpf_dsl/policy_compiler.h", |
| 220 "bpf_dsl/seccomp_macros.h", | 217 "bpf_dsl/seccomp_macros.h", |
| 221 "bpf_dsl/syscall_set.cc", | 218 "bpf_dsl/syscall_set.cc", |
| 222 "bpf_dsl/syscall_set.h", | 219 "bpf_dsl/syscall_set.h", |
| 223 "bpf_dsl/trap_registry.h", | 220 "bpf_dsl/trap_registry.h", |
| 221 "seccomp-bpf-helpers/baseline_policy.cc", |
| 222 "seccomp-bpf-helpers/baseline_policy.h", |
| 223 "seccomp-bpf-helpers/sigsys_handlers.cc", |
| 224 "seccomp-bpf-helpers/sigsys_handlers.h", |
| 225 "seccomp-bpf-helpers/syscall_parameters_restrictions.cc", |
| 226 "seccomp-bpf-helpers/syscall_parameters_restrictions.h", |
| 227 "seccomp-bpf-helpers/syscall_sets.cc", |
| 228 "seccomp-bpf-helpers/syscall_sets.h", |
| 224 "seccomp-bpf/die.cc", | 229 "seccomp-bpf/die.cc", |
| 225 "seccomp-bpf/die.h", | 230 "seccomp-bpf/die.h", |
| 226 "seccomp-bpf/sandbox_bpf.cc", | 231 "seccomp-bpf/sandbox_bpf.cc", |
| 227 "seccomp-bpf/sandbox_bpf.h", | 232 "seccomp-bpf/sandbox_bpf.h", |
| 228 "seccomp-bpf/syscall.cc", | 233 "seccomp-bpf/syscall.cc", |
| 229 "seccomp-bpf/syscall.h", | 234 "seccomp-bpf/syscall.h", |
| 230 "seccomp-bpf/trap.cc", | 235 "seccomp-bpf/trap.cc", |
| 231 "seccomp-bpf/trap.h", | 236 "seccomp-bpf/trap.h", |
| 232 ] | 237 ] |
| 233 defines = [ "SANDBOX_IMPLEMENTATION" ] | 238 defines = [ "SANDBOX_IMPLEMENTATION" ] |
| 234 | 239 |
| 235 public_deps = [ | 240 public_deps = [ |
| 236 ":sandbox_services_headers", | 241 ":sandbox_services_headers", |
| 237 ] | 242 ] |
| 238 deps = [ | 243 deps = [ |
| 239 ":sandbox_services", | 244 ":sandbox_services", |
| 240 "//base", | 245 "//base", |
| 241 ] | 246 ] |
| 242 | 247 |
| 243 if (is_nacl_nonsfi) { | 248 if (is_nacl_nonsfi) { |
| 244 cflags = [ "-fgnu-inline-asm" ] | 249 cflags = [ "-fgnu-inline-asm" ] |
| 245 sources -= [ | 250 sources -= [ |
| 246 "bpf_dsl/bpf_dsl_forward.h", | 251 "bpf_dsl/bpf_dsl_forward.h", |
| 247 "bpf_dsl/bpf_dsl_impl.h", | 252 "bpf_dsl/bpf_dsl_impl.h", |
| 248 "bpf_dsl/cons.h", | 253 "bpf_dsl/cons.h", |
| 249 "bpf_dsl/errorcode.h", | 254 "bpf_dsl/errorcode.h", |
| 250 "bpf_dsl/linux_syscall_ranges.h", | 255 "bpf_dsl/linux_syscall_ranges.h", |
| 251 "bpf_dsl/seccomp_macros.h", | 256 "bpf_dsl/seccomp_macros.h", |
| 252 "bpf_dsl/trap_registry.h", | 257 "bpf_dsl/trap_registry.h", |
| 253 ] | |
| 254 } | |
| 255 } | |
| 256 | |
| 257 component("seccomp_bpf_helpers") { | |
| 258 sources = [ | |
| 259 "seccomp-bpf-helpers/baseline_policy.cc", | |
| 260 "seccomp-bpf-helpers/baseline_policy.h", | |
| 261 "seccomp-bpf-helpers/sigsys_handlers.cc", | |
| 262 "seccomp-bpf-helpers/sigsys_handlers.h", | |
| 263 "seccomp-bpf-helpers/syscall_parameters_restrictions.cc", | |
| 264 "seccomp-bpf-helpers/syscall_parameters_restrictions.h", | |
| 265 "seccomp-bpf-helpers/syscall_sets.cc", | |
| 266 "seccomp-bpf-helpers/syscall_sets.h", | |
| 267 ] | |
| 268 defines = [ "SANDBOX_IMPLEMENTATION" ] | |
| 269 | |
| 270 deps = [ | |
| 271 ":sandbox_services", | |
| 272 ":seccomp_bpf", | |
| 273 "//base", | |
| 274 ] | |
| 275 | |
| 276 if (is_nacl_nonsfi) { | |
| 277 sources -= [ | |
| 278 "seccomp-bpf-helpers/baseline_policy.cc", | 258 "seccomp-bpf-helpers/baseline_policy.cc", |
| 279 "seccomp-bpf-helpers/baseline_policy.h", | 259 "seccomp-bpf-helpers/baseline_policy.h", |
| 280 "seccomp-bpf-helpers/syscall_sets.cc", | 260 "seccomp-bpf-helpers/syscall_sets.cc", |
| 281 "seccomp-bpf-helpers/syscall_sets.h", | 261 "seccomp-bpf-helpers/syscall_sets.h", |
| 282 ] | 262 ] |
| 283 configs += [ ":nacl_nonsfi_warnings" ] | 263 configs += [ ":nacl_nonsfi_warnings" ] |
| 284 } | 264 } |
| 285 } | 265 } |
| 286 | 266 |
| 287 if (is_linux) { | 267 if (is_linux) { |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 | 431 |
| 452 if (is_android) { | 432 if (is_android) { |
| 453 # TODO(GYP_GONE) Delete this after we've converted everything to GN. | 433 # TODO(GYP_GONE) Delete this after we've converted everything to GN. |
| 454 group("sandbox_linux_unittests_deps") { | 434 group("sandbox_linux_unittests_deps") { |
| 455 testonly = true | 435 testonly = true |
| 456 deps = [ | 436 deps = [ |
| 457 ":sandbox_linux_unittests", | 437 ":sandbox_linux_unittests", |
| 458 ] | 438 ] |
| 459 } | 439 } |
| 460 } | 440 } |
| OLD | NEW |