BUILD.gn 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. # Copyright 2015 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. import("//components/nacl/features.gni")
  5. assert(enable_nacl)
  6. static_library("browser") {
  7. sources = [
  8. "bad_message.cc",
  9. "bad_message.h",
  10. "nacl_browser.cc",
  11. "nacl_browser.h",
  12. "nacl_file_host.cc",
  13. "nacl_file_host.h",
  14. "nacl_host_message_filter.cc",
  15. "nacl_host_message_filter.h",
  16. "nacl_process_host.cc",
  17. "nacl_process_host.h",
  18. "nacl_validation_cache.cc",
  19. "nacl_validation_cache.h",
  20. "pnacl_host.cc",
  21. "pnacl_host.h",
  22. "pnacl_translation_cache.cc",
  23. "pnacl_translation_cache.h",
  24. ]
  25. deps = [
  26. "//base",
  27. "//base/third_party/dynamic_annotations",
  28. "//build:chromeos_buildflags",
  29. "//components/nacl/common",
  30. "//components/nacl/common:buildflags",
  31. "//components/nacl/common:debug_exception_handler",
  32. "//components/url_formatter",
  33. "//content/public/browser",
  34. "//content/public/common",
  35. "//net",
  36. "//ppapi/host",
  37. "//ppapi/proxy:ipc",
  38. "//ppapi/shared_impl",
  39. ]
  40. public_deps = [
  41. "//ipc",
  42. "//services/service_manager/public/mojom",
  43. ]
  44. data_deps = []
  45. if (is_win) {
  46. sources += [
  47. "nacl_broker_host_win.cc",
  48. "nacl_broker_host_win.h",
  49. "nacl_broker_service_win.cc",
  50. "nacl_broker_service_win.h",
  51. ]
  52. deps += [
  53. # This is needed for the Windows debug exception handler.
  54. "//native_client/src/trusted/service_runtime:sel",
  55. ]
  56. }
  57. if (is_linux || is_chromeos) {
  58. sources += [
  59. "../zygote/nacl_fork_delegate_linux.cc",
  60. "../zygote/nacl_fork_delegate_linux.h",
  61. ]
  62. deps += [
  63. "//sandbox/linux:sandbox_services",
  64. "//sandbox/linux:suid_sandbox_client",
  65. ]
  66. # TODO(https://crbug.com/1299021): Implement building the dependencies of
  67. # this NaCl target as ARM32 when Chrome is built for ARM64 (for
  68. # Linux/Chrome OS).
  69. if (target_cpu != "arm64") {
  70. deps += [
  71. "//components/nacl/loader:nacl_helper_integration",
  72. ]
  73. }
  74. }
  75. if (is_win && current_cpu == "x86") {
  76. data_deps += [ "//components/nacl/broker:nacl64" ]
  77. }
  78. }
  79. source_set("unit_tests") {
  80. testonly = true
  81. sources = [
  82. "nacl_file_host_unittest.cc",
  83. "nacl_process_host_unittest.cc",
  84. "nacl_validation_cache_unittest.cc",
  85. "pnacl_host_unittest.cc",
  86. "pnacl_translation_cache_unittest.cc",
  87. "test_nacl_browser_delegate.cc",
  88. "test_nacl_browser_delegate.h",
  89. ]
  90. deps = [
  91. ":browser",
  92. "//base",
  93. "//components/nacl/common",
  94. "//content/test:test_support",
  95. "//net:test_support",
  96. ]
  97. if (is_linux || is_chromeos) {
  98. sources += [ "../zygote/nacl_fork_delegate_linux_unittest.cc" ]
  99. }
  100. }