Don't use shared libraries in the wire fuzzer.
Otherwise UBSan complains that C++ types are different between the shared libraries because libc++ is linked statically. BUG=chromium:904736 Change-Id: I51ef40d1f7910fd693a4585c74ff404812472d2e Reviewed-on: https://dawn-review.googlesource.com/c/2380 Reviewed-by: Dan Sinclair <dsinclair@google.com> Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
499bc0318d
commit
2ec59d9fcc
63
BUILD.gn
63
BUILD.gn
|
@ -244,16 +244,32 @@ dawn_generator("libdawn_gen") {
|
|||
]
|
||||
}
|
||||
|
||||
config("libdawn_export") {
|
||||
defines = [ "DAWN_IMPLEMENTATION" ]
|
||||
}
|
||||
|
||||
source_set("libdawn_sources") {
|
||||
public_deps = [
|
||||
":dawn_headers",
|
||||
]
|
||||
|
||||
deps = [
|
||||
":libdawn_gen",
|
||||
]
|
||||
sources = get_target_outputs(":libdawn_gen")
|
||||
|
||||
# Put the export config public so that dependents use the same declspec.
|
||||
public_configs = [ ":libdawn_export" ]
|
||||
}
|
||||
|
||||
shared_library("libdawn") {
|
||||
public_deps = [
|
||||
":dawn_headers",
|
||||
]
|
||||
|
||||
defines = [ "DAWN_IMPLEMENTATION" ]
|
||||
deps = [
|
||||
":libdawn_gen",
|
||||
":libdawn_sources",
|
||||
]
|
||||
sources = get_target_outputs(":libdawn_gen")
|
||||
|
||||
# Tell dependents where to find this shared library
|
||||
if (is_mac) {
|
||||
|
@ -270,7 +286,6 @@ shared_library("libdawn") {
|
|||
|
||||
config("libdawn_native_internal") {
|
||||
configs = [ ":dawn_internal" ]
|
||||
defines = [ "DAWN_NATIVE_IMPLEMENTATION" ]
|
||||
|
||||
# Suppress warnings that Metal isn't in the deployment target of Chrome
|
||||
if (is_mac) {
|
||||
|
@ -278,6 +293,10 @@ config("libdawn_native_internal") {
|
|||
}
|
||||
}
|
||||
|
||||
config("libdawn_native_export") {
|
||||
defines = [ "DAWN_NATIVE_IMPLEMENTATION" ]
|
||||
}
|
||||
|
||||
dawn_generator("libdawn_native_utils_gen") {
|
||||
target = "dawn_native_utils"
|
||||
outputs = [
|
||||
|
@ -319,14 +338,10 @@ source_set("libdawn_native_sources") {
|
|||
"third_party:spirv_cross",
|
||||
]
|
||||
|
||||
# Put the internal config public so that unittests can see internal headers
|
||||
public_configs = [ ":libdawn_native_internal" ]
|
||||
|
||||
# Set the headers as a public dependency so they are visible to unittests
|
||||
public_deps = [
|
||||
":libdawn_native_headers",
|
||||
]
|
||||
# Put the export config public so that dependents use the same declspec.
|
||||
public_configs = [ ":libdawn_native_export" ]
|
||||
|
||||
configs += [ ":libdawn_native_internal" ]
|
||||
libs = []
|
||||
|
||||
sources = get_target_outputs(":libdawn_native_utils_gen")
|
||||
|
@ -633,6 +648,10 @@ source_set("libdawn_wire_headers") {
|
|||
]
|
||||
}
|
||||
|
||||
config("libdawn_wire_export") {
|
||||
defines = [ "DAWN_WIRE_IMPLEMENTATION" ]
|
||||
}
|
||||
|
||||
dawn_generator("libdawn_wire_gen") {
|
||||
target = "dawn_wire"
|
||||
outputs = [
|
||||
|
@ -643,7 +662,7 @@ dawn_generator("libdawn_wire_gen") {
|
|||
]
|
||||
}
|
||||
|
||||
shared_library("libdawn_wire") {
|
||||
source_set("libdawn_wire_sources") {
|
||||
deps = [
|
||||
":dawn_common",
|
||||
":libdawn_wire_gen",
|
||||
|
@ -651,11 +670,23 @@ shared_library("libdawn_wire") {
|
|||
]
|
||||
|
||||
configs += [ ":dawn_internal" ]
|
||||
defines = [ "DAWN_WIRE_IMPLEMENTATION" ]
|
||||
sources = get_target_outputs(":libdawn_wire_gen")
|
||||
sources += [ "src/dawn_wire/WireCmd.h" ]
|
||||
|
||||
#Make headers publically visible
|
||||
# Make headers publically visible
|
||||
public_deps = [
|
||||
":libdawn_wire_headers",
|
||||
]
|
||||
public_configs = [ ":libdawn_public" ]
|
||||
|
||||
# Put the export config public so that dependents use the same declspec.
|
||||
public_configs += [ ":libdawn_wire_export" ]
|
||||
}
|
||||
|
||||
shared_library("libdawn_wire") {
|
||||
deps = [ ":libdawn_wire_sources" ]
|
||||
|
||||
# Make headers publically visible
|
||||
public_deps = [
|
||||
":libdawn_wire_headers",
|
||||
]
|
||||
|
@ -754,6 +785,10 @@ test("dawn_unittests") {
|
|||
"third_party:gmock_and_gtest",
|
||||
]
|
||||
|
||||
# Add internal Dawn Native headers and config for internal unittests.
|
||||
deps += [ ":libdawn_native_headers" ]
|
||||
configs += [ ":libdawn_native_internal" ]
|
||||
|
||||
sources = get_target_outputs(":mock_dawn_gen")
|
||||
sources += [
|
||||
"src/tests/unittests/BitSetIteratorTests.cpp",
|
||||
|
|
|
@ -164,9 +164,9 @@ dawn_fuzzer_test("dawn_wire_server_and_frontend_fuzzer") {
|
|||
]
|
||||
|
||||
deps = [
|
||||
"${dawn_top_level}:libdawn",
|
||||
"${dawn_top_level}:libdawn_native",
|
||||
"${dawn_top_level}:libdawn_wire",
|
||||
"${dawn_top_level}:libdawn_sources",
|
||||
"${dawn_top_level}:libdawn_native_sources",
|
||||
"${dawn_top_level}:libdawn_wire_sources",
|
||||
]
|
||||
|
||||
additional_configs = [ "${dawn_top_level}:dawn_shared_library_public" ]
|
||||
|
|
Loading…
Reference in New Issue