Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / sandbox / win / BUILD.gn
index 3c5bca6..69e88d4 100644 (file)
-# Copyright 2014 The Chromium Authors. All rights reserved.\r
-# Use of this source code is governed by a BSD-style license that can be\r
-# found in the LICENSE file.\r
-\r
-source_set("sandbox") {\r
-  sources = [\r
-    "src/acl.cc",\r
-    "src/acl.h",\r
-    "src/app_container.cc",\r
-    "src/app_container.h",\r
-    "src/broker_services.cc",\r
-    "src/broker_services.h",\r
-    "src/crosscall_client.h",\r
-    "src/crosscall_params.h",\r
-    "src/crosscall_server.cc",\r
-    "src/crosscall_server.h",\r
-    "src/eat_resolver.cc",\r
-    "src/eat_resolver.h",\r
-    "src/filesystem_dispatcher.cc",\r
-    "src/filesystem_dispatcher.h",\r
-    "src/filesystem_interception.cc",\r
-    "src/filesystem_interception.h",\r
-    "src/filesystem_policy.cc",\r
-    "src/filesystem_policy.h",\r
-    "src/handle_closer.cc",\r
-    "src/handle_closer.h",\r
-    "src/handle_closer_agent.cc",\r
-    "src/handle_closer_agent.h",\r
-    "src/handle_dispatcher.cc",\r
-    "src/handle_dispatcher.h",\r
-    "src/handle_interception.cc",\r
-    "src/handle_interception.h",\r
-    "src/handle_policy.cc",\r
-    "src/handle_policy.h",\r
-    "src/handle_table.cc",\r
-    "src/handle_table.h",\r
-    "src/interception.cc",\r
-    "src/interception.h",\r
-    "src/interception_agent.cc",\r
-    "src/interception_agent.h",\r
-    "src/interception_internal.h",\r
-    "src/interceptors.h",\r
-    "src/internal_types.h",\r
-    "src/ipc_tags.h",\r
-    "src/job.cc",\r
-    "src/job.h",\r
-    "src/named_pipe_dispatcher.cc",\r
-    "src/named_pipe_dispatcher.h",\r
-    "src/named_pipe_interception.cc",\r
-    "src/named_pipe_interception.h",\r
-    "src/named_pipe_policy.cc",\r
-    "src/named_pipe_policy.h",\r
-    "src/nt_internals.h",\r
-    "src/policy_broker.cc",\r
-    "src/policy_broker.h",\r
-    "src/policy_engine_opcodes.cc",\r
-    "src/policy_engine_opcodes.h",\r
-    "src/policy_engine_params.h",\r
-    "src/policy_engine_processor.cc",\r
-    "src/policy_engine_processor.h",\r
-    "src/policy_low_level.cc",\r
-    "src/policy_low_level.h",\r
-    "src/policy_params.h",\r
-    "src/policy_target.cc",\r
-    "src/policy_target.h",\r
-    "src/process_mitigations.cc",\r
-    "src/process_mitigations.h",\r
-    "src/process_thread_dispatcher.cc",\r
-    "src/process_thread_dispatcher.h",\r
-    "src/process_thread_interception.cc",\r
-    "src/process_thread_interception.h",\r
-    "src/process_thread_policy.cc",\r
-    "src/process_thread_policy.h",\r
-    "src/registry_dispatcher.cc",\r
-    "src/registry_dispatcher.h",\r
-    "src/registry_interception.cc",\r
-    "src/registry_interception.h",\r
-    "src/registry_policy.cc",\r
-    "src/registry_policy.h",\r
-    "src/resolver.cc",\r
-    "src/resolver.h",\r
-    "src/restricted_token_utils.cc",\r
-    "src/restricted_token_utils.h",\r
-    "src/restricted_token.cc",\r
-    "src/restricted_token.h",\r
-    "src/sandbox_factory.h",\r
-    "src/sandbox_globals.cc",\r
-    "src/sandbox_nt_types.h",\r
-    "src/sandbox_nt_util.cc",\r
-    "src/sandbox_nt_util.h",\r
-    "src/sandbox_policy_base.cc",\r
-    "src/sandbox_policy_base.h",\r
-    "src/sandbox_policy.h",\r
-    "src/sandbox_types.h",\r
-    "src/sandbox_utils.cc",\r
-    "src/sandbox_utils.h",\r
-    "src/sandbox.cc",\r
-    "src/sandbox.h",\r
-    "src/security_level.h",\r
-    "src/service_resolver.cc",\r
-    "src/service_resolver.h",\r
-    "src/shared_handles.cc",\r
-    "src/shared_handles.h",\r
-    "src/sharedmem_ipc_client.cc",\r
-    "src/sharedmem_ipc_client.h",\r
-    "src/sharedmem_ipc_server.cc",\r
-    "src/sharedmem_ipc_server.h",\r
-    "src/sid.cc",\r
-    "src/sid.h",\r
-    "src/sync_dispatcher.cc",\r
-    "src/sync_dispatcher.h",\r
-    "src/sync_interception.cc",\r
-    "src/sync_interception.h",\r
-    "src/sync_policy.cc",\r
-    "src/sync_policy.h",\r
-    "src/target_interceptions.cc",\r
-    "src/target_interceptions.h",\r
-    "src/target_process.cc",\r
-    "src/target_process.h",\r
-    "src/target_services.cc",\r
-    "src/target_services.h",\r
-    "src/win_utils.cc",\r
-    "src/win_utils.h",\r
-    "src/win2k_threadpool.cc",\r
-    "src/win2k_threadpool.h",\r
-    "src/window.cc",\r
-    "src/window.h",\r
-  ]\r
-\r
-  if (cpu_arch == "x64" ){\r
-    sources += [\r
-      "src/interceptors_64.cc",\r
-      "src/interceptors_64.h",\r
-      "src/resolver_64.cc",\r
-      "src/service_resolver_64.cc",\r
-      "src/Wow64_64.cc",\r
-    ]\r
-  } else if (cpu_arch == "x86") {\r
-    sources += [\r
-      "src/resolver_32.cc",\r
-      "src/service_resolver_32.cc",\r
-      "src/sidestep_resolver.cc",\r
-      "src/sidestep_resolver.h",\r
-      "src/sidestep/ia32_modrm_map.cpp",\r
-      "src/sidestep/ia32_opcode_map.cpp",\r
-      "src/sidestep/mini_disassembler_types.h",\r
-      "src/sidestep/mini_disassembler.cpp",\r
-      "src/sidestep/mini_disassembler.h",\r
-      "src/sidestep/preamble_patcher_with_stub.cpp",\r
-      "src/sidestep/preamble_patcher.h",\r
-      "src/Wow64.cc",\r
-      "src/Wow64.h",\r
-    ]\r
-  }\r
-\r
-  deps = [\r
-    ":copy_wow_helper",\r
-    "//base",\r
-  ]\r
-}\r
-\r
-if (cpu_arch == "x86") {\r
-  # Make a target that copies the wow_helper files to the out dir.\r
-  #\r
-  # TODO(brettw) we can probably just build this now that we have proper\r
-  # toolchain support.\r
-  copy("copy_wow_helper") {\r
-    sources = [\r
-      "wow_helper/wow_helper.exe",\r
-      "wow_helper/wow_helper.pdb",\r
-    ]\r
-    outputs = [ "$root_out_dir/{{source_file_part}}" ]\r
-  }\r
-}\r
-\r
-test("sbox_integration_tests") {\r
-  sources = [\r
-    "src/app_container_test.cc",\r
-    "src/file_policy_test.cc",\r
-    "src/handle_inheritance_test.cc",\r
-    "src/handle_policy_test.cc",\r
-    "tests/integration_tests/integration_tests_test.cc",\r
-    "src/handle_closer_test.cc",\r
-    "src/integrity_level_test.cc",\r
-    "src/ipc_ping_test.cc",\r
-    "src/named_pipe_policy_test.cc",\r
-    "src/policy_target_test.cc",\r
-    "src/process_mitigations_test.cc",\r
-    "src/process_policy_test.cc",\r
-    "src/registry_policy_test.cc",\r
-    "src/sync_policy_test.cc",\r
-    "src/sync_policy_test.h",\r
-    "src/unload_dll_test.cc",\r
-    "tests/common/controller.cc",\r
-    "tests/common/controller.h",\r
-    "tests/common/test_utils.cc",\r
-    "tests/common/test_utils.h",\r
-    "tests/integration_tests/integration_tests.cc",\r
-  ]\r
-\r
-  deps = [\r
-    ":sandbox",\r
-    "//testing/gtest",\r
-  ]\r
-}\r
-\r
-test("sbox_validation_tests") {\r
-  sources = [\r
-    "tests/common/controller.cc",\r
-    "tests/common/controller.h",\r
-    "tests/validation_tests/unit_tests.cc",\r
-    "tests/validation_tests/commands.cc",\r
-    "tests/validation_tests/commands.h",\r
-    "tests/validation_tests/suite.cc",\r
-  ]\r
-\r
-  deps = [\r
-    ":sandbox",\r
-    "//testing/gtest",\r
-  ]\r
-}\r
-\r
-test("sbox_unittests") {\r
-  sources = [\r
-    "src/app_container_unittest.cc",\r
-    "src/interception_unittest.cc",\r
-    "src/service_resolver_unittest.cc",\r
-    "src/restricted_token_unittest.cc",\r
-    "src/job_unittest.cc",\r
-    "src/sid_unittest.cc",\r
-    "src/policy_engine_unittest.cc",\r
-    "src/policy_low_level_unittest.cc",\r
-    "src/policy_opcodes_unittest.cc",\r
-    "src/ipc_unittest.cc",\r
-    "src/threadpool_unittest.cc",\r
-    "src/win_utils_unittest.cc",\r
-    "tests/common/test_utils.cc",\r
-    "tests/common/test_utils.h",\r
-    "tests/unit_tests/unit_tests.cc",\r
-  ]\r
-\r
-  deps = [\r
-    ":sandbox",\r
-    "//testing/gtest",\r
-  ]\r
-}\r
-\r
-test("sandbox_poc") {\r
-  sources = [\r
-    "sandbox_poc/main_ui_window.cc",\r
-    "sandbox_poc/main_ui_window.h",\r
-    "sandbox_poc/resource.h",\r
-    "sandbox_poc/sandbox.cc",\r
-    "sandbox_poc/sandbox.h",\r
-    "sandbox_poc/sandbox.ico",\r
-    "sandbox_poc/sandbox.rc",\r
-  ]\r
-\r
-  configs -= [ "//build/config/win:console" ]\r
-  configs += [ "//build/config/win:windowed" ]\r
-\r
-  libs = [ "comctl32.lib" ]\r
-\r
-  deps = [\r
-    ":sandbox",\r
-    ":pocdll",\r
-  ]\r
-}\r
-\r
-shared_library("pocdll") {\r
-  sources = [\r
-    "sandbox_poc/pocdll/exports.h",\r
-    "sandbox_poc/pocdll/fs.cc",\r
-    "sandbox_poc/pocdll/handles.cc",\r
-    "sandbox_poc/pocdll/invasive.cc",\r
-    "sandbox_poc/pocdll/network.cc",\r
-    "sandbox_poc/pocdll/pocdll.cc",\r
-    "sandbox_poc/pocdll/processes_and_threads.cc",\r
-    "sandbox_poc/pocdll/registry.cc",\r
-    "sandbox_poc/pocdll/spyware.cc",\r
-    "sandbox_poc/pocdll/utils.h",\r
-  ]\r
-\r
-  defines = [ "POCDLL_EXPORTS" ]\r
-}\r
+# Copyright 2014 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.
+
+source_set("sandbox") {
+  sources = [
+    "src/acl.cc",
+    "src/acl.h",
+    "src/app_container.cc",
+    "src/app_container.h",
+    "src/broker_services.cc",
+    "src/broker_services.h",
+    "src/crosscall_client.h",
+    "src/crosscall_params.h",
+    "src/crosscall_server.cc",
+    "src/crosscall_server.h",
+    "src/eat_resolver.cc",
+    "src/eat_resolver.h",
+    "src/filesystem_dispatcher.cc",
+    "src/filesystem_dispatcher.h",
+    "src/filesystem_interception.cc",
+    "src/filesystem_interception.h",
+    "src/filesystem_policy.cc",
+    "src/filesystem_policy.h",
+    "src/handle_closer.cc",
+    "src/handle_closer.h",
+    "src/handle_closer_agent.cc",
+    "src/handle_closer_agent.h",
+    "src/handle_dispatcher.cc",
+    "src/handle_dispatcher.h",
+    "src/handle_interception.cc",
+    "src/handle_interception.h",
+    "src/handle_policy.cc",
+    "src/handle_policy.h",
+    "src/handle_table.cc",
+    "src/handle_table.h",
+    "src/interception.cc",
+    "src/interception.h",
+    "src/interception_agent.cc",
+    "src/interception_agent.h",
+    "src/interception_internal.h",
+    "src/interceptors.h",
+    "src/internal_types.h",
+    "src/ipc_tags.h",
+    "src/job.cc",
+    "src/job.h",
+    "src/named_pipe_dispatcher.cc",
+    "src/named_pipe_dispatcher.h",
+    "src/named_pipe_interception.cc",
+    "src/named_pipe_interception.h",
+    "src/named_pipe_policy.cc",
+    "src/named_pipe_policy.h",
+    "src/nt_internals.h",
+    "src/policy_broker.cc",
+    "src/policy_broker.h",
+    "src/policy_engine_opcodes.cc",
+    "src/policy_engine_opcodes.h",
+    "src/policy_engine_params.h",
+    "src/policy_engine_processor.cc",
+    "src/policy_engine_processor.h",
+    "src/policy_low_level.cc",
+    "src/policy_low_level.h",
+    "src/policy_params.h",
+    "src/policy_target.cc",
+    "src/policy_target.h",
+    "src/process_mitigations.cc",
+    "src/process_mitigations.h",
+    "src/process_thread_dispatcher.cc",
+    "src/process_thread_dispatcher.h",
+    "src/process_thread_interception.cc",
+    "src/process_thread_interception.h",
+    "src/process_thread_policy.cc",
+    "src/process_thread_policy.h",
+    "src/registry_dispatcher.cc",
+    "src/registry_dispatcher.h",
+    "src/registry_interception.cc",
+    "src/registry_interception.h",
+    "src/registry_policy.cc",
+    "src/registry_policy.h",
+    "src/resolver.cc",
+    "src/resolver.h",
+    "src/restricted_token_utils.cc",
+    "src/restricted_token_utils.h",
+    "src/restricted_token.cc",
+    "src/restricted_token.h",
+    "src/sandbox_factory.h",
+    "src/sandbox_globals.cc",
+    "src/sandbox_nt_types.h",
+    "src/sandbox_nt_util.cc",
+    "src/sandbox_nt_util.h",
+    "src/sandbox_policy_base.cc",
+    "src/sandbox_policy_base.h",
+    "src/sandbox_policy.h",
+    "src/sandbox_types.h",
+    "src/sandbox_utils.cc",
+    "src/sandbox_utils.h",
+    "src/sandbox.cc",
+    "src/sandbox.h",
+    "src/security_level.h",
+    "src/service_resolver.cc",
+    "src/service_resolver.h",
+    "src/shared_handles.cc",
+    "src/shared_handles.h",
+    "src/sharedmem_ipc_client.cc",
+    "src/sharedmem_ipc_client.h",
+    "src/sharedmem_ipc_server.cc",
+    "src/sharedmem_ipc_server.h",
+    "src/sid.cc",
+    "src/sid.h",
+    "src/sync_dispatcher.cc",
+    "src/sync_dispatcher.h",
+    "src/sync_interception.cc",
+    "src/sync_interception.h",
+    "src/sync_policy.cc",
+    "src/sync_policy.h",
+    "src/target_interceptions.cc",
+    "src/target_interceptions.h",
+    "src/target_process.cc",
+    "src/target_process.h",
+    "src/target_services.cc",
+    "src/target_services.h",
+    "src/win_utils.cc",
+    "src/win_utils.h",
+    "src/win2k_threadpool.cc",
+    "src/win2k_threadpool.h",
+    "src/window.cc",
+    "src/window.h",
+  ]
+
+  if (cpu_arch == "x64" ){
+    sources += [
+      "src/interceptors_64.cc",
+      "src/interceptors_64.h",
+      "src/resolver_64.cc",
+      "src/service_resolver_64.cc",
+      "src/Wow64_64.cc",
+    ]
+  } else if (cpu_arch == "x86") {
+    sources += [
+      "src/resolver_32.cc",
+      "src/service_resolver_32.cc",
+      "src/sidestep_resolver.cc",
+      "src/sidestep_resolver.h",
+      "src/sidestep/ia32_modrm_map.cpp",
+      "src/sidestep/ia32_opcode_map.cpp",
+      "src/sidestep/mini_disassembler_types.h",
+      "src/sidestep/mini_disassembler.cpp",
+      "src/sidestep/mini_disassembler.h",
+      "src/sidestep/preamble_patcher_with_stub.cpp",
+      "src/sidestep/preamble_patcher.h",
+      "src/Wow64.cc",
+      "src/Wow64.h",
+    ]
+  }
+
+  deps = [
+    ":copy_wow_helper",
+    "//base",
+  ]
+}
+
+if (cpu_arch == "x86") {
+  # Make a target that copies the wow_helper files to the out dir.
+  #
+  # TODO(brettw) we can probably just build this now that we have proper
+  # toolchain support.
+  copy("copy_wow_helper") {
+    sources = [
+      "wow_helper/wow_helper.exe",
+      "wow_helper/wow_helper.pdb",
+    ]
+    outputs = [ "$root_out_dir/{{source_file_part}}" ]
+  }
+}
+
+test("sbox_integration_tests") {
+  sources = [
+    "src/app_container_test.cc",
+    "src/file_policy_test.cc",
+    "src/handle_inheritance_test.cc",
+    "src/handle_policy_test.cc",
+    "tests/integration_tests/integration_tests_test.cc",
+    "src/handle_closer_test.cc",
+    "src/integrity_level_test.cc",
+    "src/ipc_ping_test.cc",
+    "src/named_pipe_policy_test.cc",
+    "src/policy_target_test.cc",
+    "src/process_mitigations_test.cc",
+    "src/process_policy_test.cc",
+    "src/registry_policy_test.cc",
+    "src/sync_policy_test.cc",
+    "src/sync_policy_test.h",
+    "src/unload_dll_test.cc",
+    "tests/common/controller.cc",
+    "tests/common/controller.h",
+    "tests/common/test_utils.cc",
+    "tests/common/test_utils.h",
+    "tests/integration_tests/integration_tests.cc",
+  ]
+
+  deps = [
+    ":sandbox",
+    "//testing/gtest",
+  ]
+}
+
+test("sbox_validation_tests") {
+  sources = [
+    "tests/common/controller.cc",
+    "tests/common/controller.h",
+    "tests/validation_tests/unit_tests.cc",
+    "tests/validation_tests/commands.cc",
+    "tests/validation_tests/commands.h",
+    "tests/validation_tests/suite.cc",
+  ]
+
+  deps = [
+    ":sandbox",
+    "//testing/gtest",
+  ]
+}
+
+test("sbox_unittests") {
+  sources = [
+    "src/app_container_unittest.cc",
+    "src/interception_unittest.cc",
+    "src/service_resolver_unittest.cc",
+    "src/restricted_token_unittest.cc",
+    "src/job_unittest.cc",
+    "src/sid_unittest.cc",
+    "src/policy_engine_unittest.cc",
+    "src/policy_low_level_unittest.cc",
+    "src/policy_opcodes_unittest.cc",
+    "src/ipc_unittest.cc",
+    "src/threadpool_unittest.cc",
+    "src/win_utils_unittest.cc",
+    "tests/common/test_utils.cc",
+    "tests/common/test_utils.h",
+    "tests/unit_tests/unit_tests.cc",
+  ]
+
+  deps = [
+    ":sandbox",
+    "//testing/gtest",
+  ]
+}
+
+test("sandbox_poc") {
+  sources = [
+    "sandbox_poc/main_ui_window.cc",
+    "sandbox_poc/main_ui_window.h",
+    "sandbox_poc/resource.h",
+    "sandbox_poc/sandbox.cc",
+    "sandbox_poc/sandbox.h",
+    "sandbox_poc/sandbox.ico",
+    "sandbox_poc/sandbox.rc",
+  ]
+
+  configs -= [ "//build/config/win:console" ]
+  configs += [ "//build/config/win:windowed" ]
+
+  libs = [ "comctl32.lib" ]
+
+  deps = [
+    ":sandbox",
+    ":pocdll",
+  ]
+}
+
+shared_library("pocdll") {
+  sources = [
+    "sandbox_poc/pocdll/exports.h",
+    "sandbox_poc/pocdll/fs.cc",
+    "sandbox_poc/pocdll/handles.cc",
+    "sandbox_poc/pocdll/invasive.cc",
+    "sandbox_poc/pocdll/network.cc",
+    "sandbox_poc/pocdll/pocdll.cc",
+    "sandbox_poc/pocdll/processes_and_threads.cc",
+    "sandbox_poc/pocdll/registry.cc",
+    "sandbox_poc/pocdll/spyware.cc",
+    "sandbox_poc/pocdll/utils.h",
+  ]
+
+  defines = [ "POCDLL_EXPORTS" ]
+}