Index: build/secondary/third_party/crashpad/crashpad/util/BUILD.gn |
diff --git a/build/secondary/third_party/crashpad/crashpad/util/BUILD.gn b/build/secondary/third_party/crashpad/crashpad/util/BUILD.gn |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0fe15b6137ef68c8543dea428c28d3a99b6fc8cd |
--- /dev/null |
+++ b/build/secondary/third_party/crashpad/crashpad/util/BUILD.gn |
@@ -0,0 +1,216 @@ |
+# 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. |
+ |
+if (is_mac) { |
+ import("//build/config/sysroot.gni") |
+} |
+ |
+# Allows the source set to inject ldflags for targets that link to it. |
+config("util_link_config") { |
+ if (is_mac) { |
+ ldflags = [ "/usr/lib/libbsm.dylib" ] |
+ } |
+} |
+ |
+if (is_mac) { |
+ action_foreach("mig") { |
+ script = "mach/mig.py" |
+ sources = [ |
+ "$sysroot/usr/include/mach/exc.defs", |
+ "$sysroot/usr/include/mach/mach_exc.defs", |
+ "$sysroot/usr/include/mach/notify.defs", |
+ "mach/child_port.defs", |
+ ] |
+ |
+ outputs = [ |
+ "$target_gen_dir/mach/{{source_name_part}}User.c", |
+ "$target_gen_dir/mach/{{source_name_part}}Server.c", |
+ "$target_gen_dir/mach/{{source_name_part}}.h", |
+ "$target_gen_dir/mach/{{source_name_part}}Server.h", |
+ ] |
+ |
+ args = [ "{{source}}" ] |
+ args += rebase_path(outputs, root_build_dir) |
+ } |
+} |
+ |
+source_set("util") { |
+ sources = [ |
+ "file/file_io.cc", |
+ "file/file_io.h", |
+ "file/file_io_posix.cc", |
+ "file/file_io_win.cc", |
+ "file/file_reader.cc", |
+ "file/file_reader.h", |
+ "file/file_seeker.cc", |
+ "file/file_seeker.h", |
+ "file/file_writer.cc", |
+ "file/file_writer.h", |
+ "file/string_file.cc", |
+ "file/string_file.h", |
+ "mac/checked_mach_address_range.h", |
+ "mac/launchd.h", |
+ "mac/launchd.mm", |
+ "mac/mac_util.cc", |
+ "mac/mac_util.h", |
+ "mac/service_management.cc", |
+ "mac/service_management.h", |
+ "mac/xattr.cc", |
+ "mac/xattr.h", |
+ "mach/child_port_handshake.cc", |
+ "mach/child_port_handshake.h", |
+ "mach/child_port_server.cc", |
+ "mach/child_port_server.h", |
+ "mach/child_port_types.h", |
+ "mach/composite_mach_message_server.cc", |
+ "mach/composite_mach_message_server.h", |
+ "mach/exc_client_variants.cc", |
+ "mach/exc_client_variants.h", |
+ "mach/exc_server_variants.cc", |
+ "mach/exc_server_variants.h", |
+ "mach/exception_behaviors.cc", |
+ "mach/exception_behaviors.h", |
+ "mach/exception_ports.cc", |
+ "mach/exception_ports.h", |
+ "mach/exception_types.cc", |
+ "mach/exception_types.h", |
+ "mach/mach_extensions.cc", |
+ "mach/mach_extensions.h", |
+ "mach/mach_message.cc", |
+ "mach/mach_message.h", |
+ "mach/mach_message_server.cc", |
+ "mach/mach_message_server.h", |
+ "mach/notify_server.cc", |
+ "mach/notify_server.h", |
+ "mach/scoped_task_suspend.cc", |
+ "mach/scoped_task_suspend.h", |
+ "mach/symbolic_constants_mach.cc", |
+ "mach/symbolic_constants_mach.h", |
+ "mach/task_for_pid.cc", |
+ "mach/task_for_pid.h", |
+ "mach/task_memory.cc", |
+ "mach/task_memory.h", |
+ "misc/clock.h", |
+ "misc/clock_mac.cc", |
+ "misc/clock_posix.cc", |
+ "misc/clock_win.cc", |
+ "misc/implicit_cast.h", |
+ "misc/initialization_state.h", |
+ "misc/initialization_state_dcheck.cc", |
+ "misc/initialization_state_dcheck.h", |
+ "misc/pdb_structures.cc", |
+ "misc/pdb_structures.h", |
+ "misc/scoped_forbid_return.cc", |
+ "misc/scoped_forbid_return.h", |
+ "misc/symbolic_constants_common.h", |
+ "misc/tri_state.h", |
+ "misc/uuid.cc", |
+ "misc/uuid.h", |
+ "net/http_body.cc", |
+ "net/http_body.h", |
+ "net/http_headers.cc", |
+ "net/http_headers.h", |
+ "net/http_multipart_builder.cc", |
+ "net/http_multipart_builder.h", |
+ "net/http_transport.cc", |
+ "net/http_transport.h", |
+ "net/http_transport_mac.mm", |
+ "net/http_transport_win.cc", |
+ "numeric/checked_address_range.cc", |
+ "numeric/checked_address_range.h", |
+ "numeric/checked_range.h", |
+ "numeric/in_range_cast.h", |
+ "numeric/int128.h", |
+ "numeric/safe_assignment.h", |
+ "posix/close_multiple.cc", |
+ "posix/close_multiple.h", |
+ "posix/close_stdio.cc", |
+ "posix/close_stdio.h", |
+ "posix/drop_privileges.cc", |
+ "posix/drop_privileges.h", |
+ "posix/process_info.h", |
+ "posix/process_info_mac.cc", |
+ "posix/symbolic_constants_posix.cc", |
+ "posix/symbolic_constants_posix.h", |
+ "stdlib/cxx.h", |
+ "stdlib/map_insert.h", |
+ "stdlib/objc.h", |
+ "stdlib/pointer_container.h", |
+ "stdlib/string_number_conversion.cc", |
+ "stdlib/string_number_conversion.h", |
+ "stdlib/strlcpy.cc", |
+ "stdlib/strlcpy.h", |
+ "stdlib/strnlen.cc", |
+ "stdlib/strnlen.h", |
+ "string/split_string.cc", |
+ "string/split_string.h", |
+ "synchronization/semaphore.h", |
+ "synchronization/semaphore_mac.cc", |
+ "synchronization/semaphore_posix.cc", |
+ "synchronization/semaphore_win.cc", |
+ "thread/thread.cc", |
+ "thread/thread.h", |
+ "thread/thread_log_messages.cc", |
+ "thread/thread_log_messages.h", |
+ "thread/thread_posix.cc", |
+ "thread/thread_win.cc", |
+ "win/address_types.h", |
+ "win/capture_context.asm", |
+ "win/capture_context.h", |
+ "win/checked_win_address_range.h", |
+ "win/critical_section_with_debug_info.cc", |
+ "win/critical_section_with_debug_info.h", |
+ "win/exception_handler_server.cc", |
+ "win/exception_handler_server.h", |
+ "win/get_function.cc", |
+ "win/get_function.h", |
+ "win/module_version.cc", |
+ "win/module_version.h", |
+ "win/nt_internals.cc", |
+ "win/nt_internals.h", |
+ "win/ntstatus_logging.cc", |
+ "win/ntstatus_logging.h", |
+ "win/process_info.cc", |
+ "win/process_info.h", |
+ "win/process_structs.h", |
+ "win/registration_protocol_win.cc", |
+ "win/registration_protocol_win.h", |
+ "win/scoped_handle.cc", |
+ "win/scoped_handle.h", |
+ "win/scoped_process_suspend.cc", |
+ "win/scoped_process_suspend.h", |
+ "win/time.cc", |
+ "win/time.h", |
+ "win/xp_compat.h", |
+ ] |
+ |
+ # Include files from here and generated files starting with "util". |
+ include_dirs = [ |
+ "..", |
+ "$root_gen_dir/third_party/crashpad/crashpad", |
+ ] |
+ |
+ all_dependent_configs = [ ":util_link_config" ] |
+ |
+ deps = [ |
+ "//base", |
+ "//third_party/crashpad/crashpad/compat", |
+ ] |
+ |
+ if (is_win) { |
+ libs = [ |
+ "rpcrt4.lib", |
+ "winhttp.lib", |
+ ] |
+ # TODO(GYP) UseSafeExceptionHandlers masm rule. |
+ } else if (is_mac) { |
+ sources += get_target_outputs(":mig") |
+ deps += [ ":mig" ] |
+ libs = [ |
+ "CoreFoundation.framework", |
+ "Foundation.framework", |
+ "IOKit.framework", |
+ ] |
+ } |
+} |