Index: sandbox/linux/BUILD.gn |
diff --git a/sandbox/linux/BUILD.gn b/sandbox/linux/BUILD.gn |
index e734324e268651d4a638227c7871deef3f8606b5..01df2aa529a3198e23b38cee81a4a1984334d3d9 100644 |
--- a/sandbox/linux/BUILD.gn |
+++ b/sandbox/linux/BUILD.gn |
@@ -3,6 +3,7 @@ |
# found in the LICENSE file. |
import("//build/config/features.gni") |
+import("//build/config/nacl/config.gni") |
import("//testing/test.gni") |
declare_args() { |
@@ -411,3 +412,44 @@ if (is_android) { |
# 'includes': [ '../../build/apk_test.gypi' ], |
# } |
} |
+ |
+if (enable_nacl) { |
+ # Must be in a config because of how GN orders flags (otherwise -Wall will |
+ # appear after this, and turn it back on). |
+ config("clang_warnings") { |
+ if (is_nacl_nonsfi) { |
+ # There are number of platform specific functions in |
+ # seccomp-bpf syscall helpers, which are not being used. |
+ cflags = [ "-Wno-unused-function" ] |
+ } |
+ } |
+ |
+ source_set("sandbox_linux_nacl_nonsfi") { |
+ cflags = [ "-fgnu-inline-asm" ] |
+ sources = [ |
+ # This is the subset of linux build target, needed for |
+ # nacl_helper_nonsfi's sandbox implementation. |
+ "bpf_dsl/bpf_dsl.cc", |
+ "bpf_dsl/codegen.cc", |
+ "bpf_dsl/policy.cc", |
+ "bpf_dsl/policy_compiler.cc", |
+ "bpf_dsl/syscall_set.cc", |
+ "seccomp-bpf-helpers/sigsys_handlers.cc", |
+ "seccomp-bpf-helpers/syscall_parameters_restrictions.cc", |
+ "seccomp-bpf/die.cc", |
+ "seccomp-bpf/sandbox_bpf.cc", |
+ "seccomp-bpf/syscall.cc", |
+ "seccomp-bpf/trap.cc", |
+ "services/credentials.cc", |
+ "services/namespace_sandbox.cc", |
+ "services/namespace_utils.cc", |
+ "services/proc_util.cc", |
+ "services/resource_limits.cc", |
+ "services/syscall_wrappers.cc", |
+ "services/thread_helpers.cc", |
+ "suid/client/setuid_sandbox_client.cc", |
+ ] |
+ |
+ configs += [ ":clang_warnings" ] |
+ } |
+} |