Add usage of main from chromium when part of a chromium build

BUG=tint:123

Change-Id: Ic7a8694cefd0dbee2a1855e84f4ffaaf75ad6e7a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25520
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
Ryan Harrison 2020-07-22 17:36:39 +00:00
parent 9a2b692b1c
commit 433670b576
1 changed files with 17 additions and 2 deletions

View File

@ -638,6 +638,20 @@ if (!build_with_chromium) {
} }
} }
###############################################################################
# Wrapping of Chromium targets
###############################################################################
# These targets are separated because they are Chromium sources files that
# can't use the tint_internal config, otherwise Tint's warning flags get
# applied while compiling a bunch of Chromium's //base (via header inclusion)
if (build_with_chromium) {
source_set("tint_unittests_main") {
testonly = true
deps = [ ":gmock_and_gtest" ]
sources = [ "//gpu/tint_unittests_main.cc" ]
}
}
############################################################################### ###############################################################################
# Tests - For libtint core and optional modules # Tests - For libtint core and optional modules
############################################################################### ###############################################################################
@ -1089,8 +1103,9 @@ test("tint_unittests") {
"${tint_spirv_tools_dir}/:spvtools_val", "${tint_spirv_tools_dir}/:spvtools_val",
] ]
# TODO(rharrison): Use main() from chromium for chromium tree builds. This if (build_with_chromium) {
# requires adding a file to //gpu like Dawn has done. deps += [ ":tint_unittests_main" ]
}
configs += [ configs += [
":tint_common_config", ":tint_common_config",