Revert IR Fuzzer enabling change and associated DEPS roll
This reverts the actual CL and a number of others that depended on it.
This reverts the contents of 3dfff8a1a30269110c3405de31fc6af0eacac4ca,
26b8627db273137a808fdfd46bb6d639dc900bc6,
bd88d026b7470efd76fbceb62f0414edd24f118d, and
613c2e847af7362417e79c0d518aa877f4726fbc.
Change-Id: I04a4fd809aa77846e18ca94ef5d36302a884c43d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/237475
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: James Price <jrprice@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: James Price <jrprice@google.com>
diff --git a/.gitignore b/.gitignore
index ef46d3f..49fc06e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,11 +21,10 @@
/third_party/depot_tools
/third_party/dxc
/third_party/dxheaders
-/third_party/fuzztest/src/
/third_party/glfw
/third_party/glslang/src/
/third_party/google_benchmark/src
-/third_party/googletest/src/
+/third_party/googletest
/third_party/gpuweb
/third_party/jinja2
/third_party/jsoncpp
@@ -42,7 +41,6 @@
/third_party/node-api-headers
/third_party/partition_alloc
/third_party/protobuf
-/third_party/re2/src/
/third_party/siso/cipd/
/third_party/spirv-cross/src/
/third_party/spirv-headers/src/
diff --git a/.gitmodules b/.gitmodules
index e45242f..3285f507 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -42,20 +42,12 @@
path = testing
url = https://chromium.googlesource.com/chromium/src/testing
gclient-condition = dawn_standalone
-[submodule "third_party/fuzztest/src"]
- path = third_party/fuzztest/src
- url = https://chromium.googlesource.com/external/github.com/google/fuzztest.git
- gclient-condition = dawn_standalone
-[submodule "third_party/re2/src"]
- path = third_party/re2/src
- url = https://chromium.googlesource.com/external/github.com/google/re2.git
- gclient-condition = dawn_standalone
[submodule "third_party/libFuzzer/src"]
path = third_party/libFuzzer/src
url = https://chromium.googlesource.com/external/github.com/llvm/llvm-project/compiler-rt/lib/fuzzer.git
gclient-condition = dawn_standalone
-[submodule "third_party/googletest/src"]
- path = third_party/googletest/src
+[submodule "third_party/googletest"]
+ path = third_party/googletest
url = https://chromium.googlesource.com/external/github.com/google/googletest
gclient-condition = dawn_standalone
[submodule "third_party/catapult"]
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 747e86a..a7004b2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -243,6 +243,7 @@
option(TINT_BUILD_IR_BINARY "Build IR binary format support" ${TINT_DEFAULT_BUILD_IR_BINARY})
option(TINT_BUILD_FUZZERS "Build fuzzers" OFF)
+option(TINT_BUILD_IR_FUZZER "Build IR fuzzer" OFF)
option(TINT_BUILD_BENCHMARKS "Build Tint benchmarks" OFF)
option(TINT_BUILD_TESTS "Build tests" ON)
option(TINT_BUILD_AS_OTHER_OS "Override OS detection to force building of *_other.cc files" OFF)
@@ -275,6 +276,7 @@
message(STATUS "Tint install: ${TINT_ENABLE_INSTALL}")
message(STATUS "Tint build fuzzers: ${TINT_BUILD_FUZZERS}")
message(STATUS "Tint build IR binary: ${TINT_BUILD_IR_BINARY}")
+message(STATUS "Tint build IR fuzzer: ${TINT_BUILD_IR_FUZZER}")
message(STATUS "Tint build benchmarks: ${TINT_BUILD_BENCHMARKS}")
message(STATUS "Tint build tests: ${TINT_BUILD_TESTS}")
message(STATUS "Tint build tintd: ${TINT_BUILD_TINTD}")
@@ -288,7 +290,6 @@
set_if_not_defined(DAWN_THIRD_PARTY_DIR "${Dawn_SOURCE_DIR}/third_party" "Directory in which to find third-party dependencies.")
set_if_not_defined(DAWN_ABSEIL_DIR "${DAWN_THIRD_PARTY_DIR}/abseil-cpp" "Directory in which to find Abseil")
-
set_if_not_defined(DAWN_GLFW_DIR "${DAWN_THIRD_PARTY_DIR}/glfw" "Directory in which to find GLFW")
set_if_not_defined(DAWN_JINJA2_DIR "${DAWN_THIRD_PARTY_DIR}/jinja2" "Directory in which to find Jinja2")
set_if_not_defined(DAWN_MARKUPSAFE_DIR "${DAWN_THIRD_PARTY_DIR}/markupsafe" "Directory in which to find MarkupSafe")
@@ -297,7 +298,7 @@
set_if_not_defined(DAWN_PROTOBUF_DIR "${DAWN_THIRD_PARTY_DIR}/protobuf" "Directory in which to find protobuf")
set_if_not_defined(DAWN_LPM_DIR "${DAWN_THIRD_PARTY_DIR}/libprotobuf-mutator/src" "Directory in which to find libprotobuf")
set_if_not_defined(DAWN_EMDAWNWEBGPU_DIR "${DAWN_THIRD_PARTY_DIR}/emdawnwebgpu" "Directory in which to find Dawn specific Emscripten bindings")
-set_if_not_defined(DAWN_GOOGLETEST_DIR "${DAWN_THIRD_PARTY_DIR}/googletest/src" "Directory in which to find googletest")
+set_if_not_defined(DAWN_GOOGLETEST_DIR "${DAWN_THIRD_PARTY_DIR}/googletest" "Directory in which to find googletest")
set_if_not_defined(DAWN_SPIRV_TOOLS_DIR "${DAWN_THIRD_PARTY_DIR}/spirv-tools/src" "Directory in which to find SPIRV-Tools")
set_if_not_defined(DAWN_SPIRV_HEADERS_DIR "${DAWN_THIRD_PARTY_DIR}/spirv-headers/src" "Directory in which to find SPIRV-Headers")
diff --git a/DEPS b/DEPS
index 3aaa4dd..6e87cb8 100644
--- a/DEPS
+++ b/DEPS
@@ -20,7 +20,7 @@
'dawn_tintd': False, # Also fetches dependencies required for building tintd.
'dawn_cmake_version': 'version:2@3.23.3',
'dawn_cmake_win32_sha1': 'b106d66bcdc8a71ea2cdf5446091327bfdb1bcd7',
- 'dawn_gn_version': 'git_revision:6e8e0d6d4a151ab2ed9b4a35366e630c55888444',
+ 'dawn_gn_version': 'git_revision:182a6eb05d15cc76d2302f7928fdb4f645d52c53',
# ninja CIPD package version.
# https://chrome-infra-packages.appspot.com/p/infra/3pp/tools/ninja
'dawn_ninja_version': 'version:3@1.12.1.chromium.4',
@@ -66,7 +66,7 @@
deps = {
'buildtools': {
- 'url': '{chromium_git}/chromium/src/buildtools@244e7cf4453305d0c17d500662a69fba2e46a73e',
+ 'url': '{chromium_git}/chromium/src/buildtools@a660247d3c14a172b74b8e832ba1066b30183c97',
'condition': 'dawn_standalone',
},
'third_party/clang-format/script': {
@@ -130,11 +130,11 @@
# The //build and //tools/clang deps should all be updated in
# unison, as there are dependencies between them.
'build': {
- 'url': '{chromium_git}/chromium/src/build@266be69ba9615e3202c00664fc084147666ddbb5',
+ 'url': '{chromium_git}/chromium/src/build@a252ef1991b42918f6e74bc8c26b6543afe7bb2e',
'condition': 'dawn_standalone',
},
'tools/clang': {
- 'url': '{chromium_git}/chromium/src/tools/clang@5d9b09742311e059ecdba6d74adcb883e4ebffe5',
+ 'url': '{chromium_git}/chromium/src/tools/clang@e262f0f8896e459fe7fd2a076af48d5746b1d332',
'condition': 'dawn_standalone',
},
@@ -228,22 +228,14 @@
# Testing, GTest and GMock
'testing': {
- 'url': '{chromium_git}/chromium/src/testing@ae9705179f821d1dbd2b0a2ba7a6582faac7f86b',
- 'condition': 'dawn_standalone',
- },
- 'third_party/fuzztest/src': {
- 'url': '{chromium_git}/external/github.com/google/fuzztest.git' + '@' + '89408f91d2f1101fe2d79199e7ed994a4d197eb8',
- 'condition': 'dawn_standalone',
- },
- 'third_party/re2/src': {
- 'url': '{chromium_git}/external/github.com/google/re2.git' + '@' + 'c84a140c93352cdabbfb547c531be34515b12228',
+ 'url': '{chromium_git}/chromium/src/testing@1bd0da6657e330cf26ed0702b3f456393587ad7c',
'condition': 'dawn_standalone',
},
'third_party/libFuzzer/src': {
'url': '{chromium_git}/external/github.com/llvm/llvm-project/compiler-rt/lib/fuzzer.git' + '@' + '26cc39e59b2bf5cbc20486296248a842c536878d',
'condition': 'dawn_standalone',
},
- 'third_party/googletest/src': {
+ 'third_party/googletest': {
'url': '{chromium_git}/external/github.com/google/googletest@52204f78f94d7512df1f0f3bea1d47437a2c3a58',
'condition': 'dawn_standalone',
},
@@ -343,7 +335,7 @@
},
'third_party/abseil-cpp': {
- 'url': '{chromium_git}/chromium/src/third_party/abseil-cpp@04dc59d2c83238cb1fcb49083e5e416643a899ce',
+ 'url': '{chromium_git}/chromium/src/third_party/abseil-cpp@f81f6c011baf9b0132a5594c034fe0060820711d',
'condition': 'dawn_standalone',
},
@@ -443,17 +435,17 @@
# Misc dependencies inherited from Tint
'third_party/protobuf': {
- 'url': '{chromium_git}/chromium/src/third_party/protobuf@f2622a898ca54e0b7f4e38d8f7bfb994fa89872e',
+ 'url': '{chromium_git}/chromium/src/third_party/protobuf@da2fe725b80ac0ba646fbf77d0ce5b4ac236f823',
'condition': 'dawn_standalone',
},
'tools/protoc_wrapper': {
- 'url': '{chromium_git}/chromium/src/tools/protoc_wrapper@dbcbea90c20ae1ece442d8ef64e61c7b10e2b013',
+ 'url': '{chromium_git}/chromium/src/tools/protoc_wrapper@b5ea227bd88235ab3ccda964d5f3819c4e2d8032',
'condition': 'dawn_standalone',
},
'third_party/libprotobuf-mutator/src': {
- 'url': '{chromium_git}/external/github.com/google/libprotobuf-mutator.git@7bf98f78a30b067e22420ff699348f084f802e12',
+ 'url': '{chromium_git}/external/github.com/google/libprotobuf-mutator.git@a304ec48dcf15d942607032151f7e9ee504b5dcf',
'condition': 'dawn_standalone',
},
diff --git a/build b/build
index 266be69..a252ef1 160000
--- a/build
+++ b/build
@@ -1 +1 @@
-Subproject commit 266be69ba9615e3202c00664fc084147666ddbb5
+Subproject commit a252ef1991b42918f6e74bc8c26b6543afe7bb2e
diff --git a/build_overrides/dawn.gni b/build_overrides/dawn.gni
index 3ba405f..bbe1f67 100644
--- a/build_overrides/dawn.gni
+++ b/build_overrides/dawn.gni
@@ -47,7 +47,7 @@
dawn_angle_dir = "//third_party/angle"
dawn_jinja2_dir = "//third_party/jinja2"
dawn_glfw_dir = "//third_party/glfw"
-dawn_googletest_dir = "//third_party/googletest/src"
+dawn_googletest_dir = "//third_party/googletest"
dawn_spirv_tools_dir = "//third_party/spirv-tools/src"
dawn_swiftshader_dir = "//third_party/swiftshader"
dawn_vulkan_loader_dir = "//third_party/vulkan-loader/src"
diff --git a/build_overrides/gtest.gni b/build_overrides/gtest.gni
deleted file mode 100644
index aaf69a8..0000000
--- a/build_overrides/gtest.gni
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 2016 The Chromium Authors
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# Exclude support for registering main function in multi-process tests.
-gtest_include_multiprocess = true
-
-# Exclude support for platform-specific operations across unit tests.
-gtest_include_platform_test = true
-
-# Exclude support for testing Objective C code on OS X and iOS.
-gtest_include_objc_support = true
-
-# Exclude support for flushing coverage files on iOS.
-gtest_include_ios_coverage = true
diff --git a/build_overrides/spirv_tools.gni b/build_overrides/spirv_tools.gni
index e329583..ca5ba4a 100644
--- a/build_overrides/spirv_tools.gni
+++ b/build_overrides/spirv_tools.gni
@@ -29,5 +29,5 @@
spirv_tools_standalone = false
# Paths to SPIRV-Tools dependencies in Dawn
-spirv_tools_googletest_dir = "//third_party/googletest/src"
+spirv_tools_googletest_dir = "//third_party/googletest"
spirv_tools_spirv_headers_dir = "//third_party/spirv-headers/src"
diff --git a/buildtools b/buildtools
index 244e7cf..a660247 160000
--- a/buildtools
+++ b/buildtools
@@ -1 +1 @@
-Subproject commit 244e7cf4453305d0c17d500662a69fba2e46a73e
+Subproject commit a660247d3c14a172b74b8e832ba1066b30183c97
diff --git a/docs/tint/fuzzers.md b/docs/tint/fuzzers.md
index 17dc7e5..3c66b74 100644
--- a/docs/tint/fuzzers.md
+++ b/docs/tint/fuzzers.md
@@ -35,9 +35,11 @@
Building `tint_ir_fuzzer` requires additional flags to be set:
-- CMake: Define `TINT_BUILD_IR_BINARY=1` (pass
- `-DTINT_BUILD_IR_BINARY=1` to `cmake`)
-- GN: Define `tint_build_ir_binary = true` in `args.gn`.
+- CMake: Define `TINT_BUILD_IR_BINARY=1` and `TINT_BUILD_IR_FUZZER=1`
+ (pass `-DTINT_BUILD_IR_BINARY=1` `-DTINT_BUILD_IR_FUZZER=1` to
+ `cmake`)
+- GN: Define `tint_build_ir_binary = true` and `tint_build_ir_fuzzer =
+ true` in `args.gn`.
## Running fuzzers
diff --git a/scripts/tint_overrides_with_defaults.gni b/scripts/tint_overrides_with_defaults.gni
index 2bdf0d0..fff1088 100644
--- a/scripts/tint_overrides_with_defaults.gni
+++ b/scripts/tint_overrides_with_defaults.gni
@@ -68,7 +68,7 @@
# Path to googletest checkout
if (!defined(tint_googletest_dir)) {
- tint_googletest_dir = "//third_party/googletest/src"
+ tint_googletest_dir = "//third_party/googletest"
}
# Path to spirv-headers checkout
@@ -135,6 +135,11 @@
tint_build_ir_binary = tint_has_protobuf
}
+ # Build IR binary fuzzer
+ if (!defined(tint_build_ir_fuzzer)) {
+ tint_build_ir_fuzzer = false
+ }
+
# Build the tintd language server
if (!defined(tint_build_tintd)) {
tint_build_tintd = false
diff --git a/src/cmake/DawnCompilerExtraFlags.cmake b/src/cmake/DawnCompilerExtraFlags.cmake
index 5a02320..9fa5ed7 100644
--- a/src/cmake/DawnCompilerExtraFlags.cmake
+++ b/src/cmake/DawnCompilerExtraFlags.cmake
@@ -56,21 +56,6 @@
PUBLIC "/utf-8")
endif ()
- # Abseil headers can cause warnings when included that will cause failures
- # with -Werror.
- # Needs to be PUBLIC to propagate to targets that depend indirectly on abseil
- # via this target.
- if (NOT MSVC)
- get_target_property(deps ${target} LINK_LIBRARIES)
- if (deps MATCHES "absl")
- target_compile_options(${target} PUBLIC
- "-Wno-gcc-compat"
- "-Wno-unreachable-code-break"
- "-Wno-nullability-extension"
- )
- endif ()
- endif ()
-
if (COMPILER_IS_LIKE_GNU)
set(SANITIZER_OPTIONS "")
if (${DAWN_ENABLE_MSAN})
@@ -115,4 +100,3 @@
endif ()
endif ()
endfunction()
-
diff --git a/src/dawn/common/BUILD.gn b/src/dawn/common/BUILD.gn
index b694e7a..ec30bff 100644
--- a/src/dawn/common/BUILD.gn
+++ b/src/dawn/common/BUILD.gn
@@ -237,19 +237,6 @@
]
}
-config("abseil_config") {
- if (!build_with_chromium && is_clang) {
- cflags = [
- # Allow the use of enable_if()
- "-Wno-gcc-compat",
- "-Wno-unreachable-code-break",
-
- # Allows use of _Nullable, _Nonnull & _Null_unspecified
- "-Wno-nullability-extension",
- ]
- }
-}
-
group("abseil") {
# When building within Chromium or ANGLE we need to include "//third_party/abseil-cpp:absl" while
# it's beneficial to be more specific with standalone Dawn, especially when it comes to
@@ -258,9 +245,9 @@
public_deps = [ "$dawn_abseil_dir:absl" ]
} else {
public_deps = [
- "${dawn_abseil_dir}/absl/base:no_destructor",
- "${dawn_abseil_dir}/absl/container:flat_hash_set",
- "${dawn_abseil_dir}/absl/container:inlined_vector",
+ "${dawn_root}/third_party/gn/abseil-cpp:flat_hash_set",
+ "${dawn_root}/third_party/gn/abseil-cpp:inlined_vector",
+ "${dawn_root}/third_party/gn/abseil-cpp:no_destructor",
]
}
}
@@ -370,10 +357,7 @@
# Note that while this doesn't make `internal_config` a public config of
# Dawn libraries because `:common` is only used as a private deps of Dawn
# targets, so `internal_config` doesn't leak out of Dawn.
- public_configs = [
- ":abseil_config",
- ":internal_config",
- ]
+ public_configs = [ ":internal_config" ]
deps = [
"${dawn_root}/include/dawn:cpp_headers",
"${dawn_root}/include/dawn:headers",
diff --git a/src/dawn/native/BUILD.gn b/src/dawn/native/BUILD.gn
index e525cea..fd055fc 100644
--- a/src/dawn/native/BUILD.gn
+++ b/src/dawn/native/BUILD.gn
@@ -53,18 +53,6 @@
enable_vulkan_loader =
dawn_enable_vulkan_loader && dawn_vulkan_loader_dir != ""
}
-config("abseil_config") {
- if (!build_with_chromium && is_clang) {
- cflags = [
- # Allow the use of enable_if()
- "-Wno-gcc-compat",
- "-Wno-unreachable-code-break",
-
- # Allows use of _Nullable, _Nonnull & _Null_unspecified
- "-Wno-nullability-extension",
- ]
- }
-}
group("abseil") {
# When building within Chromium or ANGLE we need to include "//third_party/abseil-cpp:absl" while
@@ -74,14 +62,14 @@
public_deps = [ "$dawn_abseil_dir:absl" ]
} else {
public_deps = [
- "${dawn_abseil_dir}/absl/container:flat_hash_map",
- "${dawn_abseil_dir}/absl/container:flat_hash_set",
- "${dawn_abseil_dir}/absl/container:inlined_vector",
- "${dawn_abseil_dir}/absl/numeric:bits",
- "${dawn_abseil_dir}/absl/strings:str_format",
- "${dawn_abseil_dir}/absl/strings:string_view",
- "${dawn_abseil_dir}/absl/strings:strings",
- "${dawn_abseil_dir}/absl/types:span",
+ "${dawn_root}/third_party/gn/abseil-cpp:bits",
+ "${dawn_root}/third_party/gn/abseil-cpp:flat_hash_map",
+ "${dawn_root}/third_party/gn/abseil-cpp:flat_hash_set",
+ "${dawn_root}/third_party/gn/abseil-cpp:inlined_vector",
+ "${dawn_root}/third_party/gn/abseil-cpp:span",
+ "${dawn_root}/third_party/gn/abseil-cpp:str_format",
+ "${dawn_root}/third_party/gn/abseil-cpp:string_view",
+ "${dawn_root}/third_party/gn/abseil-cpp:strings",
]
}
}
@@ -201,8 +189,6 @@
cflags = [ "-Wglobal-constructors" ]
}
- public_configs = [ ":abseil_config" ]
-
# Dependencies that are needed to compile dawn native entry points in
# FooBackend.cpp need to be public deps so they are propagated to the
# dawn native target
@@ -448,7 +434,7 @@
"user32.lib",
"delayimp.lib",
]
- public_configs += [ ":win_delayload" ]
+ public_configs = [ ":win_delayload" ]
}
if (dawn_is_winuwp && is_debug) {
diff --git a/src/dawn/utils/BUILD.gn b/src/dawn/utils/BUILD.gn
index 035ddc6..2c302f5 100644
--- a/src/dawn/utils/BUILD.gn
+++ b/src/dawn/utils/BUILD.gn
@@ -34,36 +34,6 @@
# Utils for tests and samples
###############################################################################
-config("abseil_config") {
- if (!build_with_chromium && is_clang) {
- cflags = [
- # Allow the use of enable_if()
- "-Wno-gcc-compat",
- "-Wno-unreachable-code-break",
-
- # Allows use of _Nullable, _Nonnull & _Null_unspecified
- "-Wno-nullability-extension",
- ]
- }
-}
-
-group("abseil") {
- # When building within Chromium or ANGLE we need to include "//third_party/abseil-cpp:absl" while
- # it's beneficial to be more specific with standalone Dawn, especially when it comes to
- # including it as a dependency in other projects (such as Skia).
- if (build_with_chromium || build_with_angle) {
- public_deps = [ "$dawn_abseil_dir:absl" ]
- } else {
- public_deps = [
- "${dawn_abseil_dir}/absl/container:flat_hash_map",
- "${dawn_abseil_dir}/absl/strings",
- "${dawn_abseil_dir}/absl/strings:str_format",
- "${dawn_abseil_dir}/absl/strings:string_view",
- "${dawn_abseil_dir}/absl/types:span",
- ]
- }
-}
-
static_library("utils") {
configs += [
"${dawn_root}/src/dawn/common:internal_config",
@@ -133,11 +103,26 @@
sources += [ "PosixTimer.cpp" ]
}
- public_configs = [ ":abseil_config" ]
-
public_deps = [
":abseil",
"${dawn_root}/include/dawn:cpp_headers",
"${dawn_root}/src/dawn/partition_alloc:raw_ptr",
]
}
+
+group("abseil") {
+ # When building within Chromium or ANGLE we need to include "//third_party/abseil-cpp:absl" while
+ # it's beneficial to be more specific with standalone Dawn, especially when it comes to
+ # including it as a dependency in other projects (such as Skia).
+ if (build_with_chromium || build_with_angle) {
+ public_deps = [ "$dawn_abseil_dir:absl" ]
+ } else {
+ public_deps = [
+ "${dawn_root}/third_party/gn/abseil-cpp:flat_hash_map",
+ "${dawn_root}/third_party/gn/abseil-cpp:span",
+ "${dawn_root}/third_party/gn/abseil-cpp:str_format",
+ "${dawn_root}/third_party/gn/abseil-cpp:string_view",
+ "${dawn_root}/third_party/gn/abseil-cpp:strings",
+ ]
+ }
+}
diff --git a/src/dawn/utils/CMakeLists.txt b/src/dawn/utils/CMakeLists.txt
index 8795198..5eb7120 100644
--- a/src/dawn/utils/CMakeLists.txt
+++ b/src/dawn/utils/CMakeLists.txt
@@ -139,5 +139,3 @@
absl::flat_hash_map
${private_system_depends}
)
-
-
diff --git a/src/dawn/wire/BUILD.gn b/src/dawn/wire/BUILD.gn
index 1461124..3ae02d9 100644
--- a/src/dawn/wire/BUILD.gn
+++ b/src/dawn/wire/BUILD.gn
@@ -62,19 +62,6 @@
]
}
-config("abseil_config") {
- if (!build_with_chromium && is_clang) {
- cflags = [
- # Allow the use of enable_if()
- "-Wno-gcc-compat",
- "-Wno-unreachable-code-break",
-
- # Allows use of _Nullable, _Nonnull & _Null_unspecified
- "-Wno-nullability-extension",
- ]
- }
-}
-
group("abseil") {
# When building within Chromium or ANGLE we need to include "//third_party/abseil-cpp:absl" while
# it's beneficial to be more specific with standalone Dawn, especially when it comes to
@@ -83,9 +70,9 @@
public_deps = [ "$dawn_abseil_dir:absl" ]
} else {
public_deps = [
- "${dawn_abseil_dir}/absl/container:flat_hash_map",
- "${dawn_abseil_dir}/absl/container:flat_hash_set",
- "${dawn_abseil_dir}/absl/types:span",
+ "${dawn_root}/third_party/gn/abseil-cpp:flat_hash_map",
+ "${dawn_root}/third_party/gn/abseil-cpp:flat_hash_set",
+ "${dawn_root}/third_party/gn/abseil-cpp:span",
]
}
}
@@ -169,8 +156,6 @@
"server/ServerSurface.cpp",
]
- public_configs = [ ":abseil_config" ]
-
# Make headers publicly visible
public_deps = [
":abseil",
diff --git a/src/dawn/wire/CMakeLists.txt b/src/dawn/wire/CMakeLists.txt
index 8e2a642..b408761 100644
--- a/src/dawn/wire/CMakeLists.txt
+++ b/src/dawn/wire/CMakeLists.txt
@@ -130,7 +130,6 @@
dawn::partition_alloc
tint_lang_wgsl
)
-
target_compile_definitions(dawn_wire PRIVATE "DAWN_WIRE_IMPLEMENTATION")
if(BUILD_SHARED_LIBS)
target_compile_definitions(dawn_wire PRIVATE "DAWN_WIRE_SHARED_LIBRARY")
diff --git a/src/tint/BUILD.gn b/src/tint/BUILD.gn
index f40782f..3e8256f 100644
--- a/src/tint/BUILD.gn
+++ b/src/tint/BUILD.gn
@@ -121,6 +121,14 @@
defines += [ "TINT_BUILD_IR_BINARY=0" ]
}
+ if (tint_build_ir_fuzzer) {
+ assert(tint_build_ir_binary,
+ "tint_build_ir_fuzzer requires tint_build_ir_binary")
+ defines += [ "TINT_BUILD_IR_FUZZER=1" ]
+ } else {
+ defines += [ "TINT_BUILD_IR_FUZZER=0" ]
+ }
+
if (tint_build_is_win) {
defines += [ "TINT_BUILD_IS_WIN=1" ]
} else {
@@ -279,7 +287,7 @@
if (build_with_chromium || build_with_angle) {
public_deps = [ "$dawn_abseil_dir:absl" ]
} else {
- public_deps = [ "${dawn_abseil_dir}/absl/strings" ]
+ public_deps = [ "${dawn_root}/third_party/gn/abseil-cpp:strings" ]
}
}
@@ -316,25 +324,27 @@
]
outputs = [ fuzzer_corpus_wgsl_stamp ]
}
- # TODO(409348527): Re-enable corpus generation
- # if (tint_build_ir_binary && tint_build_wgsl_reader) {
- # action("tint_generate_ir_corpus") {
- # testonly = true
- # script = "${tint_src_dir}/cmd/fuzz/generate_tint_corpus.py"
- # sources = [ "${script}" ]
- # deps = [
- # ":tint_generate_wgsl_corpus",
- # "${tint_src_dir}/cmd/fuzz/ir/as",
- # ]
- # args = [
- # rebase_path(fuzzer_corpus_wgsl_dir, root_build_dir),
- # rebase_path(fuzzer_corpus_dir, root_build_dir),
- # "--ir_as=" +
- # rebase_path("${root_build_dir}/ir_fuzz_as", root_build_dir),
- # ]
- # outputs = [ fuzzer_corpus_ir_stamp ]
- # }
- # }
+
+ if (tint_build_ir_fuzzer) {
+ if (tint_build_cmds && tint_build_wgsl_reader) {
+ action("tint_generate_ir_corpus") {
+ testonly = true
+ script = "${tint_src_dir}/cmd/fuzz/generate_tint_corpus.py"
+ sources = [ "${script}" ]
+ deps = [
+ ":tint_generate_wgsl_corpus",
+ "${tint_src_dir}/cmd/fuzz/ir/as",
+ ]
+ args = [
+ rebase_path(fuzzer_corpus_wgsl_dir, root_build_dir),
+ rebase_path(fuzzer_corpus_dir, root_build_dir),
+ "--ir_as=" +
+ rebase_path("${root_build_dir}/ir_fuzz_as", root_build_dir),
+ ]
+ outputs = [ fuzzer_corpus_ir_stamp ]
+ }
+ }
+ }
}
###############################################################################
@@ -355,7 +365,7 @@
if (tint_build_tintd) {
deps += [ "${tint_src_dir}/cmd/tintd" ]
}
- if (tint_has_fuzzers && tint_build_ir_binary) {
+ if (tint_build_ir_fuzzer) {
if (tint_build_wgsl_reader) {
deps += [ "${tint_src_dir}/cmd/fuzz/ir/as" ]
}
@@ -370,9 +380,10 @@
deps = []
if (tint_has_fuzzers) {
deps += [ "${tint_src_dir}/cmd/fuzz/wgsl" ]
- if (tint_build_ir_binary) {
- deps += [ "${tint_src_dir}/cmd/fuzz/ir" ]
- }
+ }
+
+ if (tint_build_ir_fuzzer) {
+ deps += [ "${tint_src_dir}/cmd/fuzz/ir" ]
}
}
diff --git a/src/tint/CMakeLists.txt b/src/tint/CMakeLists.txt
index 88f6828..6f6b707 100644
--- a/src/tint/CMakeLists.txt
+++ b/src/tint/CMakeLists.txt
@@ -58,6 +58,10 @@
endif()
endif()
+if (TINT_BUILD_IR_FUZZER AND NOT TINT_BUILD_IR_BINARY)
+ message(FATAL_ERROR "TINT_BUILD_IR_FUZZER requires TINT_BUILD_IR_BINARY")
+endif()
+
################################################################################
# Helper functions
################################################################################
@@ -68,6 +72,7 @@
target_compile_definitions(${TARGET} PUBLIC -DTINT_BUILD_GLSL_WRITER=$<BOOL:${TINT_BUILD_GLSL_WRITER}>)
target_compile_definitions(${TARGET} PUBLIC -DTINT_BUILD_HLSL_WRITER=$<BOOL:${TINT_BUILD_HLSL_WRITER}>)
target_compile_definitions(${TARGET} PUBLIC -DTINT_BUILD_IR_BINARY=$<BOOL:${TINT_BUILD_IR_BINARY}>)
+ target_compile_definitions(${TARGET} PUBLIC -DTINT_BUILD_IR_FUZZER=$<BOOL:${TINT_BUILD_IR_FUZZER}>)
target_compile_definitions(${TARGET} PUBLIC -DTINT_BUILD_IS_LINUX=$<BOOL:${TINT_BUILD_IS_LINUX}>)
target_compile_definitions(${TARGET} PUBLIC -DTINT_BUILD_IS_MAC=$<BOOL:${TINT_BUILD_IS_MAC}>)
target_compile_definitions(${TARGET} PUBLIC -DTINT_BUILD_IS_WIN=$<BOOL:${TINT_BUILD_IS_WIN}>)
@@ -509,15 +514,6 @@
target_link_libraries(${TARGET} PRIVATE
absl::strings
)
-
- if(NOT MSVC)
- target_compile_options(${TARGET} PUBLIC
- -Wno-gcc-compat
- -Wno-unreachable-code-break
- -Wno-nullability-extension
- )
- endif()
-
elseif(${DEPENDENCY} STREQUAL "dl")
target_link_libraries(${TARGET} PRIVATE ${CMAKE_DL_LIBS})
elseif(${DEPENDENCY} STREQUAL "dxc-include")
diff --git a/src/tint/cmd/fuzz/generate_tint_corpus.py b/src/tint/cmd/fuzz/generate_tint_corpus.py
index 3ade3b6..d4a4402 100644
--- a/src/tint/cmd/fuzz/generate_tint_corpus.py
+++ b/src/tint/cmd/fuzz/generate_tint_corpus.py
@@ -348,12 +348,9 @@
logger.info(f"Generating IR corpus to \'{options.ir_corpus_dir}\' ...")
create_clean_dir(options.ir_corpus_dir)
- gen_env = os.environ.copy()
- gen_env["ASAN_OPTIONS"] = "detect_odr_violation=0"
-
gen_cmd = [options.ir_as_bin, options.input_dir, options.ir_corpus_dir]
logger.info(f"Invoking \'{' '.join(gen_cmd)}\'")
- subprocess.run(gen_cmd, env=gen_env)
+ subprocess.run(gen_cmd)
touch_stamp_file(options.output_dir, "ir")
logger.info("Finished generating IR corpus")
diff --git a/src/tint/cmd/fuzz/ir/BUILD.bazel b/src/tint/cmd/fuzz/ir/BUILD.bazel
index 1ff99b9..68cf24d 100644
--- a/src/tint/cmd/fuzz/ir/BUILD.bazel
+++ b/src/tint/cmd/fuzz/ir/BUILD.bazel
@@ -53,6 +53,11 @@
)
alias(
+ name = "tint_build_ir_fuzzer",
+ actual = "//src/tint:tint_build_ir_fuzzer_true",
+)
+
+alias(
name = "tint_build_msl_writer",
actual = "//src/tint:tint_build_msl_writer_true",
)
@@ -73,10 +78,10 @@
)
selects.config_setting_group(
- name = "tint_build_ir_binary_and_tint_build_wgsl_reader",
+ name = "tint_build_ir_binary_and_tint_build_ir_fuzzer",
match_all = [
":tint_build_ir_binary",
- ":tint_build_wgsl_reader",
+ ":tint_build_ir_fuzzer",
],
)
diff --git a/src/tint/cmd/fuzz/ir/BUILD.cfg b/src/tint/cmd/fuzz/ir/BUILD.cfg
index 603f32f..84ec9c5 100644
--- a/src/tint/cmd/fuzz/ir/BUILD.cfg
+++ b/src/tint/cmd/fuzz/ir/BUILD.cfg
@@ -1,14 +1,12 @@
{
"fuzz_cmd": {
- /* 'tint_build_wgsl_reader' is needed for generating the corpus. */
- "condition": "tint_build_ir_binary && tint_build_wgsl_reader",
+ "Condition": "tint_build_ir_binary && tint_build_ir_fuzzer",
/* The Tint fuzzer executable for IR-input. */
"OutputName": "tint_ir_fuzzer",
"AdditionalDependencies": {
/* Depend on all the fuzz targets to pull them all together. */
"Internal": [
"**:fuzz",
- "cmd/fuzz/ir/helpers",
"utils/protos/ir_fuzz:proto"
],
"External": [ "libprotobuf-mutator" ]
diff --git a/src/tint/cmd/fuzz/ir/BUILD.cmake b/src/tint/cmd/fuzz/ir/BUILD.cmake
index acfa4b0..8b74183 100644
--- a/src/tint/cmd/fuzz/ir/BUILD.cmake
+++ b/src/tint/cmd/fuzz/ir/BUILD.cmake
@@ -38,11 +38,11 @@
include(cmd/fuzz/ir/dis/BUILD.cmake)
include(cmd/fuzz/ir/helpers/BUILD.cmake)
-if(TINT_BUILD_IR_BINARY AND TINT_BUILD_WGSL_READER)
+if(TINT_BUILD_IR_BINARY AND TINT_BUILD_IR_FUZZER)
################################################################################
# Target: tint_cmd_fuzz_ir_fuzz_cmd
# Kind: fuzz_cmd
-# Condition: TINT_BUILD_IR_BINARY AND TINT_BUILD_WGSL_READER
+# Condition: TINT_BUILD_IR_BINARY AND TINT_BUILD_IR_FUZZER
################################################################################
tint_add_target(tint_cmd_fuzz_ir_fuzz_cmd fuzz_cmd
cmd/fuzz/ir/main_fuzz.cc
@@ -50,7 +50,6 @@
tint_target_add_dependencies(tint_cmd_fuzz_ir_fuzz_cmd fuzz_cmd
tint_api_common
- tint_cmd_fuzz_ir_helpers
tint_cmd_fuzz_ir_fuzz
tint_lang_core
tint_lang_core_constant
@@ -96,10 +95,15 @@
tint_target_add_dependencies(tint_cmd_fuzz_ir_fuzz_cmd fuzz_cmd
tint_lang_core_ir_binary
tint_lang_core_ir_binary_fuzz
- tint_utils_protos_ir_fuzz_proto
)
endif(TINT_BUILD_IR_BINARY)
+if(TINT_BUILD_IR_BINARY AND TINT_BUILD_IR_FUZZER)
+ tint_target_add_dependencies(tint_cmd_fuzz_ir_fuzz_cmd fuzz_cmd
+ tint_utils_protos_ir_fuzz_proto
+ )
+endif(TINT_BUILD_IR_BINARY AND TINT_BUILD_IR_FUZZER)
+
if(TINT_BUILD_MSL_WRITER)
tint_target_add_dependencies(tint_cmd_fuzz_ir_fuzz_cmd fuzz_cmd
tint_lang_msl_writer_fuzz
@@ -126,7 +130,7 @@
tint_target_set_output_name(tint_cmd_fuzz_ir_fuzz_cmd fuzz_cmd "tint_ir_fuzzer")
-endif(TINT_BUILD_IR_BINARY AND TINT_BUILD_WGSL_READER)
+endif(TINT_BUILD_IR_BINARY AND TINT_BUILD_IR_FUZZER)
################################################################################
# Target: tint_cmd_fuzz_ir_fuzz
# Kind: fuzz
diff --git a/src/tint/cmd/fuzz/ir/BUILD.gn b/src/tint/cmd/fuzz/ir/BUILD.gn
index 2278b59..93969f6 100644
--- a/src/tint/cmd/fuzz/ir/BUILD.gn
+++ b/src/tint/cmd/fuzz/ir/BUILD.gn
@@ -78,7 +78,7 @@
]
}
}
-if (tint_build_ir_binary && tint_build_wgsl_reader) {
+if (tint_build_ir_binary && tint_build_ir_fuzzer) {
tint_fuzzer_test("ir") {
output_name = "tint_ir_fuzzer"
sources = [ "main_fuzz.cc" ]
@@ -87,7 +87,6 @@
"${tint_lpm_dir}:libprotobuf-mutator",
"${tint_src_dir}/api/common",
"${tint_src_dir}/cmd/fuzz/ir:fuzz",
- "${tint_src_dir}/cmd/fuzz/ir/helpers",
"${tint_src_dir}/lang/core",
"${tint_src_dir}/lang/core/constant",
"${tint_src_dir}/lang/core/ir",
@@ -123,10 +122,13 @@
deps += [
"${tint_src_dir}/lang/core/ir/binary",
"${tint_src_dir}/lang/core/ir/binary:fuzz",
- "${tint_src_dir}/utils/protos/ir_fuzz:proto",
]
}
+ if (tint_build_ir_binary && tint_build_ir_fuzzer) {
+ deps += [ "${tint_src_dir}/utils/protos/ir_fuzz:proto" ]
+ }
+
if (tint_build_msl_writer) {
deps += [ "${tint_src_dir}/lang/msl/writer:fuzz" ]
}
diff --git a/src/tint/cmd/fuzz/ir/as/BUILD.bazel b/src/tint/cmd/fuzz/ir/as/BUILD.bazel
index a51909f..045a216 100644
--- a/src/tint/cmd/fuzz/ir/as/BUILD.bazel
+++ b/src/tint/cmd/fuzz/ir/as/BUILD.bazel
@@ -72,6 +72,10 @@
] + select({
":tint_build_ir_binary": [
"//src/tint/lang/core/ir/binary",
+ ],
+ "//conditions:default": [],
+ }) + select({
+ ":tint_build_ir_binary_and_tint_build_ir_fuzzer": [
"",
],
"//conditions:default": [],
@@ -96,6 +100,11 @@
)
alias(
+ name = "tint_build_ir_fuzzer",
+ actual = "//src/tint:tint_build_ir_fuzzer_true",
+)
+
+alias(
name = "tint_build_spv_reader",
actual = "//src/tint:tint_build_spv_reader_true",
)
@@ -106,10 +115,18 @@
)
selects.config_setting_group(
- name = "tint_build_ir_binary_and_tint_build_wgsl_reader",
+ name = "tint_build_ir_binary_and_tint_build_ir_fuzzer",
+ match_all = [
+ ":tint_build_ir_binary",
+ ":tint_build_ir_fuzzer",
+ ],
+)
+selects.config_setting_group(
+ name = "tint_build_ir_binary_and_tint_build_wgsl_reader_and_tint_build_ir_fuzzer",
match_all = [
":tint_build_ir_binary",
":tint_build_wgsl_reader",
+ ":tint_build_ir_fuzzer",
],
)
diff --git a/src/tint/cmd/fuzz/ir/as/BUILD.cfg b/src/tint/cmd/fuzz/ir/as/BUILD.cfg
index 5df91fa..4586cfc 100644
--- a/src/tint/cmd/fuzz/ir/as/BUILD.cfg
+++ b/src/tint/cmd/fuzz/ir/as/BUILD.cfg
@@ -1,10 +1,7 @@
{
"cmd": {
- "Condition": "tint_build_ir_binary && tint_build_wgsl_reader",
+ "Condition": "tint_build_ir_binary && tint_build_wgsl_reader && tint_build_ir_fuzzer",
"OutputName": "ir_fuzz_as",
- "Internal": [
- "cmd/fuzz/ir/helpers",
- "utils/protos/ir_fuzz:proto"
- ],
+ "Internal": [ "utils/protos/ir_fuzz:proto" ],
},
}
diff --git a/src/tint/cmd/fuzz/ir/as/BUILD.cmake b/src/tint/cmd/fuzz/ir/as/BUILD.cmake
index de36d00..4f7ce4b 100644
--- a/src/tint/cmd/fuzz/ir/as/BUILD.cmake
+++ b/src/tint/cmd/fuzz/ir/as/BUILD.cmake
@@ -34,11 +34,11 @@
# Do not modify this file directly
################################################################################
-if(TINT_BUILD_IR_BINARY AND TINT_BUILD_WGSL_READER)
+if(TINT_BUILD_IR_BINARY AND TINT_BUILD_WGSL_READER AND TINT_BUILD_IR_FUZZER)
################################################################################
# Target: tint_cmd_fuzz_ir_as_cmd
# Kind: cmd
-# Condition: TINT_BUILD_IR_BINARY AND TINT_BUILD_WGSL_READER
+# Condition: TINT_BUILD_IR_BINARY AND TINT_BUILD_WGSL_READER AND TINT_BUILD_IR_FUZZER
################################################################################
tint_add_target(tint_cmd_fuzz_ir_as_cmd cmd
cmd/fuzz/ir/as/main.cc
@@ -80,10 +80,15 @@
if(TINT_BUILD_IR_BINARY)
tint_target_add_dependencies(tint_cmd_fuzz_ir_as_cmd cmd
tint_lang_core_ir_binary
- tint_utils_protos_ir_fuzz_proto
)
endif(TINT_BUILD_IR_BINARY)
+if(TINT_BUILD_IR_BINARY AND TINT_BUILD_IR_FUZZER)
+ tint_target_add_dependencies(tint_cmd_fuzz_ir_as_cmd cmd
+ tint_utils_protos_ir_fuzz_proto
+ )
+endif(TINT_BUILD_IR_BINARY AND TINT_BUILD_IR_FUZZER)
+
if(TINT_BUILD_SPV_READER)
tint_target_add_dependencies(tint_cmd_fuzz_ir_as_cmd cmd
tint_lang_spirv_reader_common
@@ -98,4 +103,4 @@
tint_target_set_output_name(tint_cmd_fuzz_ir_as_cmd cmd "ir_fuzz_as")
-endif(TINT_BUILD_IR_BINARY AND TINT_BUILD_WGSL_READER)
\ No newline at end of file
+endif(TINT_BUILD_IR_BINARY AND TINT_BUILD_WGSL_READER AND TINT_BUILD_IR_FUZZER)
\ No newline at end of file
diff --git a/src/tint/cmd/fuzz/ir/as/BUILD.gn b/src/tint/cmd/fuzz/ir/as/BUILD.gn
index 181f221..dff119b 100644
--- a/src/tint/cmd/fuzz/ir/as/BUILD.gn
+++ b/src/tint/cmd/fuzz/ir/as/BUILD.gn
@@ -38,7 +38,7 @@
import("../../../../../../scripts/tint_overrides_with_defaults.gni")
import("${tint_src_dir}/tint.gni")
-if (tint_build_ir_binary && tint_build_wgsl_reader) {
+if (tint_build_ir_binary && tint_build_wgsl_reader && tint_build_ir_fuzzer) {
tint_executable("as") {
output_name = "ir_fuzz_as"
sources = [ "main.cc" ]
@@ -73,10 +73,11 @@
]
if (tint_build_ir_binary) {
- deps += [
- "${tint_src_dir}/lang/core/ir/binary",
- "${tint_src_dir}/utils/protos/ir_fuzz:proto",
- ]
+ deps += [ "${tint_src_dir}/lang/core/ir/binary" ]
+ }
+
+ if (tint_build_ir_binary && tint_build_ir_fuzzer) {
+ deps += [ "${tint_src_dir}/utils/protos/ir_fuzz:proto" ]
}
if (tint_build_spv_reader) {
diff --git a/src/tint/cmd/fuzz/ir/dis/BUILD.bazel b/src/tint/cmd/fuzz/ir/dis/BUILD.bazel
index 7e052e7..4e27018 100644
--- a/src/tint/cmd/fuzz/ir/dis/BUILD.bazel
+++ b/src/tint/cmd/fuzz/ir/dis/BUILD.bazel
@@ -71,6 +71,10 @@
] + select({
":tint_build_ir_binary": [
"//src/tint/lang/core/ir/binary",
+ ],
+ "//conditions:default": [],
+ }) + select({
+ ":tint_build_ir_binary_and_tint_build_ir_fuzzer": [
"",
],
"//conditions:default": [],
@@ -106,6 +110,11 @@
)
alias(
+ name = "tint_build_ir_fuzzer",
+ actual = "//src/tint:tint_build_ir_fuzzer_true",
+)
+
+alias(
name = "tint_build_spv_reader",
actual = "//src/tint:tint_build_spv_reader_true",
)
@@ -129,9 +138,17 @@
)
selects.config_setting_group(
- name = "tint_build_ir_binary_and_tint_build_wgsl_writer_and_tint_build_spv_writer",
+ name = "tint_build_ir_binary_and_tint_build_ir_fuzzer",
match_all = [
":tint_build_ir_binary",
+ ":tint_build_ir_fuzzer",
+ ],
+)
+selects.config_setting_group(
+ name = "tint_build_ir_binary_and_tint_build_ir_fuzzer_and_tint_build_wgsl_writer_and_tint_build_spv_writer",
+ match_all = [
+ ":tint_build_ir_binary",
+ ":tint_build_ir_fuzzer",
":tint_build_wgsl_writer",
":tint_build_spv_writer",
],
diff --git a/src/tint/cmd/fuzz/ir/dis/BUILD.cfg b/src/tint/cmd/fuzz/ir/dis/BUILD.cfg
index 2f03b95..93c3706 100644
--- a/src/tint/cmd/fuzz/ir/dis/BUILD.cfg
+++ b/src/tint/cmd/fuzz/ir/dis/BUILD.cfg
@@ -1,6 +1,6 @@
{
"cmd": {
- "Condition": "tint_build_ir_binary && tint_build_wgsl_writer && tint_build_spv_writer",
+ "Condition": "tint_build_ir_binary && tint_build_ir_fuzzer && tint_build_wgsl_writer && tint_build_spv_writer",
"OutputName": "ir_fuzz_dis",
"Internal": [ "utils/protos/ir_fuzz:proto" ],
},
diff --git a/src/tint/cmd/fuzz/ir/dis/BUILD.cmake b/src/tint/cmd/fuzz/ir/dis/BUILD.cmake
index cf9ff9e..4c0599d 100644
--- a/src/tint/cmd/fuzz/ir/dis/BUILD.cmake
+++ b/src/tint/cmd/fuzz/ir/dis/BUILD.cmake
@@ -34,11 +34,11 @@
# Do not modify this file directly
################################################################################
-if(TINT_BUILD_IR_BINARY AND TINT_BUILD_WGSL_WRITER AND TINT_BUILD_SPV_WRITER)
+if(TINT_BUILD_IR_BINARY AND TINT_BUILD_IR_FUZZER AND TINT_BUILD_WGSL_WRITER AND TINT_BUILD_SPV_WRITER)
################################################################################
# Target: tint_cmd_fuzz_ir_dis_cmd
# Kind: cmd
-# Condition: TINT_BUILD_IR_BINARY AND TINT_BUILD_WGSL_WRITER AND TINT_BUILD_SPV_WRITER
+# Condition: TINT_BUILD_IR_BINARY AND TINT_BUILD_IR_FUZZER AND TINT_BUILD_WGSL_WRITER AND TINT_BUILD_SPV_WRITER
################################################################################
tint_add_target(tint_cmd_fuzz_ir_dis_cmd cmd
cmd/fuzz/ir/dis/main.cc
@@ -79,10 +79,15 @@
if(TINT_BUILD_IR_BINARY)
tint_target_add_dependencies(tint_cmd_fuzz_ir_dis_cmd cmd
tint_lang_core_ir_binary
- tint_utils_protos_ir_fuzz_proto
)
endif(TINT_BUILD_IR_BINARY)
+if(TINT_BUILD_IR_BINARY AND TINT_BUILD_IR_FUZZER)
+ tint_target_add_dependencies(tint_cmd_fuzz_ir_dis_cmd cmd
+ tint_utils_protos_ir_fuzz_proto
+ )
+endif(TINT_BUILD_IR_BINARY AND TINT_BUILD_IR_FUZZER)
+
if(TINT_BUILD_SPV_READER)
tint_target_add_dependencies(tint_cmd_fuzz_ir_dis_cmd cmd
tint_lang_spirv_reader_common
@@ -110,4 +115,4 @@
tint_target_set_output_name(tint_cmd_fuzz_ir_dis_cmd cmd "ir_fuzz_dis")
-endif(TINT_BUILD_IR_BINARY AND TINT_BUILD_WGSL_WRITER AND TINT_BUILD_SPV_WRITER)
\ No newline at end of file
+endif(TINT_BUILD_IR_BINARY AND TINT_BUILD_IR_FUZZER AND TINT_BUILD_WGSL_WRITER AND TINT_BUILD_SPV_WRITER)
\ No newline at end of file
diff --git a/src/tint/cmd/fuzz/ir/dis/BUILD.gn b/src/tint/cmd/fuzz/ir/dis/BUILD.gn
index aaa25d4..73fcdd8 100644
--- a/src/tint/cmd/fuzz/ir/dis/BUILD.gn
+++ b/src/tint/cmd/fuzz/ir/dis/BUILD.gn
@@ -38,7 +38,8 @@
import("../../../../../../scripts/tint_overrides_with_defaults.gni")
import("${tint_src_dir}/tint.gni")
-if (tint_build_ir_binary && tint_build_wgsl_writer && tint_build_spv_writer) {
+if (tint_build_ir_binary && tint_build_ir_fuzzer && tint_build_wgsl_writer &&
+ tint_build_spv_writer) {
tint_executable("dis") {
output_name = "ir_fuzz_dis"
sources = [ "main.cc" ]
@@ -72,10 +73,11 @@
]
if (tint_build_ir_binary) {
- deps += [
- "${tint_src_dir}/lang/core/ir/binary",
- "${tint_src_dir}/utils/protos/ir_fuzz:proto",
- ]
+ deps += [ "${tint_src_dir}/lang/core/ir/binary" ]
+ }
+
+ if (tint_build_ir_binary && tint_build_ir_fuzzer) {
+ deps += [ "${tint_src_dir}/utils/protos/ir_fuzz:proto" ]
}
if (tint_build_spv_reader) {
diff --git a/src/tint/lang/hlsl/writer/writer_fuzz.cc b/src/tint/lang/hlsl/writer/writer_fuzz.cc
index 6474b0e..c59bc9a 100644
--- a/src/tint/lang/hlsl/writer/writer_fuzz.cc
+++ b/src/tint/lang/hlsl/writer/writer_fuzz.cc
@@ -35,7 +35,6 @@
#include "src/tint/lang/hlsl/writer/helpers/generate_bindings.h"
#include "src/tint/lang/hlsl/writer/writer.h"
#include "src/tint/utils/command/command.h"
-
namespace tint::hlsl::writer {
namespace {
diff --git a/src/tint/tint.gni b/src/tint/tint.gni
index 010d41d..aa56777 100644
--- a/src/tint/tint.gni
+++ b/src/tint/tint.gni
@@ -77,7 +77,6 @@
if (!tint_has_protobuf) {
error("Tint needs protobuf to build a proto library")
}
-
proto_library(target_name) {
forward_variables_from(invoker, "*", [ "configs" ])
proto_in_dir = "${tint_root_dir}"
@@ -88,11 +87,13 @@
}
###############################################################################
-# Executables
+# Executables - only built when tint_build_cmds is enabled
###############################################################################
-template("tint_executable") {
- executable(target_name) {
- forward_variables_from(invoker, "*")
+if (tint_build_cmds) {
+ template("tint_executable") {
+ executable(target_name) {
+ forward_variables_from(invoker, "*")
+ }
}
}
@@ -230,10 +231,9 @@
seed_corpus = fuzzer_corpus_wgsl_dir
seed_corpus_deps = [ "${tint_src_dir}:tint_generate_wgsl_corpus" ]
} else if (target_name == "ir") {
- # TODO(409348527): Re-enable corpus generation
- # deps += [ "${tint_src_dir}:tint_generate_ir_corpus" ]
- # seed_corpus = fuzzer_corpus_ir_dir
- # seed_corpus_deps = [ "${tint_src_dir}:tint_generate_ir_corpus" ]
+ deps += [ "${tint_src_dir}:tint_generate_ir_corpus" ]
+ seed_corpus = fuzzer_corpus_ir_dir
+ seed_corpus_deps = [ "${tint_src_dir}:tint_generate_ir_corpus" ]
} else {
assert(false, "unsupported tint fuzzer target")
}
diff --git a/src/tint/utils/protos/ir_fuzz/BUILD.bazel b/src/tint/utils/protos/ir_fuzz/BUILD.bazel
index c280213..f8afa55 100644
--- a/src/tint/utils/protos/ir_fuzz/BUILD.bazel
+++ b/src/tint/utils/protos/ir_fuzz/BUILD.bazel
@@ -42,3 +42,16 @@
actual = "//src/tint:tint_build_ir_binary_true",
)
+alias(
+ name = "tint_build_ir_fuzzer",
+ actual = "//src/tint:tint_build_ir_fuzzer_true",
+)
+
+selects.config_setting_group(
+ name = "tint_build_ir_binary_and_tint_build_ir_fuzzer",
+ match_all = [
+ ":tint_build_ir_binary",
+ ":tint_build_ir_fuzzer",
+ ],
+)
+
diff --git a/src/tint/utils/protos/ir_fuzz/BUILD.cfg b/src/tint/utils/protos/ir_fuzz/BUILD.cfg
index f53fa37..9a6dd41 100644
--- a/src/tint/utils/protos/ir_fuzz/BUILD.cfg
+++ b/src/tint/utils/protos/ir_fuzz/BUILD.cfg
@@ -1,8 +1,8 @@
{
- "Condition": "tint_build_ir_binary",
+ "Condition": "tint_build_ir_binary && tint_build_ir_fuzzer",
"proto": {
"AdditionalDependencies": {
- "Internal": [ "utils/protos/ir:proto" ]
- },
+ "Internal": [ "utils/protos/ir:proto" ]
+ }
}
}
diff --git a/src/tint/utils/protos/ir_fuzz/BUILD.cmake b/src/tint/utils/protos/ir_fuzz/BUILD.cmake
index 98f627c..33dfa91 100644
--- a/src/tint/utils/protos/ir_fuzz/BUILD.cmake
+++ b/src/tint/utils/protos/ir_fuzz/BUILD.cmake
@@ -34,11 +34,11 @@
# Do not modify this file directly
################################################################################
-if(TINT_BUILD_IR_BINARY)
+if(TINT_BUILD_IR_BINARY AND TINT_BUILD_IR_FUZZER)
################################################################################
# Target: tint_utils_protos_ir_fuzz_proto
# Kind: proto
-# Condition: TINT_BUILD_IR_BINARY
+# Condition: TINT_BUILD_IR_BINARY AND TINT_BUILD_IR_FUZZER
################################################################################
tint_add_target(tint_utils_protos_ir_fuzz_proto proto
utils/protos/ir_fuzz/ir_fuzz.proto
@@ -50,4 +50,4 @@
)
endif(TINT_BUILD_IR_BINARY)
-endif(TINT_BUILD_IR_BINARY)
\ No newline at end of file
+endif(TINT_BUILD_IR_BINARY AND TINT_BUILD_IR_FUZZER)
\ No newline at end of file
diff --git a/src/tint/utils/protos/ir_fuzz/BUILD.gn b/src/tint/utils/protos/ir_fuzz/BUILD.gn
index d98319f..644809b 100644
--- a/src/tint/utils/protos/ir_fuzz/BUILD.gn
+++ b/src/tint/utils/protos/ir_fuzz/BUILD.gn
@@ -38,7 +38,7 @@
import("../../../../../scripts/tint_overrides_with_defaults.gni")
import("${tint_src_dir}/tint.gni")
-if (tint_build_ir_binary) {
+if (tint_build_ir_binary && tint_build_ir_fuzzer) {
tint_proto_library("proto") {
sources = [ "ir_fuzz.proto" ]
deps = []
diff --git a/testing b/testing
index ae97051..1bd0da6 160000
--- a/testing
+++ b/testing
@@ -1 +1 @@
-Subproject commit ae9705179f821d1dbd2b0a2ba7a6582faac7f86b
+Subproject commit 1bd0da6657e330cf26ed0702b3f456393587ad7c
diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt
index 3602599..15f40c8 100644
--- a/third_party/CMakeLists.txt
+++ b/third_party/CMakeLists.txt
@@ -28,9 +28,6 @@
# Don't build testing in third_party dependencies
set(BUILD_TESTING OFF)
-# Needed by some dependencies in third_party
-set(ABSL_ROOT_DIR ${DAWN_ABSEIL_DIR})
-
# fetch_dawn_dependencies.py is an alternative to using depot_tools
# It is particularly interesting when building dawn as a subdirectory in
# a parent project that does not want to use depot_tools.
diff --git a/third_party/abseil-cpp b/third_party/abseil-cpp
index 04dc59d..f81f6c0 160000
--- a/third_party/abseil-cpp
+++ b/third_party/abseil-cpp
@@ -1 +1 @@
-Subproject commit 04dc59d2c83238cb1fcb49083e5e416643a899ce
+Subproject commit f81f6c011baf9b0132a5594c034fe0060820711d
diff --git a/third_party/fuzztest/BUILD.gn b/third_party/fuzztest/BUILD.gn
deleted file mode 100644
index 3491eae..0000000
--- a/third_party/fuzztest/BUILD.gn
+++ /dev/null
@@ -1,443 +0,0 @@
-# Copyright 2023 The Chromium Authors
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# This file is a partial translation of
-# //third_party/fuzztest/src/centipede/BUILD
-# into BUILD.gn format.
-#
-# It contains support for both:
-# - centipede, a way of building and running Chromium's existing fuzzing
-# targets using an out-of-process runner.
-# - fuzztest, a way of building new fuzzing targets using simpler macros.
-
-import("//build/config/android/config.gni")
-import("//build/config/sanitizers/sanitizers.gni")
-import("//build_overrides/build.gni")
-
-# Retain full optimization level for the engine parts independent of the
-# optimizations set for the fuzz target.
-fuzztest_remove_configs = fuzzing_engine_remove_configs +
- [ "//build/config/compiler:default_optimization" ]
-fuzztest_add_configs = fuzzing_engine_add_configs + [
- "//build/config/compiler:optimize",
- ":fuzztest_internal_config",
- ":fuzztest_public_config",
- ]
-
-config("fuzztest_internal_config") {
- cflags = [
- "-Wno-unused-private-field",
- "-Wno-unreachable-code-return",
- "-Wno-unused-but-set-variable",
- "-Wno-shadow",
- "-Wno-unused-const-variable",
- "-Wno-unused-function",
- "-Wno-inconsistent-missing-override",
- "-Wno-unused-lambda-capture",
- "-Wno-c++98-compat-extra-semi",
- "-Wno-deprecated-declarations",
- ]
-
- # int_utils.h depends on an SSE 4.2 intrinsic.
- if (current_cpu == "x64") {
- cflags += [ "-msse4.2" ]
- }
-}
-
-config("fuzztest_public_config") {
- include_dirs = [ "src" ]
-
- defines = [
- # Riegeli is a library which centipede can use to store data more
- # efficiently. It's not yet available in Chromium, so disable
- # for now.
- "CENTIPEDE_DISABLE_RIEGELI",
- ]
- if (!enable_fuzztest_fuzz) {
- defines += [
- # In fuzztest's unit-test mode, coverage collection doesn't work
- # with multiple DSOs, which Chromium needs even in non-component
- # builds. Note that this doesn't impact actual fuzzing mode e.g.
- # centipede.
- "FUZZTEST_NO_LEGACY_COVERAGE",
- ]
- }
- if (use_centipede) {
- defines += [ "FUZZTEST_USE_CENTIPEDE" ]
- } else if (use_fuzzing_engine && fuzzing_engine_supports_custom_main) {
- defines += [ "FUZZTEST_COMPATIBILITY_MODE" ]
- }
-
- # These flags will be applied to Chrome test code, so keep to the minimum
- # set required to compile fuzztest's headers. Those required to compile
- # fuzztest .cc files should go into fuzztest_internal_config
- cflags = [
- "-Wno-sign-compare", # https://github.com/google/centipede/issues/487,
- ]
-}
-
-if (use_centipede) {
- source_set("centipede_common") {
- testonly = true
- sources = [
- "src/centipede/binary_info.cc",
- "src/centipede/binary_info.h",
- "src/centipede/byte_array_mutator.cc",
- "src/centipede/byte_array_mutator.h",
- "src/centipede/command.cc",
- "src/centipede/control_flow.cc",
- "src/centipede/execution_metadata.cc",
- "src/centipede/execution_metadata.h",
- "src/centipede/feature.cc",
- "src/centipede/feature.h",
- "src/centipede/knobs.cc",
- "src/centipede/knobs.h",
- "src/centipede/pc_info.cc",
- "src/centipede/pc_info.h",
- "src/centipede/reverse_pc_table.h",
- "src/centipede/runner_cmp_trace.h",
- "src/centipede/runner_request.cc",
- "src/centipede/runner_request.h",
- "src/centipede/runner_result.cc",
- "src/centipede/runner_result.h",
- "src/centipede/shared_memory_blob_sequence.cc",
- "src/centipede/shared_memory_blob_sequence.h",
- "src/centipede/stop.cc",
- "src/centipede/stop.h",
- "src/centipede/symbol_table.cc",
- "src/centipede/util.cc",
- ]
- deps = [ "//third_party/abseil-cpp:absl_full" ]
- public_deps = [ ":common" ]
- configs -= fuzztest_remove_configs
- configs += fuzztest_add_configs
- }
-
- source_set("centipede_runner_no_main") {
- testonly = true
- sources = [
- "src/centipede/runner.cc",
- "src/centipede/runner.h",
- "src/centipede/runner_dl_info.cc",
- "src/centipede/runner_dl_info.h",
- "src/centipede/runner_fork_server.cc",
- "src/centipede/runner_interceptors.cc",
- "src/centipede/runner_interface.h",
- "src/centipede/runner_sancov.cc",
- "src/centipede/runner_sancov_object.cc",
- "src/centipede/runner_sancov_object.h",
- "src/centipede/runner_utils.cc",
- "src/centipede/runner_utils.h",
- ]
-
- deps = [
- ":centipede_common",
- "//third_party/abseil-cpp:absl_full",
- ]
- configs -= fuzztest_remove_configs
- configs += fuzztest_add_configs
-
- # Ensure that the centipede driver executable is also built
- # whenever we build any centipede-based fuzzer
- data_deps = [ ":centipede" ]
-
- # sancov symbols need to be exported for centipede to work correctly with
- # multi-dso.
- configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
- configs += [ "//build/config/gcc:symbol_visibility_default" ]
- }
-
- source_set("centipede_runner_main") {
- testonly = true
- deps = [
- ":centipede_runner_no_main",
- "//third_party/abseil-cpp:absl",
- ]
- configs -= fuzztest_remove_configs
- configs += fuzztest_add_configs
- sources = [ "src/centipede/runner_main.cc" ]
- }
-
- # Parts of centipede which are used for the external execution executable,
- # but are also now built into fuzztests themselves so that they no longer
- # depend on an external runner
- source_set("centipede_executable_engine") {
- configs -= fuzztest_remove_configs
- configs += fuzztest_add_configs
- include_dirs = [ "src" ]
- testonly = true
- public_deps = [ ":centipede_common" ]
- if (is_linux) {
- libs = [ "atomic" ]
- }
- deps = [
- ":fuzztest_internal",
- "//third_party/abseil-cpp:absl_full",
- ]
- sources = [
- "src/centipede/analyze_corpora.cc",
- "src/centipede/call_graph.cc",
- "src/centipede/centipede.cc",
- "src/centipede/centipede_callbacks.cc",
- "src/centipede/centipede_default_callbacks.cc",
- "src/centipede/centipede_interface.cc",
- "src/centipede/config_file.cc",
- "src/centipede/config_init.cc",
- "src/centipede/config_util.cc",
- "src/centipede/corpus.cc",
- "src/centipede/corpus_io.cc",
- "src/centipede/coverage.cc",
- "src/centipede/distill.cc",
- "src/centipede/distill.h",
- "src/centipede/environment.cc",
- "src/centipede/feature_set.cc",
- "src/centipede/feature_set.h",
- "src/centipede/fuzztest_mutator.cc",
- "src/centipede/fuzztest_mutator.h",
- "src/centipede/minimize_crash.cc",
- "src/centipede/periodic_action.cc",
- "src/centipede/periodic_action.h",
- "src/centipede/resource_pool.cc",
- "src/centipede/rusage_profiler.cc",
- "src/centipede/rusage_stats.cc",
- "src/centipede/seed_corpus_maker_lib.cc",
- "src/centipede/seed_corpus_maker_lib.h",
- "src/centipede/stats.cc",
- "src/centipede/workdir.cc",
- "src/centipede/workdir.h",
- ]
- }
-
- # The centipede out-of-process runner executable.
- executable("centipede") {
- testonly = true
- configs -= fuzztest_remove_configs
- configs += fuzztest_add_configs
- deps = [
- ":centipede_executable_engine",
- "//third_party/abseil-cpp:absl_full",
- ]
- sources = [
- "src/centipede/centipede_main.cc",
- "src/centipede/environment_flags.cc",
- "src/centipede/environment_flags.h",
- ]
- }
-}
-
-if (use_centipede || enable_fuzztest_fuzz) {
- source_set("centipede_weak_sancov_stubs") {
- sources = [ "src/centipede/weak_sancov_stubs.cc" ]
- }
-}
-
-# Parts of fuzztest internals which are safe to include in all sorts
-# of test-related code, including other fuzzers.
-source_set("fuzztest_internal") {
- if (defined(android_ndk_major_version) && android_ndk_major_version < 28) {
- # Android API level 28+ has posix_spawnp
- defines = [ "FUZZTEST_DISABLE_SUBPROCESS" ]
- }
-
- sources = [
- "src/fuzztest/domain.h",
- "src/fuzztest/domain_core.h",
- "src/fuzztest/fuzztest.h",
- "src/fuzztest/fuzztest_macros.cc",
- "src/fuzztest/fuzztest_macros.h",
- "src/fuzztest/googletest_fixture_adapter.h",
- "src/fuzztest/internal/any.h",
- "src/fuzztest/internal/centipede_adaptor.h",
- "src/fuzztest/internal/compatibility_mode.h",
- "src/fuzztest/internal/configuration.cc",
- "src/fuzztest/internal/configuration.h",
- "src/fuzztest/internal/corpus_database.cc",
- "src/fuzztest/internal/corpus_database.h",
- "src/fuzztest/internal/coverage.cc",
- "src/fuzztest/internal/coverage.h",
- "src/fuzztest/internal/domains/absl_helpers.h",
- "src/fuzztest/internal/domains/aggregate_of_impl.h",
- "src/fuzztest/internal/domains/arbitrary_impl.h",
- "src/fuzztest/internal/domains/bit_flag_combination_of_impl.h",
- "src/fuzztest/internal/domains/container_mutation_helpers.h",
- "src/fuzztest/internal/domains/container_of_impl.h",
- "src/fuzztest/internal/domains/domain_base.cc",
- "src/fuzztest/internal/domains/domain_base.h",
- "src/fuzztest/internal/domains/element_of_impl.h",
- "src/fuzztest/internal/domains/filter_impl.h",
- "src/fuzztest/internal/domains/flat_map_impl.h",
- "src/fuzztest/internal/domains/in_grammar_impl.cc",
- "src/fuzztest/internal/domains/in_grammar_impl.h",
- "src/fuzztest/internal/domains/in_range_impl.h",
- "src/fuzztest/internal/domains/in_regexp_impl.h",
- "src/fuzztest/internal/domains/map_impl.h",
- "src/fuzztest/internal/domains/one_of_impl.h",
- "src/fuzztest/internal/domains/optional_of_impl.h",
- "src/fuzztest/internal/domains/protobuf_domain_impl.h",
- "src/fuzztest/internal/domains/regexp_dfa.cc",
- "src/fuzztest/internal/domains/regexp_dfa.h",
- "src/fuzztest/internal/domains/serialization_helpers.h",
- "src/fuzztest/internal/domains/smart_pointer_of_impl.h",
- "src/fuzztest/internal/domains/unique_elements_container_of_impl.h",
- "src/fuzztest/internal/domains/value_mutation_helpers.h",
- "src/fuzztest/internal/domains/variant_of_impl.h",
- "src/fuzztest/internal/fixture_driver.cc",
- "src/fuzztest/internal/fixture_driver.h",
- "src/fuzztest/internal/googletest_adaptor.cc",
- "src/fuzztest/internal/googletest_adaptor.h",
- "src/fuzztest/internal/io.cc",
- "src/fuzztest/internal/io.h",
- "src/fuzztest/internal/logging.cc",
- "src/fuzztest/internal/logging.h",
- "src/fuzztest/internal/meta.h",
- "src/fuzztest/internal/registration.h",
- "src/fuzztest/internal/registry.cc",
- "src/fuzztest/internal/registry.h",
- "src/fuzztest/internal/runtime.cc",
- "src/fuzztest/internal/runtime.h",
- "src/fuzztest/internal/seed_seq.cc",
- "src/fuzztest/internal/seed_seq.h",
- "src/fuzztest/internal/serialization.cc",
- "src/fuzztest/internal/serialization.h",
- "src/fuzztest/internal/status.cc",
- "src/fuzztest/internal/status.h",
- "src/fuzztest/internal/subprocess.cc",
- "src/fuzztest/internal/subprocess.h",
- "src/fuzztest/internal/table_of_recent_compares.h",
- "src/fuzztest/internal/type_support.cc",
- "src/fuzztest/internal/type_support.h",
- ]
-
- testonly = true
-
- deps = [
- "//testing/gtest",
- "//third_party/abseil-cpp:absl_full",
- ]
-
- # TODO(https://crbug.com/337736622): Remove this after M129 when V8 moves
- # protobuf back to //third_party/protobuf.
- if (!defined(protobuf_target_prefix)) {
- protobuf_target_prefix = "//third_party/protobuf"
- }
-
- public_deps = [
- ":common",
- "//third_party/abseil-cpp:absl",
-
- # For RE2 mutators. It's questionable whether we want to pull this library
- # into every fuzztest target, but this is the approach used in other
- # fuzztest contexts so we'll do the same
- "//third_party/re2",
-
- # For protobuf mutators
- "$protobuf_target_prefix:protobuf_lite",
- ]
-
- configs -= fuzztest_remove_configs
- configs += fuzztest_add_configs
-}
-
-source_set("common") {
- sources = [
- "src/common/bazel.cc",
- "src/common/bazel.h",
- "src/common/blob_file.cc",
- "src/common/blob_file.h",
- "src/common/defs.h",
- "src/common/hash.cc",
- "src/common/hash.h",
- "src/common/logging.h",
- "src/common/remote_file.cc",
- "src/common/remote_file.h",
- "src/common/remote_file_oss.cc",
- "src/common/sha1.cc",
- "src/common/sha1.h",
- "src/common/temp_dir.cc",
- "src/common/temp_dir.h",
- ]
-
- deps = [ "//third_party/abseil-cpp:absl_full" ]
- configs -= fuzztest_remove_configs
- configs += fuzztest_add_configs
-}
-
-# Fuzztest support. This allows regular test executables to contain
-# a FUZZ_TEST. Such tests/executables should depend directly on this target;
-# at this time there's no need to use a special gn template for fuzz tests.
-# The resulting executables may be used in a variety of modes:
-# ./my_test # just runs. The FUZZ_TEST runs for 1 second.
-# ./my_test --fuzz= # runs fuzzing indefinitely.
-# # Requires enable_fuzztest_fuzz gn argument.
-# ./my_test --fuzz= # If use_libfuzzer gn argument is enabled, this
-# # causes the test to emulate a regular libfuzzer fuzzer.
-# centipede --binary=./mytest # Allows the binary to be run using centipede
-# # out of process execution environment.
-# # Requires use_centipede gn argument.
-# Nothing in this target depends upon //testing/libfuzzer:is_a_fuzz_target,
-# so dependent binaries won't directly be built by the fuzzing build job.
-# However, any uses of the test("...") template which declare that they
-# have fuzztests will cause wrapper executables to be built (because they
-# will depend upon :is_a_fuzz_target). Such executables will have a data_dep
-# on the underlying fuzztest executable, so it will get built.
-source_set("fuzztest") {
- deps = [
- "//testing/gtest",
- "//third_party/abseil-cpp:absl_full",
- ]
- if (use_centipede) {
- # If we are building for centipede, we want to make fuzztest executables
- # which can be used as centipede fuzzers.
- sources = [ "src/fuzztest/internal/centipede_adaptor.cc" ]
- deps += [
- ":centipede_executable_engine",
- ":centipede_runner_no_main",
- ]
- } else if (use_fuzzing_engine && fuzzing_engine_supports_custom_main) {
- # Typically, libfuzzer.
- sources = [ "src/fuzztest/internal/compatibility_mode.cc" ]
- deps += [ "//testing/libfuzzer:fuzzing_engine_no_main_core" ]
- }
- public_deps = [ ":fuzztest_internal" ]
- configs -= fuzztest_remove_configs
- configs += fuzztest_add_configs
- public_configs = [ ":fuzztest_public_config" ]
- testonly = true
-}
-
-# Depend on this if you're a test runner executable (or similar)
-# with its own main() but you need to call InitFuzzTest.
-source_set("init_fuzztest") {
- sources = [
- "src/fuzztest/init_fuzztest.cc",
- "src/fuzztest/init_fuzztest.h",
- ]
- deps = [
- "//testing/gtest",
- "//third_party/abseil-cpp:absl_full",
- ]
- public_deps = [ ":fuzztest_internal" ]
- configs -= fuzztest_remove_configs
- configs += fuzztest_add_configs
- testonly = true
-}
-
-# Depend upon this if you need a main() function
-source_set("fuzztest_gtest_main") {
- deps = [
- "//testing/gtest",
- "//third_party/abseil-cpp:absl_full",
- ]
- sources = [ "src/fuzztest/fuzztest_gtest_main.cc" ]
- configs -= fuzztest_remove_configs
- configs += fuzztest_add_configs
- public_deps = [
- ":init_fuzztest",
- "//testing/gtest",
- ]
- if (use_centipede) {
- data_deps = [ ":centipede" ]
- }
- testonly = true
-}
diff --git a/third_party/fuzztest/src b/third_party/fuzztest/src
deleted file mode 160000
index 89408f9..0000000
--- a/third_party/fuzztest/src
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 89408f91d2f1101fe2d79199e7ed994a4d197eb8
diff --git a/third_party/gn/abseil-cpp/BUILD.gn b/third_party/gn/abseil-cpp/BUILD.gn
new file mode 100644
index 0000000..32e8369
--- /dev/null
+++ b/third_party/gn/abseil-cpp/BUILD.gn
@@ -0,0 +1,1063 @@
+# Copyright 2021 The Dawn & Tint Authors
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this
+# list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# 3. Neither the name of the copyright holder nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import("../../../scripts/dawn_overrides_with_defaults.gni")
+
+import("${dawn_root}/scripts/dawn_features.gni")
+
+config("absl_config") {
+ if (!build_with_chromium && is_clang) {
+ cflags = [
+ # Allow the use of enable_if()
+ "-Wno-gcc-compat",
+ "-Wno-unreachable-code-break",
+ ]
+ }
+
+ include_dirs = [ "${dawn_abseil_dir}" ]
+}
+
+template("absl_source_set") {
+ source_set(target_name) {
+ forward_variables_from(invoker, "*")
+
+ if (!defined(public_configs)) {
+ public_configs = []
+ }
+ public_configs += [ ":absl_config" ]
+ }
+}
+
+#
+# absl/algorithm
+#
+
+absl_source_set("algorithm") {
+ public = [ "${dawn_abseil_dir}/absl/algorithm/algorithm.h" ]
+ deps = [ ":config" ]
+}
+
+absl_source_set("container") {
+ public = [ "${dawn_abseil_dir}/absl/algorithm/container.h" ]
+ deps = [
+ ":algorithm",
+ ":core_headers",
+ ":nullability",
+ ":type_traits",
+ ]
+}
+
+#
+# absl/base
+#
+
+absl_source_set("atomic_hook") {
+ public = [ "${dawn_abseil_dir}/absl/base/internal/atomic_hook.h" ]
+ public_deps = [
+ ":config",
+ ":core_headers",
+ ]
+}
+
+absl_source_set("base") {
+ sources = [
+ "${dawn_abseil_dir}/absl/base/internal/cycleclock.cc",
+ "${dawn_abseil_dir}/absl/base/internal/spinlock.cc",
+ "${dawn_abseil_dir}/absl/base/internal/sysinfo.cc",
+ "${dawn_abseil_dir}/absl/base/internal/thread_identity.cc",
+ "${dawn_abseil_dir}/absl/base/internal/unscaledcycleclock.cc",
+ ]
+ public = [
+ "${dawn_abseil_dir}/absl/base/call_once.h",
+ "${dawn_abseil_dir}/absl/base/casts.h",
+ "${dawn_abseil_dir}/absl/base/internal/cycleclock.h",
+ "${dawn_abseil_dir}/absl/base/internal/low_level_scheduling.h",
+ "${dawn_abseil_dir}/absl/base/internal/per_thread_tls.h",
+ "${dawn_abseil_dir}/absl/base/internal/spinlock.h",
+ "${dawn_abseil_dir}/absl/base/internal/sysinfo.h",
+ "${dawn_abseil_dir}/absl/base/internal/thread_identity.h",
+ "${dawn_abseil_dir}/absl/base/internal/tsan_mutex_interface.h",
+ "${dawn_abseil_dir}/absl/base/internal/unscaledcycleclock.h",
+ ]
+
+ public_deps = [
+ ":atomic_hook",
+ ":base_internal",
+ ":config",
+ ":core_headers",
+ ":cycleclock_internal",
+ ":dynamic_annotations",
+ ":log_severity",
+ ":nullability",
+ ":raw_logging_internal",
+ ":spinlock_wait",
+ ":type_traits",
+ ]
+}
+
+absl_source_set("base_internal") {
+ public = [
+ "${dawn_abseil_dir}/absl/base/internal/hide_ptr.h",
+ "${dawn_abseil_dir}/absl/base/internal/identity.h",
+ "${dawn_abseil_dir}/absl/base/internal/inline_variable.h",
+ "${dawn_abseil_dir}/absl/base/internal/invoke.h",
+ "${dawn_abseil_dir}/absl/base/internal/scheduling_mode.h",
+ ]
+ public_deps = [
+ ":config",
+ ":type_traits",
+ ]
+}
+
+absl_source_set("config") {
+ public = [
+ "${dawn_abseil_dir}/absl/base/config.h",
+ "${dawn_abseil_dir}/absl/base/options.h",
+ "${dawn_abseil_dir}/absl/base/policy_checks.h",
+ ]
+}
+
+absl_source_set("core_headers") {
+ public = [
+ "${dawn_abseil_dir}/absl/base/attributes.h",
+ "${dawn_abseil_dir}/absl/base/const_init.h",
+ "${dawn_abseil_dir}/absl/base/macros.h",
+ "${dawn_abseil_dir}/absl/base/optimization.h",
+ "${dawn_abseil_dir}/absl/base/port.h",
+ "${dawn_abseil_dir}/absl/base/thread_annotations.h",
+ ]
+ public_deps = [ ":config" ]
+}
+
+absl_source_set("cycleclock_internal") {
+ public = [
+ "${dawn_abseil_dir}/absl/base/internal/cycleclock_config.h",
+ "${dawn_abseil_dir}/absl/base/internal/unscaledcycleclock_config.h",
+ ]
+ deps = [
+ ":base_internal",
+ ":config",
+ ]
+}
+
+absl_source_set("dynamic_annotations") {
+ public = [ "${dawn_abseil_dir}/absl/base/dynamic_annotations.h" ]
+
+ deps = [
+ ":config",
+ ":core_headers",
+ ]
+}
+
+absl_source_set("endian") {
+ public = [
+ "${dawn_abseil_dir}/absl/base/internal/endian.h",
+ "${dawn_abseil_dir}/absl/base/internal/unaligned_access.h",
+ ]
+ public_deps = [
+ ":base",
+ ":config",
+ ":core_headers",
+ ]
+}
+
+absl_source_set("errno_saver") {
+ public = [ "${dawn_abseil_dir}/absl/base/internal/errno_saver.h" ]
+ public_deps = [ ":config" ]
+}
+
+absl_source_set("log_severity") {
+ sources = [ "${dawn_abseil_dir}/absl/base/log_severity.cc" ]
+ public = [ "${dawn_abseil_dir}/absl/base/log_severity.h" ]
+ public_deps = [
+ ":config",
+ ":core_headers",
+ ]
+}
+
+absl_source_set("malloc_internal") {
+ sources = [ "${dawn_abseil_dir}/absl/base/internal/low_level_alloc.cc" ]
+ public = [
+ "${dawn_abseil_dir}/absl/base/internal/direct_mmap.h",
+ "${dawn_abseil_dir}/absl/base/internal/low_level_alloc.h",
+ ]
+ public_deps = [
+ ":base",
+ ":base_internal",
+ ":config",
+ ":core_headers",
+ ":dynamic_annotations",
+ ":raw_logging_internal",
+ ]
+}
+
+absl_source_set("nullability") {
+ sources = [ "${dawn_abseil_dir}/absl/base/internal/nullability_impl.h" ]
+ public = [ "${dawn_abseil_dir}/absl/base/nullability.h" ]
+ deps = [
+ ":core_headers",
+ ":type_traits",
+ ]
+}
+
+absl_source_set("prefetch") {
+ public = [ "${dawn_abseil_dir}/absl/base/prefetch.h" ]
+ deps = [
+ ":config",
+ ":core_headers",
+ ]
+}
+
+absl_source_set("raw_logging_internal") {
+ sources = [ "${dawn_abseil_dir}/absl/base/internal/raw_logging.cc" ]
+ public = [ "${dawn_abseil_dir}/absl/base/internal/raw_logging.h" ]
+ public_deps = [
+ ":atomic_hook",
+ ":core_headers",
+ ":errno_saver",
+ ":log_severity",
+ ]
+}
+
+absl_source_set("spinlock_wait") {
+ sources = [
+ "${dawn_abseil_dir}/absl/base/internal/spinlock_akaros.inc",
+ "${dawn_abseil_dir}/absl/base/internal/spinlock_linux.inc",
+ "${dawn_abseil_dir}/absl/base/internal/spinlock_posix.inc",
+ "${dawn_abseil_dir}/absl/base/internal/spinlock_wait.cc",
+ "${dawn_abseil_dir}/absl/base/internal/spinlock_win32.inc",
+ ]
+ public = [ "${dawn_abseil_dir}/absl/base/internal/spinlock_wait.h" ]
+ deps = [
+ ":base_internal",
+ ":core_headers",
+ ":errno_saver",
+ ]
+}
+
+absl_source_set("throw_delegate") {
+ sources = [ "${dawn_abseil_dir}/absl/base/internal/throw_delegate.cc" ]
+ public = [ "${dawn_abseil_dir}/absl/base/internal/throw_delegate.h" ]
+ public_deps = [ ":raw_logging_internal" ]
+}
+
+#
+# absl/container
+#
+
+absl_source_set("common") {
+ public = [ "${dawn_abseil_dir}/absl/container/internal/common.h" ]
+ deps = [
+ ":optional",
+ ":type_traits",
+ ]
+}
+
+absl_source_set("common_policy_traits") {
+ public =
+ [ "${dawn_abseil_dir}/absl/container/internal/common_policy_traits.h" ]
+ deps = [ ":type_traits" ]
+}
+
+absl_source_set("compressed_tuple") {
+ public = [ "${dawn_abseil_dir}/absl/container/internal/compressed_tuple.h" ]
+ deps = [ ":utility" ]
+}
+
+absl_source_set("container_memory") {
+ public = [ "${dawn_abseil_dir}/absl/container/internal/container_memory.h" ]
+ deps = [
+ ":config",
+ ":memory",
+ ":type_traits",
+ ":utility",
+ ]
+}
+
+absl_source_set("fixed_array") {
+ public = [ "${dawn_abseil_dir}/absl/container/fixed_array.h" ]
+ deps = [
+ ":algorithm",
+ ":compressed_tuple",
+ ":config",
+ ":core_headers",
+ ":dynamic_annotations",
+ ":memory",
+ ":throw_delegate",
+ ]
+}
+
+absl_source_set("flat_hash_map") {
+ public = [ "${dawn_abseil_dir}/absl/container/flat_hash_map.h" ]
+ deps = [
+ ":container",
+ ":container_memory",
+ ":core_headers",
+ ":hash_function_defaults",
+ ":memory",
+ ":raw_hash_map",
+ ]
+}
+
+absl_source_set("flat_hash_set") {
+ public = [ "${dawn_abseil_dir}/absl/container/flat_hash_set.h" ]
+ deps = [
+ ":container",
+ ":container_memory",
+ ":core_headers",
+ ":hash_function_defaults",
+ ":memory",
+ ":raw_hash_set",
+ ]
+}
+
+absl_source_set("hash_function_defaults") {
+ public =
+ [ "${dawn_abseil_dir}/absl/container/internal/hash_function_defaults.h" ]
+ deps = [
+ ":common",
+ ":config",
+ ":hash",
+ ":string_view",
+ ":type_traits",
+ ]
+}
+
+absl_source_set("hash_policy_traits") {
+ public = [ "${dawn_abseil_dir}/absl/container/internal/hash_policy_traits.h" ]
+ deps = [
+ ":common_policy_traits",
+ ":type_traits",
+ ]
+}
+
+absl_source_set("hashtable_debug_hooks") {
+ public =
+ [ "${dawn_abseil_dir}/absl/container/internal/hashtable_debug_hooks.h" ]
+ deps = [ ":config" ]
+}
+
+absl_source_set("hashtablez_sampler") {
+ public = [ "${dawn_abseil_dir}/absl/container/internal/hashtablez_sampler.h" ]
+ sources = [
+ "${dawn_abseil_dir}/absl/container/internal/hashtablez_sampler.cc",
+ "${dawn_abseil_dir}/absl/container/internal/hashtablez_sampler_force_weak_definition.cc",
+ ]
+ deps = [
+ ":base",
+ ":config",
+ ":core_headers",
+ ":exponential_biased",
+ ":memory",
+ ":no_destructor",
+ ":raw_logging_internal",
+ ":sample_recorder",
+ ":stacktrace",
+ ":synchronization",
+ ":time",
+ ":utility",
+ ]
+}
+
+absl_source_set("inlined_vector") {
+ public = [ "${dawn_abseil_dir}/absl/container/inlined_vector.h" ]
+ deps = [
+ ":algorithm",
+ ":core_headers",
+ ":inlined_vector_internal",
+ ":memory",
+ ":throw_delegate",
+ ":type_traits",
+ ]
+}
+
+absl_source_set("inlined_vector_internal") {
+ public = [ "${dawn_abseil_dir}/absl/container/internal/inlined_vector.h" ]
+ deps = [
+ ":base_internal",
+ ":compressed_tuple",
+ ":config",
+ ":core_headers",
+ ":memory",
+ ":span",
+ ":type_traits",
+ ]
+}
+
+absl_source_set("no_destructor") {
+ public = [ "${dawn_abseil_dir}/absl/base/no_destructor.h" ]
+ deps = [
+ ":config",
+ ":nullability",
+ ]
+}
+
+absl_source_set("raw_hash_map") {
+ public = [ "${dawn_abseil_dir}/absl/container/internal/raw_hash_map.h" ]
+ deps = [
+ ":container_memory",
+ ":raw_hash_set",
+ ":throw_delegate",
+ ]
+}
+
+absl_source_set("raw_hash_set") {
+ sources = [ "${dawn_abseil_dir}/absl/container/internal/raw_hash_set.cc" ]
+ public = [ "${dawn_abseil_dir}/absl/container/internal/raw_hash_set.h" ]
+ deps = [
+ ":bits",
+ ":common",
+ ":compressed_tuple",
+ ":config",
+ ":container_memory",
+ ":core_headers",
+ ":dynamic_annotations",
+ ":endian",
+ ":hash",
+ ":hash_policy_traits",
+ ":hashtable_debug_hooks",
+ ":hashtablez_sampler",
+ ":memory",
+ ":prefetch",
+ ":raw_logging_internal",
+ ":type_traits",
+ ":utility",
+ ]
+}
+
+#
+# absl/debugging
+#
+
+absl_source_set("debugging_internal") {
+ sources = [
+ "${dawn_abseil_dir}/absl/debugging/internal/address_is_readable.cc",
+ "${dawn_abseil_dir}/absl/debugging/internal/elf_mem_image.cc",
+ "${dawn_abseil_dir}/absl/debugging/internal/vdso_support.cc",
+ ]
+ public = [
+ "${dawn_abseil_dir}/absl/debugging/internal/address_is_readable.h",
+ "${dawn_abseil_dir}/absl/debugging/internal/elf_mem_image.h",
+ "${dawn_abseil_dir}/absl/debugging/internal/vdso_support.h",
+ ]
+ deps = [
+ ":config",
+ ":core_headers",
+ ":dynamic_annotations",
+ ":errno_saver",
+ ":raw_logging_internal",
+ ]
+}
+
+absl_source_set("demangle_internal") {
+ sources = [
+ "${dawn_abseil_dir}/absl/debugging/internal/demangle.cc",
+ "${dawn_abseil_dir}/absl/debugging/internal/demangle_rust.cc",
+ ]
+ public = [
+ "${dawn_abseil_dir}/absl/debugging/internal/demangle.h",
+ "${dawn_abseil_dir}/absl/debugging/internal/demangle_rust.h",
+ ]
+ deps = [
+ ":base",
+ ":config",
+ ":core_headers",
+ ]
+}
+
+absl_source_set("stacktrace") {
+ sources = [
+ "${dawn_abseil_dir}/absl/debugging/internal/stacktrace_aarch64-inl.inc",
+ "${dawn_abseil_dir}/absl/debugging/internal/stacktrace_arm-inl.inc",
+ "${dawn_abseil_dir}/absl/debugging/internal/stacktrace_config.h",
+ "${dawn_abseil_dir}/absl/debugging/internal/stacktrace_emscripten-inl.inc",
+ "${dawn_abseil_dir}/absl/debugging/internal/stacktrace_generic-inl.inc",
+ "${dawn_abseil_dir}/absl/debugging/internal/stacktrace_powerpc-inl.inc",
+ "${dawn_abseil_dir}/absl/debugging/internal/stacktrace_riscv-inl.inc",
+ "${dawn_abseil_dir}/absl/debugging/internal/stacktrace_unimplemented-inl.inc",
+ "${dawn_abseil_dir}/absl/debugging/internal/stacktrace_win32-inl.inc",
+ "${dawn_abseil_dir}/absl/debugging/internal/stacktrace_x86-inl.inc",
+ "${dawn_abseil_dir}/absl/debugging/stacktrace.cc",
+ ]
+ public = [ "${dawn_abseil_dir}/absl/debugging/stacktrace.h" ]
+ deps = [
+ ":config",
+ ":core_headers",
+ ":debugging_internal",
+ ":dynamic_annotations",
+ ":raw_logging_internal",
+ ]
+}
+
+#
+# absl/functional
+#
+
+absl_source_set("any_invocable") {
+ sources = [ "${dawn_abseil_dir}/absl/functional/internal/any_invocable.h" ]
+ public = [ "${dawn_abseil_dir}/absl/functional/any_invocable.h" ]
+ deps = [
+ ":base_internal",
+ ":config",
+ ":core_headers",
+ ":type_traits",
+ ":utility",
+ ]
+}
+
+absl_source_set("function_ref") {
+ sources = [ "${dawn_abseil_dir}/absl/functional/internal/function_ref.h" ]
+ public = [ "${dawn_abseil_dir}/absl/functional/function_ref.h" ]
+ deps = [
+ ":any_invocable",
+ ":base_internal",
+ ":core_headers",
+ ":type_traits",
+ ]
+}
+
+#
+# absl/hash
+#
+
+absl_source_set("city") {
+ public = [ "${dawn_abseil_dir}/absl/hash/internal/city.h" ]
+ sources = [ "${dawn_abseil_dir}/absl/hash/internal/city.cc" ]
+ deps = [
+ ":config",
+ ":core_headers",
+ ":endian",
+ ]
+}
+
+absl_source_set("hash") {
+ sources = [
+ "${dawn_abseil_dir}/absl/hash/internal/hash.cc",
+ "${dawn_abseil_dir}/absl/hash/internal/hash.h",
+ ]
+ public = [ "${dawn_abseil_dir}/absl/hash/hash.h" ]
+ deps = [
+ ":bits",
+ ":city",
+ ":config",
+ ":core_headers",
+ ":endian",
+ ":fixed_array",
+ ":function_ref",
+ ":int128",
+ ":low_level_hash",
+ ":optional",
+ ":string_view",
+ ":type_traits",
+ ":utility",
+ ":variant",
+ ]
+}
+
+absl_source_set("low_level_hash") {
+ public = [ "${dawn_abseil_dir}/absl/hash/internal/low_level_hash.h" ]
+ sources = [ "${dawn_abseil_dir}/absl/hash/internal/low_level_hash.cc" ]
+ deps = [
+ ":config",
+ ":endian",
+ ":int128",
+ ":prefetch",
+ ]
+}
+
+#
+# absl/memory
+#
+
+absl_source_set("memory") {
+ public = [ "${dawn_abseil_dir}/absl/memory/memory.h" ]
+ deps = [
+ ":core_headers",
+ ":type_traits",
+ ]
+}
+
+#
+# absl/meta
+#
+
+absl_source_set("type_traits") {
+ public = [ "${dawn_abseil_dir}/absl/meta/type_traits.h" ]
+ deps = [
+ ":config",
+ ":core_headers",
+ ]
+}
+
+#
+# absl/numeric
+#
+
+absl_source_set("bits") {
+ public = [
+ "${dawn_abseil_dir}/absl/numeric/bits.h",
+ "${dawn_abseil_dir}/absl/numeric/internal/bits.h",
+ ]
+ deps = [
+ ":config",
+ ":core_headers",
+ ]
+}
+
+absl_source_set("int128") {
+ sources = [
+ "${dawn_abseil_dir}/absl/numeric/int128.cc",
+ "${dawn_abseil_dir}/absl/numeric/int128_have_intrinsic.inc",
+ "${dawn_abseil_dir}/absl/numeric/int128_no_intrinsic.inc",
+ ]
+ public = [ "${dawn_abseil_dir}/absl/numeric/int128.h" ]
+ deps = [
+ ":bits",
+ ":config",
+ ":core_headers",
+ ]
+}
+
+#
+# absl/profiling
+#
+
+absl_source_set("exponential_biased") {
+ sources =
+ [ "${dawn_abseil_dir}/absl/profiling/internal/exponential_biased.cc" ]
+ public = [ "${dawn_abseil_dir}/absl/profiling/internal/exponential_biased.h" ]
+ deps = [
+ ":config",
+ ":core_headers",
+ ]
+}
+
+absl_source_set("sample_recorder") {
+ public = [ "${dawn_abseil_dir}/absl/profiling/internal/sample_recorder.h" ]
+ deps = [
+ ":config",
+ ":core_headers",
+ ":synchronization",
+ ":time",
+ ]
+}
+
+#
+# absl/strings
+#
+
+absl_source_set("strings") {
+ sources = [
+ "${dawn_abseil_dir}/absl/strings/ascii.cc",
+ "${dawn_abseil_dir}/absl/strings/charconv.cc",
+ "${dawn_abseil_dir}/absl/strings/escaping.cc",
+ "${dawn_abseil_dir}/absl/strings/internal/charconv_bigint.cc",
+ "${dawn_abseil_dir}/absl/strings/internal/charconv_bigint.h",
+ "${dawn_abseil_dir}/absl/strings/internal/charconv_parse.cc",
+ "${dawn_abseil_dir}/absl/strings/internal/charconv_parse.h",
+ "${dawn_abseil_dir}/absl/strings/internal/memutil.cc",
+ "${dawn_abseil_dir}/absl/strings/internal/memutil.h",
+ "${dawn_abseil_dir}/absl/strings/internal/stl_type_traits.h",
+ "${dawn_abseil_dir}/absl/strings/internal/str_join_internal.h",
+ "${dawn_abseil_dir}/absl/strings/internal/str_split_internal.h",
+ "${dawn_abseil_dir}/absl/strings/match.cc",
+ "${dawn_abseil_dir}/absl/strings/numbers.cc",
+ "${dawn_abseil_dir}/absl/strings/str_cat.cc",
+ "${dawn_abseil_dir}/absl/strings/str_replace.cc",
+ "${dawn_abseil_dir}/absl/strings/str_split.cc",
+ "${dawn_abseil_dir}/absl/strings/substitute.cc",
+ ]
+ public = [
+ "${dawn_abseil_dir}/absl/strings/ascii.h",
+ "${dawn_abseil_dir}/absl/strings/charconv.h",
+ "${dawn_abseil_dir}/absl/strings/escaping.h",
+ "${dawn_abseil_dir}/absl/strings/internal/string_constant.h",
+ "${dawn_abseil_dir}/absl/strings/match.h",
+ "${dawn_abseil_dir}/absl/strings/numbers.h",
+ "${dawn_abseil_dir}/absl/strings/str_cat.h",
+ "${dawn_abseil_dir}/absl/strings/str_join.h",
+ "${dawn_abseil_dir}/absl/strings/str_replace.h",
+ "${dawn_abseil_dir}/absl/strings/str_split.h",
+ "${dawn_abseil_dir}/absl/strings/strip.h",
+ "${dawn_abseil_dir}/absl/strings/substitute.h",
+ ]
+ deps = [
+ ":base",
+ ":bits",
+ ":endian",
+ ":int128",
+ ":raw_logging_internal",
+ ":string_view",
+ ":strings_internal",
+ ":throw_delegate",
+ ":type_traits",
+ ]
+}
+
+absl_source_set("strings_internal") {
+ sources = [
+ "${dawn_abseil_dir}/absl/strings/internal/escaping.cc",
+ "${dawn_abseil_dir}/absl/strings/internal/ostringstream.cc",
+ "${dawn_abseil_dir}/absl/strings/internal/utf8.cc",
+ ]
+ public = [
+ "${dawn_abseil_dir}/absl/strings/internal/escaping.h",
+ "${dawn_abseil_dir}/absl/strings/internal/ostringstream.h",
+ "${dawn_abseil_dir}/absl/strings/internal/resize_uninitialized.h",
+ "${dawn_abseil_dir}/absl/strings/internal/utf8.h",
+ ]
+ deps = [
+ ":endian",
+ ":raw_logging_internal",
+ ":type_traits",
+ ]
+}
+
+absl_source_set("string_view") {
+ sources = [ "${dawn_abseil_dir}/absl/strings/string_view.cc" ]
+ public = [ "${dawn_abseil_dir}/absl/strings/string_view.h" ]
+ deps = [
+ ":base",
+ ":config",
+ ":core_headers",
+ ":throw_delegate",
+ ]
+}
+
+absl_source_set("str_format") {
+ public = [ "${dawn_abseil_dir}/absl/strings/str_format.h" ]
+ deps = [
+ ":core_headers",
+ ":nullability",
+ ":span",
+ ":str_format_internal",
+ ":string_view",
+ ]
+}
+
+absl_source_set("str_format_internal") {
+ sources = [
+ "${dawn_abseil_dir}/absl/strings/internal/str_format/arg.cc",
+ "${dawn_abseil_dir}/absl/strings/internal/str_format/bind.cc",
+ "${dawn_abseil_dir}/absl/strings/internal/str_format/extension.cc",
+ "${dawn_abseil_dir}/absl/strings/internal/str_format/float_conversion.cc",
+ "${dawn_abseil_dir}/absl/strings/internal/str_format/output.cc",
+ "${dawn_abseil_dir}/absl/strings/internal/str_format/parser.cc",
+ ]
+ public = [
+ "${dawn_abseil_dir}/absl/strings/internal/str_format/arg.h",
+ "${dawn_abseil_dir}/absl/strings/internal/str_format/bind.h",
+ "${dawn_abseil_dir}/absl/strings/internal/str_format/checker.h",
+ "${dawn_abseil_dir}/absl/strings/internal/str_format/extension.h",
+ "${dawn_abseil_dir}/absl/strings/internal/str_format/float_conversion.h",
+ "${dawn_abseil_dir}/absl/strings/internal/str_format/output.h",
+ "${dawn_abseil_dir}/absl/strings/internal/str_format/parser.h",
+ ]
+ deps = [
+ ":bits",
+ ":config",
+ ":core_headers",
+ ":fixed_array",
+ ":function_ref",
+ ":inlined_vector",
+ ":int128",
+ ":span",
+ ":string_view",
+ ":strings",
+ ":type_traits",
+ ":utility",
+ ]
+}
+
+#
+# absl/synchronization
+#
+
+absl_source_set("graphcycles_internal") {
+ sources =
+ [ "${dawn_abseil_dir}/absl/synchronization/internal/graphcycles.cc" ]
+ public = [ "${dawn_abseil_dir}/absl/synchronization/internal/graphcycles.h" ]
+ deps = [
+ ":base",
+ ":base_internal",
+ ":config",
+ ":core_headers",
+ ":malloc_internal",
+ ":raw_logging_internal",
+ ]
+ visibility = [ ":*" ]
+}
+
+absl_source_set("kernel_timeout_internal") {
+ sources =
+ [ "${dawn_abseil_dir}/absl/synchronization/internal/kernel_timeout.cc" ]
+ public =
+ [ "${dawn_abseil_dir}/absl/synchronization/internal/kernel_timeout.h" ]
+ deps = [
+ ":base",
+ ":config",
+ ":core_headers",
+ ":raw_logging_internal",
+ ":time",
+ ]
+}
+
+absl_source_set("symbolize") {
+ sources = [
+ "${dawn_abseil_dir}/absl/debugging/symbolize.cc",
+ "${dawn_abseil_dir}/absl/debugging/symbolize_darwin.inc",
+ "${dawn_abseil_dir}/absl/debugging/symbolize_elf.inc",
+ "${dawn_abseil_dir}/absl/debugging/symbolize_emscripten.inc",
+ "${dawn_abseil_dir}/absl/debugging/symbolize_unimplemented.inc",
+ "${dawn_abseil_dir}/absl/debugging/symbolize_win32.inc",
+ ]
+ public = [
+ "${dawn_abseil_dir}/absl/debugging/internal/symbolize.h",
+ "${dawn_abseil_dir}/absl/debugging/symbolize.h",
+ ]
+ deps = [
+ ":base",
+ ":config",
+ ":core_headers",
+ ":debugging_internal",
+ ":demangle_internal",
+ ":dynamic_annotations",
+ ":malloc_internal",
+ ":raw_logging_internal",
+ ":string_view",
+ ":strings",
+ ]
+}
+
+absl_source_set("synchronization") {
+ sources = [
+ "${dawn_abseil_dir}/absl/synchronization/barrier.cc",
+ "${dawn_abseil_dir}/absl/synchronization/blocking_counter.cc",
+ "${dawn_abseil_dir}/absl/synchronization/internal/create_thread_identity.cc",
+ "${dawn_abseil_dir}/absl/synchronization/internal/futex_waiter.cc",
+ "${dawn_abseil_dir}/absl/synchronization/internal/per_thread_sem.cc",
+ "${dawn_abseil_dir}/absl/synchronization/internal/pthread_waiter.cc",
+ "${dawn_abseil_dir}/absl/synchronization/internal/sem_waiter.cc",
+ "${dawn_abseil_dir}/absl/synchronization/internal/stdcpp_waiter.cc",
+ "${dawn_abseil_dir}/absl/synchronization/internal/waiter_base.cc",
+ "${dawn_abseil_dir}/absl/synchronization/internal/win32_waiter.cc",
+ "${dawn_abseil_dir}/absl/synchronization/mutex.cc",
+ "${dawn_abseil_dir}/absl/synchronization/notification.cc",
+ ]
+ public = [
+ "${dawn_abseil_dir}/absl/synchronization/barrier.h",
+ "${dawn_abseil_dir}/absl/synchronization/blocking_counter.h",
+ "${dawn_abseil_dir}/absl/synchronization/internal/create_thread_identity.h",
+ "${dawn_abseil_dir}/absl/synchronization/internal/futex.h",
+ "${dawn_abseil_dir}/absl/synchronization/internal/futex_waiter.h",
+ "${dawn_abseil_dir}/absl/synchronization/internal/per_thread_sem.h",
+ "${dawn_abseil_dir}/absl/synchronization/internal/pthread_waiter.h",
+ "${dawn_abseil_dir}/absl/synchronization/internal/sem_waiter.h",
+ "${dawn_abseil_dir}/absl/synchronization/internal/stdcpp_waiter.h",
+ "${dawn_abseil_dir}/absl/synchronization/internal/waiter.h",
+ "${dawn_abseil_dir}/absl/synchronization/internal/waiter_base.h",
+ "${dawn_abseil_dir}/absl/synchronization/internal/win32_waiter.h",
+ "${dawn_abseil_dir}/absl/synchronization/mutex.h",
+ "${dawn_abseil_dir}/absl/synchronization/notification.h",
+ ]
+ deps = [
+ ":atomic_hook",
+ ":base",
+ ":base_internal",
+ ":config",
+ ":core_headers",
+ ":dynamic_annotations",
+ ":graphcycles_internal",
+ ":kernel_timeout_internal",
+ ":malloc_internal",
+ ":raw_logging_internal",
+ ":stacktrace",
+ ":symbolize",
+ ":time",
+ ]
+}
+
+#
+# absl/time
+#
+
+absl_source_set("civil_time") {
+ sources =
+ [ "${dawn_abseil_dir}/absl/time/internal/cctz/src/civil_time_detail.cc" ]
+ public = [
+ "${dawn_abseil_dir}/absl/time/internal/cctz/include/cctz/civil_time.h",
+ "${dawn_abseil_dir}/absl/time/internal/cctz/include/cctz/civil_time_detail.h",
+ ]
+ deps = [ ":config" ]
+}
+
+absl_source_set("time") {
+ sources = [
+ "${dawn_abseil_dir}/absl/time/civil_time.cc",
+ "${dawn_abseil_dir}/absl/time/clock.cc",
+ "${dawn_abseil_dir}/absl/time/duration.cc",
+ "${dawn_abseil_dir}/absl/time/format.cc",
+ "${dawn_abseil_dir}/absl/time/internal/get_current_time_chrono.inc",
+ "${dawn_abseil_dir}/absl/time/internal/get_current_time_posix.inc",
+ "${dawn_abseil_dir}/absl/time/time.cc",
+ ]
+ public = [
+ "${dawn_abseil_dir}/absl/time/civil_time.h",
+ "${dawn_abseil_dir}/absl/time/clock.h",
+ "${dawn_abseil_dir}/absl/time/time.h",
+ ]
+ deps = [
+ ":base",
+ ":civil_time",
+ ":config",
+ ":core_headers",
+ ":int128",
+ ":optional",
+ ":raw_logging_internal",
+ ":string_view",
+ ":strings",
+ ":time_zone",
+ ]
+}
+
+absl_source_set("time_zone") {
+ sources = [
+ "${dawn_abseil_dir}/absl/time/internal/cctz/src/time_zone_fixed.cc",
+ "${dawn_abseil_dir}/absl/time/internal/cctz/src/time_zone_fixed.h",
+ "${dawn_abseil_dir}/absl/time/internal/cctz/src/time_zone_format.cc",
+ "${dawn_abseil_dir}/absl/time/internal/cctz/src/time_zone_if.cc",
+ "${dawn_abseil_dir}/absl/time/internal/cctz/src/time_zone_if.h",
+ "${dawn_abseil_dir}/absl/time/internal/cctz/src/time_zone_impl.cc",
+ "${dawn_abseil_dir}/absl/time/internal/cctz/src/time_zone_impl.h",
+ "${dawn_abseil_dir}/absl/time/internal/cctz/src/time_zone_info.cc",
+ "${dawn_abseil_dir}/absl/time/internal/cctz/src/time_zone_info.h",
+ "${dawn_abseil_dir}/absl/time/internal/cctz/src/time_zone_libc.cc",
+ "${dawn_abseil_dir}/absl/time/internal/cctz/src/time_zone_libc.h",
+ "${dawn_abseil_dir}/absl/time/internal/cctz/src/time_zone_lookup.cc",
+ "${dawn_abseil_dir}/absl/time/internal/cctz/src/time_zone_posix.cc",
+ "${dawn_abseil_dir}/absl/time/internal/cctz/src/time_zone_posix.h",
+ "${dawn_abseil_dir}/absl/time/internal/cctz/src/tzfile.h",
+ "${dawn_abseil_dir}/absl/time/internal/cctz/src/zone_info_source.cc",
+ ]
+ public = [
+ "${dawn_abseil_dir}/absl/time/internal/cctz/include/cctz/time_zone.h",
+ "${dawn_abseil_dir}/absl/time/internal/cctz/include/cctz/zone_info_source.h",
+ ]
+ defines = []
+ if (is_apple) {
+ frameworks = [ "Foundation.framework" ]
+
+ # Work-around for https://github.com/llvm/llvm-project/issues/117630
+ defines += [ "_XOPEN_SOURCE=700" ]
+ }
+ deps = [
+ ":civil_time",
+ ":config",
+ ]
+ if (is_fuchsia) {
+ # Remove when fixed in Fuchsia SDK:
+ # https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=127301
+ cflags_cc = [ "-Wno-sign-conversion" ]
+ deps += [
+ "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.intl:fuchsia.intl_hlcpp",
+ "//third_party/fuchsia-sdk/sdk/pkg/async",
+ "//third_party/fuchsia-sdk/sdk/pkg/async-loop-cpp",
+ "//third_party/fuchsia-sdk/sdk/pkg/sys_cpp",
+ "//third_party/fuchsia-sdk/sdk/pkg/zx",
+ ]
+ }
+}
+
+#
+# absl/types
+#
+
+absl_source_set("bad_optional_access") {
+ sources = [ "${dawn_abseil_dir}/absl/types/bad_optional_access.cc" ]
+ public = [ "${dawn_abseil_dir}/absl/types/bad_optional_access.h" ]
+ public_deps = [ ":config" ]
+ deps = [ ":raw_logging_internal" ]
+}
+
+absl_source_set("bad_variant_access") {
+ sources = [ "${dawn_abseil_dir}/absl/types/bad_variant_access.cc" ]
+ public = [ "${dawn_abseil_dir}/absl/types/bad_variant_access.h" ]
+ public_deps = [ ":config" ]
+ deps = [ ":raw_logging_internal" ]
+}
+
+absl_source_set("optional") {
+ sources = [ "${dawn_abseil_dir}/absl/types/internal/optional.h" ]
+ public = [ "${dawn_abseil_dir}/absl/types/internal/optional.h" ]
+ public_deps = [
+ ":bad_optional_access",
+ ":base_internal",
+ ":config",
+ ":core_headers",
+ ":memory",
+ ":type_traits",
+ ":utility",
+ ]
+}
+
+absl_source_set("span") {
+ public = [ "${dawn_abseil_dir}/absl/types/span.h" ]
+ sources = [ "${dawn_abseil_dir}/absl/types/internal/span.h" ]
+ public_deps = [
+ ":algorithm",
+ ":core_headers",
+ ":nullability",
+ ":throw_delegate",
+ ":type_traits",
+ ]
+}
+
+absl_source_set("variant") {
+ sources = [ "${dawn_abseil_dir}/absl/types/internal/variant.h" ]
+ public = [ "${dawn_abseil_dir}/absl/types/variant.h" ]
+ public_deps = [
+ ":bad_variant_access",
+ ":base_internal",
+ ":config",
+ ":core_headers",
+ ":type_traits",
+ ":utility",
+ ]
+}
+
+#
+# absl/utility
+#
+
+absl_source_set("utility") {
+ public = [ "${dawn_abseil_dir}/absl/utility/utility.h" ]
+ deps = [
+ ":base_internal",
+ ":config",
+ ":type_traits",
+ ]
+}
diff --git a/third_party/googletest/src b/third_party/googletest
similarity index 100%
rename from third_party/googletest/src
rename to third_party/googletest
diff --git a/third_party/googletest/BUILD.gn b/third_party/googletest/BUILD.gn
deleted file mode 100644
index 74c9eb6..0000000
--- a/third_party/googletest/BUILD.gn
+++ /dev/null
@@ -1,207 +0,0 @@
-# Copyright 2014 The Chromium Authors
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import("//build_overrides/build.gni")
-
-config("gtest_config") {
- # webrtc wants to push this config without a public_dep chain
- # TODO(crbug.com/1249254): figure out what to do with this
- visibility = [
- ":*", # gmock also shares this config.
- "//test:*", # webrts standalone setup
- "//third_party/webrtc/test:*",
- ]
-
- defines = [
- # Chromium always links googletest statically, so no API qualifier is
- # necessary. The definition in gtest-port.h at the time of this writing
- # causes crashes in content_browsertests.
- "GTEST_API_=",
-
- # In order to allow regex matches in gtest to be shared between Windows
- # and other systems, we tell gtest to always use its internal engine.
- "GTEST_HAS_POSIX_RE=0",
-
- # Enables C++11 features.
- "GTEST_LANG_CXX11=1",
-
- # Prevents gtest from including both <tr1/tuple> and <tuple>.
- "GTEST_HAS_TR1_TUPLE=0",
-
- # Use Abseil, but without flags support: Abseil flags uses the
- # `FastTypeId<T>()` pattern internally, which is known to be broken in
- # subtle ways in the component build.
- "GTEST_HAS_ABSL",
- "GTEST_NO_ABSL_FLAGS",
- ]
-
- # Gtest headers need to be able to find themselves.
- include_dirs = [
- "custom",
- "src/googletest/include",
- ]
-
- if (is_win) {
- cflags = [ "/wd4800" ] # Unused variable warning.
- }
-
- configs = [
- "//third_party/abseil-cpp:absl_include_config",
- "//third_party/re2:re2_config",
- ]
-}
-
-config("gmock_config") {
- # Gmock headers need to be able to find themselves.
- include_dirs = [
- "custom",
- "src/googlemock/include",
- ]
-
- if (is_clang) {
- # TODO(crbug.com/40616204): remove this when we migrated to new MOCK_METHOD
- # macro.
- # ref: https://google.github.io/googletest/gmock_cook_book.html#old-style-mock_methodn-macros
- cflags = [ "-Wno-inconsistent-missing-override" ]
- }
-}
-
-# Do NOT depend on this directly. Use //testing/gtest instead.
-# See README.chromium for details.
-source_set("gtest") {
- testonly = true
- sources = [
- "custom/gtest/internal/custom/gtest.h",
- "custom/gtest/internal/custom/stack_trace_getter.cc",
- "custom/gtest/internal/custom/stack_trace_getter.h",
-
- # TODO(crbug.com/1009553): Remove this wrapper and custom temp dir
- # after plumbing a workable temporary path into googletest on Android.
- "custom/gtest/internal/custom/chrome_custom_temp_dir.cc",
- "custom/gtest/internal/custom/chrome_custom_temp_dir.h",
- "custom/gtest/internal/custom/gtest_port_wrapper.cc",
- "src/googletest/include/gtest/gtest-assertion-result.h",
- "src/googletest/include/gtest/gtest-death-test.h",
- "src/googletest/include/gtest/gtest-matchers.h",
- "src/googletest/include/gtest/gtest-message.h",
- "src/googletest/include/gtest/gtest-param-test.h",
- "src/googletest/include/gtest/gtest-printers.h",
- "src/googletest/include/gtest/gtest-spi.h",
- "src/googletest/include/gtest/gtest-test-part.h",
- "src/googletest/include/gtest/gtest-typed-test.h",
- "src/googletest/include/gtest/gtest.h",
- "src/googletest/include/gtest/gtest_pred_impl.h",
- "src/googletest/include/gtest/gtest_prod.h",
-
- #"src/googletest/include/gtest/internal/custom/gtest.h", # Superseded.
- "src/googletest/include/gtest/internal/custom/gtest-port.h",
- "src/googletest/include/gtest/internal/custom/gtest-printers.h",
- "src/googletest/include/gtest/internal/gtest-death-test-internal.h",
- "src/googletest/include/gtest/internal/gtest-filepath.h",
- "src/googletest/include/gtest/internal/gtest-internal.h",
- "src/googletest/include/gtest/internal/gtest-param-util.h",
- "src/googletest/include/gtest/internal/gtest-port-arch.h",
- "src/googletest/include/gtest/internal/gtest-port.h",
- "src/googletest/include/gtest/internal/gtest-string.h",
- "src/googletest/include/gtest/internal/gtest-type-util.h",
-
- #"src/googletest/src/gtest-all.cc", # Not needed by our build.
- "src/googletest/src/gtest-assertion-result.cc",
- "src/googletest/src/gtest-death-test.cc",
- "src/googletest/src/gtest-filepath.cc",
- "src/googletest/src/gtest-internal-inl.h",
- "src/googletest/src/gtest-matchers.cc",
-
- # gtest_port_wrapper.cc is used instead of gtest-port.cc.
- # TODO(crbug.com/1009553): Re-enable this file after plumbing a workable
- # temporary path into googletest on Android.
- #"src/googletest/src/gtest-port.cc",
- "src/googletest/src/gtest-printers.cc",
- "src/googletest/src/gtest-test-part.cc",
- "src/googletest/src/gtest-typed-test.cc",
- "src/googletest/src/gtest.cc",
- ]
-
- # Some files include "src/gtest-internal-inl.h".
- include_dirs = [ "src/googletest" ]
-
- public_configs = [ ":gtest_config" ]
-
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
-
- defines = []
-
- # googletest only needs `absl`, but this makes gn check happier.
- deps = [ "//third_party/abseil-cpp:absl_full" ]
- public_deps = [ "//third_party/re2" ]
- if (is_nacl || !build_with_chromium) {
- defines += [ "GTEST_DISABLE_PRINT_STACK_TRACE" ]
- sources -= [
- "custom/gtest/internal/custom/stack_trace_getter.cc",
- "custom/gtest/internal/custom/stack_trace_getter.h",
- ]
- } else {
- deps += [ "//base" ]
- }
-
- if (is_fuchsia) {
- deps += [
- "//third_party/fuchsia-sdk/sdk/pkg/fdio",
- "//third_party/fuchsia-sdk/sdk/pkg/zx",
- ]
- }
-}
-
-# Do NOT depend on this directly. Use //testing/gtest:gtest_main instead.
-# See README.chromium for details.
-source_set("gtest_main") {
- testonly = true
- sources = [ "src/googletest/src/gtest_main.cc" ]
- deps = [ ":gtest" ]
-}
-
-# Do NOT depend on this directly. Use //testing/gmock instead.
-# See README.chromium for details.
-source_set("gmock") {
- testonly = true
- sources = [
- "src/googlemock/include/gmock/gmock-actions.h",
- "src/googlemock/include/gmock/gmock-cardinalities.h",
- "src/googlemock/include/gmock/gmock-function-mocker.h",
- "src/googlemock/include/gmock/gmock-matchers.h",
- "src/googlemock/include/gmock/gmock-more-matchers.h",
- "src/googlemock/include/gmock/gmock-nice-strict.h",
- "src/googlemock/include/gmock/gmock-spec-builders.h",
- "src/googlemock/include/gmock/gmock.h",
-
- #"src/googlemock/include/gmock/internal/custom/gmock-port.h", # Superseded.
- "src/googlemock/include/gmock/internal/custom/gmock-generated-actions.h",
- "src/googlemock/include/gmock/internal/custom/gmock-matchers.h",
- "src/googlemock/include/gmock/internal/gmock-internal-utils.h",
- "src/googlemock/include/gmock/internal/gmock-port.h",
- "src/googlemock/include/gmock/internal/gmock-pp.h",
-
- #"src/googlemock/src/gmock-all.cc", # Not needed by our build.
- "src/googlemock/src/gmock-cardinalities.cc",
- "src/googlemock/src/gmock-internal-utils.cc",
- "src/googlemock/src/gmock-matchers.cc",
- "src/googlemock/src/gmock-spec-builders.cc",
- "src/googlemock/src/gmock.cc",
- ]
-
- # googlemock only needs `absl`, but this makes gn check happier.
- deps = [ "//third_party/abseil-cpp:absl_full" ]
-
- public_deps = [ ":gtest" ]
- public_configs = [ ":gmock_config" ]
-}
-
-# Do NOT depend on this directly. Use //testing/gmock:gmock_main instead.
-# See README.chromium for details.
-static_library("gmock_main") {
- testonly = true
- sources = [ "src/googlemock/src/gmock_main.cc" ]
- deps = [ ":gmock" ]
-}
diff --git a/third_party/libprotobuf-mutator/src b/third_party/libprotobuf-mutator/src
index 7bf98f7..a304ec4 160000
--- a/third_party/libprotobuf-mutator/src
+++ b/third_party/libprotobuf-mutator/src
@@ -1 +1 @@
-Subproject commit 7bf98f78a30b067e22420ff699348f084f802e12
+Subproject commit a304ec48dcf15d942607032151f7e9ee504b5dcf
diff --git a/third_party/protobuf b/third_party/protobuf
index f2622a8..da2fe72 160000
--- a/third_party/protobuf
+++ b/third_party/protobuf
@@ -1 +1 @@
-Subproject commit f2622a898ca54e0b7f4e38d8f7bfb994fa89872e
+Subproject commit da2fe725b80ac0ba646fbf77d0ce5b4ac236f823
diff --git a/third_party/protobuf.cmake b/third_party/protobuf.cmake
index 3bbc0f9..f1686e8 100644
--- a/third_party/protobuf.cmake
+++ b/third_party/protobuf.cmake
@@ -35,12 +35,9 @@
set(protobuf_BUILD_PROTOC_BINARIES ON CACHE BOOL "Build libprotoc and protoc compiler" FORCE)
set(protobuf_DISABLE_RTTI ON CACHE BOOL "Remove runtime type information in the binaries" FORCE)
-# Allowing usage of enable_if() and nullability extensions in abseil
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-gcc-compat -Wno-unreachable-code-break -Wno-nullability-extension")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gcc-compat -Wno-unreachable-code-break -Wno-nullability-extension")
+add_subdirectory("${DAWN_PROTOBUF_DIR}/cmake")
-add_subdirectory("${DAWN_PROTOBUF_DIR}")
-target_compile_definitions(libprotobuf PUBLIC "-DPROTOBUF_ENABLE_DEBUG_LOGGING_MAY_LEAK_PII=0")
+target_compile_definitions(libprotobuf PUBLIC "-DGOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE=0")
# A simplified version of protobuf_generate()
function(generate_protos)
diff --git a/third_party/re2/BUILD.gn b/third_party/re2/BUILD.gn
deleted file mode 100644
index da39856..0000000
--- a/third_party/re2/BUILD.gn
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 2014 The Chromium Authors
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import("//testing/libfuzzer/fuzzer_test.gni")
-
-config("re2_config") {
- include_dirs = [ "src" ]
-}
-
-static_library("re2") {
- sources = [
- "src/re2/bitmap256.cc",
- "src/re2/bitmap256.h",
- "src/re2/bitstate.cc",
- "src/re2/compile.cc",
- "src/re2/dfa.cc",
- "src/re2/filtered_re2.cc",
- "src/re2/filtered_re2.h",
- "src/re2/mimics_pcre.cc",
- "src/re2/nfa.cc",
- "src/re2/onepass.cc",
- "src/re2/parse.cc",
- "src/re2/perl_groups.cc",
- "src/re2/prefilter.cc",
- "src/re2/prefilter.h",
- "src/re2/prefilter_tree.cc",
- "src/re2/prefilter_tree.h",
- "src/re2/prog.cc",
- "src/re2/prog.h",
- "src/re2/re2.cc",
- "src/re2/re2.h",
- "src/re2/regexp.cc",
- "src/re2/regexp.h",
- "src/re2/set.cc",
- "src/re2/set.h",
- "src/re2/simplify.cc",
- "src/re2/sparse_array.h",
- "src/re2/sparse_set.h",
- "src/re2/stringpiece.h",
- "src/re2/tostring.cc",
- "src/re2/unicode_casefold.cc",
- "src/re2/unicode_casefold.h",
- "src/re2/unicode_groups.cc",
- "src/re2/unicode_groups.h",
- "src/re2/walker-inl.h",
- "src/util/rune.cc",
- "src/util/strutil.cc",
- "src/util/strutil.h",
- "src/util/utf.h",
- ]
-
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
- public_configs = [ ":re2_config" ]
- public_deps = [ "//third_party/abseil-cpp:absl" ]
-}
-
-fuzzer_test("third_party_re2_fuzzer") {
- sources = [ "src/re2/fuzzing/re2_fuzzer.cc" ]
- deps = [ ":re2" ]
-}
diff --git a/third_party/re2/src b/third_party/re2/src
deleted file mode 160000
index c84a140..0000000
--- a/third_party/re2/src
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit c84a140c93352cdabbfb547c531be34515b12228
diff --git a/tools/clang b/tools/clang
index 5d9b097..e262f0f 160000
--- a/tools/clang
+++ b/tools/clang
@@ -1 +1 @@
-Subproject commit 5d9b09742311e059ecdba6d74adcb883e4ebffe5
+Subproject commit e262f0f8896e459fe7fd2a076af48d5746b1d332
diff --git a/tools/fetch_dawn_dependencies.py b/tools/fetch_dawn_dependencies.py
index 6894b6d..b5594de 100644
--- a/tools/fetch_dawn_dependencies.py
+++ b/tools/fetch_dawn_dependencies.py
@@ -108,7 +108,7 @@
'third_party/markupsafe',
'third_party/glslang/src',
'third_party/google_benchmark/src',
- 'third_party/googletest/src',
+ 'third_party/googletest',
'third_party/spirv-headers/src',
'third_party/spirv-tools/src',
'third_party/vulkan-headers/src',
diff --git a/tools/protoc_wrapper b/tools/protoc_wrapper
index dbcbea9..b5ea227 160000
--- a/tools/protoc_wrapper
+++ b/tools/protoc_wrapper
@@ -1 +1 @@
-Subproject commit dbcbea90c20ae1ece442d8ef64e61c7b10e2b013
+Subproject commit b5ea227bd88235ab3ccda964d5f3819c4e2d8032
diff --git a/tools/setup-build b/tools/setup-build
index 95b754c..3e30971 100755
--- a/tools/setup-build
+++ b/tools/setup-build
@@ -200,6 +200,7 @@
if [[ -n "$BUILD_FUZZER" ]]; then
GN_ARGS+=" use_libfuzzer=true"
GN_ARGS+=" tint_build_ir_binary=true"
+ GN_ARGS+=" tint_build_ir_fuzzer=true"
fi
if [[ -n "$REMOTEEXEC" ]]; then
GN_ARGS+=" use_remoteexec=true"
@@ -229,6 +230,7 @@
CMAKE_FLAGS+=("-DCMAKE_C_COMPILER=clang")
CMAKE_FLAGS+=("-DTINT_BUILD_FUZZERS=ON")
CMAKE_FLAGS+=("-DDAWN_BUILD_PROTOBUF=ON")
+ CMAKE_FLAGS+=("-DTINT_BUILD_IR_FUZZER=ON")
CMAKE_FLAGS+=("-DTINT_BUILD_IR_BINARY=ON")
CMAKE_FLAGS+=("-DDAWN_USE_BUILT_DXC=ON") # TODO(b/348200364)
fi