123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- # Copyright 2015 The Chromium Authors. All rights reserved.
- # Use of this source code is governed by a BSD-style license that can be
- # found in the LICENSE file.
- import("//build/buildflag_header.gni")
- import("//components/nacl/features.gni")
- import("//mojo/public/tools/bindings/mojom.gni")
- if (enable_nacl) {
- # This is separate so it can be used by ../broker:nacl64.
- static_library("minimal") {
- sources = [
- "nacl_cmd_line.cc",
- "nacl_cmd_line.h",
- "nacl_constants.cc",
- "nacl_constants.h",
- "nacl_messages.cc",
- "nacl_messages.h",
- "nacl_process_type.h",
- "nacl_service.cc",
- "nacl_service.h",
- "nacl_types.cc",
- "nacl_types.h",
- "nacl_types_param_traits.cc",
- "nacl_types_param_traits.h",
- ]
- public_deps = [
- ":minimal_content_dummy",
- ":switches",
- "//ipc",
- "//sandbox/policy",
- ]
- deps = [
- "//base",
- "//base:base_static",
- "//content/public/common:content_descriptors",
- "//mojo/core/embedder",
- "//native_client/src/trusted/error_code",
- "//services/service_manager/public/cpp",
- ]
- }
- # This exists just to make 'gn check' happy with :minimal. It can't
- # depend on //content/public/common or anything like that, because that
- # would bring in lots more than counts as "minimal" (stuff that should
- # not be in the nacl64.exe build).
- source_set("minimal_content_dummy") {
- check_includes = false
- sources = [
- "//content/public/common/content_descriptors.h",
- "//content/public/common/content_switches.h",
- "//content/public/common/process_type.h",
- ]
- # Deps required by the above headers.
- deps = [ "//media:media_buildflags" ]
- }
- static_library("common") {
- sources = [
- "nacl_host_messages.cc",
- "nacl_host_messages.h",
- "pnacl_types.cc",
- "pnacl_types.h",
- ]
- public_deps = [
- ":minimal",
- ":mojo_bindings",
- ":switches",
- "//ipc",
- ]
- deps = [
- "//base",
- "//build:chromeos_buildflags",
- "//url",
- "//url/ipc:url_ipc",
- ]
- if (is_linux || is_chromeos) {
- sources += [
- "nacl_paths.cc",
- "nacl_paths.h",
- ]
- defines = [ "__STDC_LIMIT_MACROS=1" ]
- deps += [ "//content/common:sandbox_support_linux" ]
- }
- }
- source_set("debug_exception_handler") {
- sources = []
- deps = [ "//base" ]
- if (is_win) {
- sources += [
- "nacl_debug_exception_handler_win.cc",
- "nacl_debug_exception_handler_win.h",
- ]
- }
- }
- mojom("mojo_bindings") {
- sources = [ "nacl.mojom" ]
- cpp_typemaps = [
- {
- types = [
- {
- mojom = "nacl.mojom.NaClErrorCode"
- cpp = "::NaClErrorCode"
- },
- ]
- traits_headers =
- [ "//native_client/src/trusted/service_runtime/nacl_error_code.h" ]
- traits_private_headers =
- [ "//components/nacl/common/nacl_types_param_traits.h" ]
- traits_public_deps = [
- ":minimal",
- "//native_client/src/trusted/error_code",
- ]
- traits_deps = [ "//ipc" ]
- },
- ]
- }
- }
- # Depending on this allows targets to unconditionally include
- # nacl_process_type.h without testing whether nacl is enabled.
- source_set("process_type") {
- public = [ "nacl_process_type.h" ]
- deps = [ "//content/public/common" ]
- }
- static_library("switches") {
- sources = [
- "nacl_switches.cc",
- "nacl_switches.h",
- ]
- }
- buildflag_header("buildflags") {
- header = "buildflags.h"
- flags = [ "ENABLE_NACL=$enable_nacl" ]
- }
|