diff --git a/DEPS b/DEPS index 444a9483..46f233f2 100644 --- a/DEPS +++ b/DEPS @@ -42,7 +42,7 @@ deps = { '7bde79cc274d06451bf65ae82c012a5d3e476b5a', 'crashpad/third_party/mini_chromium/mini_chromium': Var('chromium_git') + '/chromium/mini_chromium@' + - '3baa0e09ceaa071f6cbbd8fc718d6046533e1f1f', + '68da43e59f7ebcf39625fcef3a5303fc06240b42', 'crashpad/third_party/libfuzzer/src': Var('chromium_git') + '/chromium/llvm-project/compiler-rt/lib/fuzzer.git@' + 'fda403cf93ecb8792cb1d061564d89a6553ca020', diff --git a/build/crashpad_buildconfig.gni b/build/crashpad_buildconfig.gni index a8bf6cf8..51b99c3b 100644 --- a/build/crashpad_buildconfig.gni +++ b/build/crashpad_buildconfig.gni @@ -85,9 +85,10 @@ template("crashpad_executable") { } if (crashpad_is_in_fuchsia) { - fdio_config = [ "//build/config/fuchsia:fdio_config" ] - if (configs + fdio_config - fdio_config == configs) { - configs += fdio_config + conversion_config = [ "//build/config:Wno-conversion" ] + if (configs + conversion_config - conversion_config == configs) { + # TODO(https://fxbug.dev/58162): Decide if these are worth enabling. + configs += conversion_config } } } @@ -110,7 +111,37 @@ template("crashpad_loadable_module") { } if (crashpad_is_in_fuchsia) { - configs += [ "//build/config/fuchsia:fdio_config" ] + conversion_config = [ "//build/config:Wno-conversion" ] + if (configs + conversion_config - conversion_config == configs) { + # TODO(https://fxbug.dev/58162): Decide if these are worth enabling. + configs += conversion_config + } + } + } +} + +template("crashpad_static_library") { + static_library(target_name) { + forward_variables_from(invoker, + "*", + [ + "configs", + "remove_configs", + ]) + if (defined(invoker.remove_configs)) { + configs -= invoker.remove_configs + } + + if (defined(invoker.configs)) { + configs += invoker.configs + } + + if (crashpad_is_in_fuchsia) { + conversion_config = [ "//build/config:Wno-conversion" ] + if (configs + conversion_config - conversion_config == configs) { + # TODO(https://fxbug.dev/58162): Decide if these are worth enabling. + configs += conversion_config + } } } } diff --git a/client/BUILD.gn b/client/BUILD.gn index 9b2f7954..ca55ad42 100644 --- a/client/BUILD.gn +++ b/client/BUILD.gn @@ -19,7 +19,7 @@ if (crashpad_is_in_chromium) { set_sources_assignment_filter([]) } -static_library("client") { +crashpad_static_library("client") { sources = [ "annotation.cc", "annotation.h", @@ -116,7 +116,6 @@ static_library("client") { deps += [ "../third_party/fuchsia" ] if (crashpad_is_in_fuchsia) { deps += [ "//sdk/lib/fdio" ] - configs += [ "//build/config:Wno-conversion" ] } } } @@ -175,12 +174,6 @@ source_set("client_test") { if (crashpad_is_win) { data_deps += [ "../handler:crashpad_handler_console" ] } - - if (crashpad_is_in_fuchsia) { - # TODO(https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=58162): - # Delete the below and fix compiler warnings - configs += [ "//build/config:Wno-conversion" ] - } } if (crashpad_is_linux || crashpad_is_android) { diff --git a/compat/BUILD.gn b/compat/BUILD.gn index 6154f8f9..65c9b85a 100644 --- a/compat/BUILD.gn +++ b/compat/BUILD.gn @@ -60,7 +60,7 @@ template("compat_target") { not_needed([ "configs" ]) } } else { - static_library(target_name) { + crashpad_static_library(target_name) { forward_variables_from(invoker, "*", [ "configs" ]) if (!defined(configs)) { configs = [] @@ -177,8 +177,4 @@ compat_target("compat") { if (!crashpad_is_linux && !crashpad_is_android && !crashpad_is_fuchsia) { deps += [ "../third_party/glibc" ] } - - if (crashpad_is_in_fuchsia) { - configs = [ "//build/config:Wno-conversion" ] - } } diff --git a/minidump/BUILD.gn b/minidump/BUILD.gn index 810a1d7e..d07c1dd4 100644 --- a/minidump/BUILD.gn +++ b/minidump/BUILD.gn @@ -19,7 +19,7 @@ if (crashpad_is_in_chromium) { set_sources_assignment_filter([]) } -static_library("minidump") { +crashpad_static_library("minidump") { sources = [ "minidump_annotation_writer.cc", "minidump_annotation_writer.h", @@ -90,12 +90,6 @@ static_library("minidump") { "/wd4324", # 'struct' : structure was padded due to __declspec(align()) ] } - - if (crashpad_is_in_fuchsia) { - # TODO(https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=58162): - # Delete the below and fix compiler warnings - configs += [ "//build/config:Wno-conversion" ] - } } # :format is the only part of minidump that snapshot may depend on. @@ -154,12 +148,6 @@ static_library("test_support") { if (crashpad_is_win) { cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union } - - if (crashpad_is_in_fuchsia) { - # TODO(https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=58162): - # Delete the below and fix compiler warnings - configs += [ "//build/config:Wno-conversion" ] - } } source_set("minidump_test") { @@ -205,10 +193,4 @@ source_set("minidump_test") { } configs += [ "..:disable_ubsan" ] - - if (crashpad_is_in_fuchsia) { - # TODO(https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=58162): - # Delete the below and fix compiler warnings - configs += [ "//build/config:Wno-conversion" ] - } } diff --git a/snapshot/BUILD.gn b/snapshot/BUILD.gn index c1dfc049..49a809a6 100644 --- a/snapshot/BUILD.gn +++ b/snapshot/BUILD.gn @@ -22,7 +22,7 @@ if (crashpad_is_in_chromium) { set_sources_assignment_filter([]) } -static_library("snapshot") { +crashpad_static_library("snapshot") { sources = [ "annotation_snapshot.cc", "annotation_snapshot.h", @@ -242,6 +242,8 @@ static_library("snapshot") { public_configs = [ "..:crashpad_config" ] + configs = [ "..:disable_ubsan" ] + public_deps = [ ":context" ] deps = [ @@ -260,14 +262,6 @@ static_library("snapshot") { cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union libs = [ "powrprof.lib" ] } - - configs += [ "..:disable_ubsan" ] - - if (crashpad_is_in_fuchsia) { - # TODO(https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=58162): - # Delete the below and fix compiler warnings - configs += [ "//build/config:Wno-conversion" ] - } } # :context is the only part of snapshot that minidump may depend on. @@ -288,12 +282,6 @@ static_library("context") { if (crashpad_is_win) { cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union } - - if (crashpad_is_in_fuchsia) { - # TODO(https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=58162): - # Delete the below and fix compiler warnings - configs += [ "//build/config:Wno-conversion" ] - } } if (crashpad_is_linux) { @@ -482,12 +470,6 @@ source_set("snapshot_test") { ":crashpad_snapshot_test_image_reader_module", ] } - - if (crashpad_is_in_fuchsia) { - # TODO(https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=58162): - # Delete the below and fix compiler warnings - configs += [ "//build/config:Wno-conversion" ] - } } crashpad_loadable_module("crashpad_snapshot_test_module") { diff --git a/util/BUILD.gn b/util/BUILD.gn index e9b7e725..f35b840b 100644 --- a/util/BUILD.gn +++ b/util/BUILD.gn @@ -155,7 +155,7 @@ if (crashpad_is_mac || crashpad_is_ios) { } } -static_library("util") { +crashpad_static_library("util") { sources = [ "file/delimited_file_reader.cc", "file/delimited_file_reader.h", @@ -567,6 +567,8 @@ static_library("util") { public_configs = [ "..:crashpad_config" ] + configs = [ "..:disable_ubsan" ] + # Include generated files starting with "util". if (crashpad_is_in_fuchsia) { include_dirs = [ "$root_gen_dir/third_party/crashpad" ] @@ -622,14 +624,6 @@ static_library("util") { if (crashpad_is_android || crashpad_is_linux) { deps += [ "../third_party/lss" ] } - - configs += [ "..:disable_ubsan" ] - - if (crashpad_is_in_fuchsia) { - # TODO(https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=58162): - # Delete the below and fix compiler warnings - configs += [ "//build/config:Wno-conversion" ] - } } if (!crashpad_is_android && !crashpad_is_ios) { @@ -668,12 +662,6 @@ if (!crashpad_is_android && !crashpad_is_ios) { ] } } - - if (crashpad_is_in_fuchsia) { - # TODO(https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=58162): - # Delete the below and fix compiler warnings - configs = [ "//build/config:Wno-conversion" ] - } } } @@ -889,12 +877,6 @@ source_set("util_test") { ":crashpad_util_test_safe_terminate_process_test_child", ] } - - if (crashpad_is_in_fuchsia) { - # TODO(https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=58162): - # Delete the below and fix compiler warnings - configs += [ "//build/config:Wno-conversion" ] - } } if (crashpad_is_ios) {