mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 22:26:06 +00:00
fuchsia: Update build to use new "GN" SDK
This reworks the SDK pull to get the new packaging of the SDK. Includes DEPS update to roll mini_chromium with two changes: f7bd221 fuchsia: Remove fuchsia_sdk declare_args, add copy() tool 8ca5ea3 fuchsia: Use sdk/$host_os-amd64 for sdk path Bug: fuchsia:7802 Change-Id: Ifcb0e90b19c7eddc32a37422e6951f214dcdfd36 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2165494 Reviewed-by: Mark Mentovai <mark@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
This commit is contained in:
parent
069fddf184
commit
a519f1bec3
6
DEPS
6
DEPS
@ -42,7 +42,7 @@ deps = {
|
|||||||
'7bde79cc274d06451bf65ae82c012a5d3e476b5a',
|
'7bde79cc274d06451bf65ae82c012a5d3e476b5a',
|
||||||
'crashpad/third_party/mini_chromium/mini_chromium':
|
'crashpad/third_party/mini_chromium/mini_chromium':
|
||||||
Var('chromium_git') + '/chromium/mini_chromium@' +
|
Var('chromium_git') + '/chromium/mini_chromium@' +
|
||||||
'641fcf9bbc1277e8153ac7e86d5b8f9340b1bfdd',
|
'8ca5ea356cdb97913d62d379d503567a80d90726',
|
||||||
'crashpad/third_party/libfuzzer/src':
|
'crashpad/third_party/libfuzzer/src':
|
||||||
Var('chromium_git') + '/chromium/llvm-project/compiler-rt/lib/fuzzer.git@' +
|
Var('chromium_git') + '/chromium/llvm-project/compiler-rt/lib/fuzzer.git@' +
|
||||||
'fda403cf93ecb8792cb1d061564d89a6553ca020',
|
'fda403cf93ecb8792cb1d061564d89a6553ca020',
|
||||||
@ -104,7 +104,7 @@ deps = {
|
|||||||
'crashpad/third_party/fuchsia/sdk/mac-amd64': {
|
'crashpad/third_party/fuchsia/sdk/mac-amd64': {
|
||||||
'packages': [
|
'packages': [
|
||||||
{
|
{
|
||||||
'package': 'fuchsia/sdk/core/mac-amd64',
|
'package': 'fuchsia/sdk/gn/mac-amd64',
|
||||||
'version': 'latest'
|
'version': 'latest'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -114,7 +114,7 @@ deps = {
|
|||||||
'crashpad/third_party/fuchsia/sdk/linux-amd64': {
|
'crashpad/third_party/fuchsia/sdk/linux-amd64': {
|
||||||
'packages': [
|
'packages': [
|
||||||
{
|
{
|
||||||
'package': 'fuchsia/sdk/core/linux-amd64',
|
'package': 'fuchsia/sdk/gn/linux-amd64',
|
||||||
'version': 'latest'
|
'version': 'latest'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
224
third_party/fuchsia/BUILD.gn
vendored
224
third_party/fuchsia/BUILD.gn
vendored
@ -25,225 +25,17 @@ if (crashpad_is_in_fuchsia) {
|
|||||||
} else if (crashpad_is_in_chromium) {
|
} else if (crashpad_is_in_chromium) {
|
||||||
group("fuchsia") {
|
group("fuchsia") {
|
||||||
public_deps = [
|
public_deps = [
|
||||||
"//third_party/fuchsia-sdk/sdk:fdio",
|
"//third_party/fuchsia-sdk/sdk/fidl/fuchsia.mem",
|
||||||
"//third_party/fuchsia-sdk/sdk:mem",
|
"//third_party/fuchsia-sdk/sdk/pkg/fdio",
|
||||||
"//third_party/fuchsia-sdk/sdk:zx",
|
"//third_party/fuchsia-sdk/sdk/pkg/zx",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
sdk_path = "sdk/$host_os-amd64"
|
group("fuchsia") {
|
||||||
sdk_pkg_path = "$sdk_path/pkg"
|
public_deps = [
|
||||||
sdk_fidl_sources_path = "$sdk_path/fidl"
|
"//third_party/fuchsia/sdk/$host_os-amd64/fidl/fuchsia.mem",
|
||||||
|
"//third_party/fuchsia/sdk/$host_os-amd64/pkg/fdio",
|
||||||
config("zx_config") {
|
"//third_party/fuchsia/sdk/$host_os-amd64/pkg/zx",
|
||||||
include_dirs = [ "$sdk_pkg_path/zx/include" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
fidl_root_gen_dir = "$root_gen_dir/fidl/include"
|
|
||||||
config("fidl_config") {
|
|
||||||
include_dirs = [
|
|
||||||
fidl_root_gen_dir,
|
|
||||||
"$sdk_pkg_path/fidl/include",
|
|
||||||
"$sdk_pkg_path/fidl_base/include",
|
|
||||||
"$sdk_pkg_path/async/include",
|
|
||||||
"$sdk_pkg_path/fidl_cpp/include",
|
|
||||||
"$sdk_pkg_path/fidl_cpp_base/include",
|
|
||||||
"$sdk_pkg_path/fidl_cpp_sync/include",
|
|
||||||
"$sdk_pkg_path/fit/include",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
source_set("zx") {
|
|
||||||
sources = [
|
|
||||||
"$sdk_pkg_path/zx/channel.cc",
|
|
||||||
"$sdk_pkg_path/zx/event.cc",
|
|
||||||
"$sdk_pkg_path/zx/eventpair.cc",
|
|
||||||
"$sdk_pkg_path/zx/fifo.cc",
|
|
||||||
"$sdk_pkg_path/zx/guest.cc",
|
|
||||||
"$sdk_pkg_path/zx/interrupt.cc",
|
|
||||||
"$sdk_pkg_path/zx/job.cc",
|
|
||||||
"$sdk_pkg_path/zx/port.cc",
|
|
||||||
"$sdk_pkg_path/zx/process.cc",
|
|
||||||
"$sdk_pkg_path/zx/resource.cc",
|
|
||||||
"$sdk_pkg_path/zx/socket.cc",
|
|
||||||
"$sdk_pkg_path/zx/thread.cc",
|
|
||||||
"$sdk_pkg_path/zx/timer.cc",
|
|
||||||
"$sdk_pkg_path/zx/vmar.cc",
|
|
||||||
"$sdk_pkg_path/zx/vmo.cc",
|
|
||||||
]
|
|
||||||
|
|
||||||
public_configs = [ ":zx_config" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
source_set("fidl_base") {
|
|
||||||
sources = [
|
|
||||||
"$sdk_pkg_path/fidl_base/builder.cc",
|
|
||||||
"$sdk_pkg_path/fidl_base/decoding.cc",
|
|
||||||
"$sdk_pkg_path/fidl_base/encoding.cc",
|
|
||||||
"$sdk_pkg_path/fidl_base/formatting.cc",
|
|
||||||
"$sdk_pkg_path/fidl_base/linearizing.cc",
|
|
||||||
"$sdk_pkg_path/fidl_base/message.cc",
|
|
||||||
"$sdk_pkg_path/fidl_base/message_buffer.cc",
|
|
||||||
"$sdk_pkg_path/fidl_base/message_builder.cc",
|
|
||||||
"$sdk_pkg_path/fidl_base/transformer.cc",
|
|
||||||
"$sdk_pkg_path/fidl_base/txn_header.c",
|
|
||||||
"$sdk_pkg_path/fidl_base/validating.cc",
|
|
||||||
"$sdk_pkg_path/fidl_base/walker.cc",
|
|
||||||
]
|
|
||||||
|
|
||||||
public_configs = [ ":fidl_config" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
source_set("fidl_cpp_base") {
|
|
||||||
sources = [
|
|
||||||
"$sdk_pkg_path/fidl_cpp_base/clone.cc",
|
|
||||||
"$sdk_pkg_path/fidl_cpp_base/decoder.cc",
|
|
||||||
"$sdk_pkg_path/fidl_cpp_base/encoder.cc",
|
|
||||||
]
|
|
||||||
|
|
||||||
public_configs = [
|
|
||||||
":fidl_config",
|
|
||||||
":zx_config",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
fidl_sources = [
|
|
||||||
{
|
|
||||||
fidl = "$sdk_fidl_sources_path/fuchsia.mem/buffer.fidl"
|
|
||||||
header_stem = "fuchsia/mem"
|
|
||||||
library_name = "fuchsia.mem"
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
foreach(fidl_source, fidl_sources) {
|
|
||||||
fidl_stem = "$target_gen_dir/fidl/${fidl_source.library_name}"
|
|
||||||
json_representation = "$fidl_stem/intermediary_representation.json"
|
|
||||||
c_stem = "$fidl_root_gen_dir/${fidl_source.header_stem}/c"
|
|
||||||
c_header = "$c_stem/fidl.h"
|
|
||||||
c_client = "$c_stem/client.cc"
|
|
||||||
cpp_stem = "$fidl_root_gen_dir/${fidl_source.header_stem}/cpp/fidl"
|
|
||||||
cpp_header = "$cpp_stem.h"
|
|
||||||
cpp_source = "$cpp_stem.cc"
|
|
||||||
coding_tables = "$fidl_stem/tables.c"
|
|
||||||
|
|
||||||
# Compiles the .fidl file, outputs the intermediary JSON representation
|
|
||||||
# and generates the C bindings.
|
|
||||||
action("fidlc_${fidl_source.library_name}") {
|
|
||||||
visibility = [ ":*" ]
|
|
||||||
|
|
||||||
script = "runner.py"
|
|
||||||
|
|
||||||
args = [
|
|
||||||
rebase_path("$sdk_path/tools/fidlc", root_build_dir),
|
|
||||||
"--c-header",
|
|
||||||
rebase_path(c_header, root_build_dir),
|
|
||||||
"--c-client",
|
|
||||||
rebase_path(c_client, root_build_dir),
|
|
||||||
"--tables",
|
|
||||||
rebase_path(coding_tables, root_build_dir),
|
|
||||||
"--json",
|
|
||||||
rebase_path(json_representation, root_build_dir),
|
|
||||||
"--name",
|
|
||||||
fidl_source.library_name,
|
|
||||||
"--files",
|
|
||||||
rebase_path(fidl_source.fidl, root_build_dir),
|
|
||||||
]
|
|
||||||
|
|
||||||
inputs = [
|
|
||||||
"$sdk_path/tools/fidlc",
|
|
||||||
fidl_source.fidl,
|
|
||||||
]
|
|
||||||
|
|
||||||
outputs = [
|
|
||||||
c_client,
|
|
||||||
c_header,
|
|
||||||
coding_tables,
|
|
||||||
json_representation,
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
# Generates the C++ bindings from the intermediary JSON representation.
|
|
||||||
action("fidlgen_cpp_${fidl_source.library_name}") {
|
|
||||||
visibility = [ ":*" ]
|
|
||||||
|
|
||||||
script = "runner.py"
|
|
||||||
|
|
||||||
args = [
|
|
||||||
rebase_path("$sdk_path/tools/fidlgen", root_build_dir),
|
|
||||||
"--json",
|
|
||||||
rebase_path(json_representation, root_build_dir),
|
|
||||||
"--include-base",
|
|
||||||
rebase_path(fidl_root_gen_dir, root_build_dir),
|
|
||||||
"--output-base",
|
|
||||||
rebase_path(cpp_stem, root_build_dir),
|
|
||||||
"--generators",
|
|
||||||
"cpp",
|
|
||||||
]
|
|
||||||
|
|
||||||
inputs = [
|
|
||||||
"$sdk_path/tools/fidlgen",
|
|
||||||
json_representation,
|
|
||||||
]
|
|
||||||
|
|
||||||
outputs = [
|
|
||||||
cpp_header,
|
|
||||||
cpp_source,
|
|
||||||
]
|
|
||||||
|
|
||||||
deps = [ ":fidlc_${fidl_source.library_name}" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
source_set("${fidl_source.library_name}_tables") {
|
|
||||||
sources = [ coding_tables ]
|
|
||||||
|
|
||||||
deps = [ ":fidlc_${fidl_source.library_name}" ]
|
|
||||||
|
|
||||||
public_configs = [ ":fidl_config" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
source_set("${fidl_source.library_name}_c") {
|
|
||||||
sources = [
|
|
||||||
c_client,
|
|
||||||
c_header,
|
|
||||||
]
|
|
||||||
|
|
||||||
deps = [
|
|
||||||
":${fidl_source.library_name}_tables",
|
|
||||||
":fidlc_${fidl_source.library_name}",
|
|
||||||
]
|
|
||||||
|
|
||||||
public_configs = [ ":fidl_config" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
source_set("${fidl_source.library_name}_cpp") {
|
|
||||||
sources = [
|
|
||||||
cpp_header,
|
|
||||||
cpp_source,
|
|
||||||
]
|
|
||||||
|
|
||||||
deps = [
|
|
||||||
":${fidl_source.library_name}_tables",
|
|
||||||
":fidlgen_cpp_${fidl_source.library_name}",
|
|
||||||
]
|
|
||||||
|
|
||||||
public_configs = [
|
|
||||||
":fidl_config",
|
|
||||||
":zx_config",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static_library("fuchsia") {
|
|
||||||
deps = [
|
|
||||||
":fidl_base",
|
|
||||||
":fidl_cpp_base",
|
|
||||||
":fuchsia.mem_cpp",
|
|
||||||
":zx",
|
|
||||||
]
|
|
||||||
|
|
||||||
public_configs = [
|
|
||||||
":fidl_config",
|
|
||||||
":zx_config",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user