Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / breakpad / BUILD.gn
index ea1a6ef..56a2acb 100644 (file)
@@ -53,6 +53,8 @@ if (current_toolchain == host_toolchain && !is_win) {
       "src/processor/cfi_frame_info.h",
       "src/processor/disassembler_x86.cc",
       "src/processor/disassembler_x86.h",
+      "src/processor/dump_context.cc",
+      "src/processor/dump_object.cc",
       "src/processor/exploitability.cc",
       "src/processor/logging.cc",
       "src/processor/logging.h",
@@ -136,6 +138,8 @@ if (current_toolchain == host_toolchain && !is_win) {
       "src/processor/basic_code_module.h",
       "src/processor/basic_code_modules.cc",
       "src/processor/basic_code_modules.h",
+      "src/processor/dump_context.cc",
+      "src/processor/dump_object.cc",
       "src/processor/logging.cc",
       "src/processor/logging.h",
       "src/processor/minidump.cc",
@@ -145,6 +149,10 @@ if (current_toolchain == host_toolchain && !is_win) {
     ]
 
     configs += [ ":tools_config" ]
+
+    # There are some warnings in this code.
+    configs -= [ "//build/config/compiler:chromium_code" ]
+    configs += [ "//build/config/compiler:no_chromium_code" ]
   }
 }
 
@@ -286,7 +294,7 @@ if (is_mac) {
     ]
 
     configs += [ ":internal_config" ]
-    direct_dependent_configs = [ ":breakpad_config" ]
+    public_configs = [ ":breakpad_config" ]
 
     defines = [ "USE_PROTECTED_ALLOCATIONS=1" ]
     include_dirs = [
@@ -302,11 +310,11 @@ if (is_mac) {
   }
 
   group("client") {
-    direct_dependent_configs = [ ":client_config" ]
+    public_configs = [ ":client_config" ]
   }
 }
 
-if (is_linux || is_android) {
+if (is_linux) {
   executable("symupload") {
     sources = [
       "src/tools/linux/symupload/sym_upload.cc",
@@ -325,7 +333,7 @@ if (is_linux || is_android) {
   }
 }
 
-if (is_linux) {
+if (is_linux || is_android) {
   if (current_toolchain == host_toolchain) {
     # dump_syms is a host tool, so only compile it for the host system.
     executable("dump_syms") {
@@ -386,9 +394,18 @@ if (is_linux) {
   }
 
   static_library("client") {
+    # Want all these sources for both Linux and Android.
+    set_sources_assignment_filter([])
     sources = [
       "src/client/linux/crash_generation/crash_generation_client.cc",
       "src/client/linux/crash_generation/crash_generation_client.h",
+      "src/client/linux/dump_writer_common/mapping_info.h",
+      "src/client/linux/dump_writer_common/seccomp_unwinder.cc",
+      "src/client/linux/dump_writer_common/seccomp_unwinder.h",
+      "src/client/linux/dump_writer_common/thread_info.cc",
+      "src/client/linux/dump_writer_common/thread_info.h",
+      "src/client/linux/dump_writer_common/ucontext_reader.cc",
+      "src/client/linux/dump_writer_common/ucontext_reader.h",
       "src/client/linux/handler/exception_handler.cc",
       "src/client/linux/handler/exception_handler.h",
       "src/client/linux/handler/minidump_descriptor.cc",
@@ -439,7 +456,7 @@ if (is_linux) {
 
     configs -= [ "//build/config/compiler:chromium_code" ]
     configs += [ "//build/config/compiler:no_chromium_code" ]
-    direct_dependent_configs = [ ":client_config" ]
+    public_configs = [ ":client_config" ]
 
     if (cpu_arch == "arm" && is_chromeos) {
       # Avoid running out of registers in
@@ -466,6 +483,8 @@ if (is_linux) {
       "src/common/scoped_ptr.h",
       "src/processor/basic_code_modules.cc",
       "src/processor/basic_code_modules.h",
+      "src/processor/dump_context.cc",
+      "src/processor/dump_object.cc",
       "src/processor/logging.cc",
       "src/processor/logging.h",
       "src/processor/minidump.cc",
@@ -479,9 +498,15 @@ if (is_linux) {
       "src/third_party/linux/include",
       ".",
     ]
+
+    # There are some warnings in this code.
+    configs -= [ "//build/config/compiler:chromium_code" ]
+    configs += [ "//build/config/compiler:no_chromium_code" ]
   }
+}
 
-  executable("breakpad_unittests") {
+if (is_linux) {
+  test("breakpad_unittests") {
     sources = [
       "linux/breakpad_googletest_includes.h",
       "src/client/linux/handler/exception_handler_unittest.cc",
@@ -538,11 +563,12 @@ if (is_linux) {
     if (is_android) {
       sources += [ "src/common/android/breakpad_getcontext_unittest.cc" ]
       libs = [ "log" ]
-      include_dirs = [ "src/common/android/include" ]
+      include_dirs += [ "src/common/android/include" ]
     }
   }
 
   executable("linux_dumper_unittest_helper") {
+    testonly = true
     sources = [
       "src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc",
     ]
@@ -561,6 +587,7 @@ if (is_linux) {
 
 
   executable("generate_test_dump") {
+    testonly = true
     sources = [
       "linux/generate-test-dump.cc",
     ]
@@ -660,13 +687,13 @@ if (is_ios) {
 
 if (is_win) {
   group("client") {
-    direct_dependent_configs = [ ":client_config" ]
+    public_configs = [ ":client_config" ]
   }
 
   source_set("breakpad_handler") {
     configs += [ ":handler_config" ]
     if (is_win) {
-      direct_dependent_configs = [ ":handler_config" ]
+      public_configs = [ ":handler_config" ]
     }
 
     defines = [ "BREAKPAD_NO_TERMINATE_THREAD" ]