From 7e9dbd53fb74efb31c24aa5be5ebf3a9b312f45f Mon Sep 17 00:00:00 2001 From: Scott Graham Date: Thu, 30 Nov 2017 09:59:59 -0800 Subject: [PATCH] fuchsia: Misc fixes to get more pieces compiling - Some missed set_sources_assignment_filters if'ing - Exclude posix/symbolic_constants_posix.(h|cc) as they don't compile and won't be necessary - Exclude a handful of other posix files that don't make sense on Fuchsia. Bug: crashpad:196 Change-Id: I9ec985f00488267dc104164445c6cc5bca36a1fc Reviewed-on: https://chromium-review.googlesource.com/798220 Commit-Queue: Scott Graham Reviewed-by: Mark Mentovai --- test/BUILD.gn | 18 +++++++++++----- util/BUILD.gn | 60 +++++++++++++++++++++++++++++++-------------------- 2 files changed, 50 insertions(+), 28 deletions(-) diff --git a/test/BUILD.gn b/test/BUILD.gn index 3dcf2f22..a44779f0 100644 --- a/test/BUILD.gn +++ b/test/BUILD.gn @@ -33,19 +33,25 @@ static_library("test") { "main_arguments.h", "multiprocess.h", "multiprocess_exec.h", - "multiprocess_exec_posix.cc", - "multiprocess_exec_win.cc", - "multiprocess_posix.cc", "scoped_module_handle.cc", "scoped_module_handle.h", "scoped_temp_dir.cc", "scoped_temp_dir.h", - "scoped_temp_dir_posix.cc", - "scoped_temp_dir_win.cc", "test_paths.cc", "test_paths.h", ] + if (is_posix) { + sources += [ + "multiprocess_posix.cc", + "scoped_temp_dir_posix.cc", + ] + + if (!is_fuchsia) { + sources += [ "multiprocess_exec_posix.cc" ] + } + } + if (is_mac) { sources += [ "mac/dyld.cc", @@ -61,6 +67,8 @@ static_library("test") { if (is_win) { sources += [ + "multiprocess_exec_win.cc", + "scoped_temp_dir_win.cc", "win/child_launcher.cc", "win/child_launcher.h", "win/win_child_process.cc", diff --git a/util/BUILD.gn b/util/BUILD.gn index c744ddc8..8b19b731 100644 --- a/util/BUILD.gn +++ b/util/BUILD.gn @@ -58,10 +58,8 @@ static_library("util") { "file/delimited_file_reader.cc", "file/delimited_file_reader.h", "file/directory_reader.h", - "file/directory_reader_posix.cc", "file/file_io.cc", "file/file_io.h", - "file/file_io_posix.cc", "file/file_reader.cc", "file/file_reader.h", "file/file_seeker.cc", @@ -69,7 +67,6 @@ static_library("util") { "file/file_writer.cc", "file/file_writer.h", "file/filesystem.h", - "file/filesystem_posix.cc", "file/scoped_remove_file.cc", "file/scoped_remove_file.h", "file/string_file.cc", @@ -79,7 +76,6 @@ static_library("util") { "misc/arraysize_unsafe.h", "misc/as_underlying_type.h", "misc/clock.h", - "misc/clock_posix.cc", "misc/from_pointer_cast.h", "misc/implicit_cast.h", "misc/initialization_state.h", @@ -124,23 +120,6 @@ static_library("util") { "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/double_fork_and_exec.cc", - "posix/double_fork_and_exec.h", - "posix/drop_privileges.cc", - "posix/drop_privileges.h", - "posix/process_info.h", - "posix/scoped_dir.cc", - "posix/scoped_dir.h", - "posix/scoped_mmap.cc", - "posix/scoped_mmap.h", - "posix/signals.cc", - "posix/signals.h", - "posix/symbolic_constants_posix.cc", - "posix/symbolic_constants_posix.h", "stdlib/aligned_allocator.cc", "stdlib/aligned_allocator.h", "stdlib/map_insert.h", @@ -155,16 +134,51 @@ static_library("util") { "string/split_string.cc", "string/split_string.h", "synchronization/semaphore.h", - "synchronization/semaphore_posix.cc", "thread/thread.cc", "thread/thread.h", "thread/thread_log_messages.cc", "thread/thread_log_messages.h", - "thread/thread_posix.cc", "thread/worker_thread.cc", "thread/worker_thread.h", ] + if (is_posix) { + sources += [ + "file/directory_reader_posix.cc", + "file/file_io_posix.cc", + "file/filesystem_posix.cc", + "misc/clock_posix.cc", + "posix/close_stdio.cc", + "posix/close_stdio.h", + "posix/process_info.h", + "posix/scoped_dir.cc", + "posix/scoped_dir.h", + "posix/scoped_mmap.cc", + "posix/scoped_mmap.h", + "posix/signals.cc", + "posix/signals.h", + "synchronization/semaphore_posix.cc", + "thread/thread_posix.cc", + ] + + if (!is_fuchsia) { + sources += [ + "posix/close_multiple.cc", + "posix/close_multiple.h", + "posix/double_fork_and_exec.cc", + "posix/double_fork_and_exec.h", + "posix/drop_privileges.cc", + "posix/drop_privileges.h", + + # These map signals to and from strings. While Fuchsia defines some of + # the common SIGx defines, signals are never raised on Fuchsia, so + # there's need to include this mapping code. + "posix/symbolic_constants_posix.cc", + "posix/symbolic_constants_posix.h", + ] + } + } + if (is_mac) { sources += [ "mac/checked_mach_address_range.h",