|author||Brandon Jones <firstname.lastname@example.org>||Mon Apr 18 17:35:53 2022 +0000|
|committer||Dawn LUCI CQ <email@example.com>||Mon Apr 18 17:35:53 2022 +0000|
Revert "Enable gn check for all build targets." This reverts commit 61bc38fd52161ce7c0722a966eb4d66315b07cc1. Reason for revert: Appears to have broken the Dawn->Chromium autoroller, which is now seeing Abseil linking issues on Mac and Linux. Example failing roll: https://chromium-review.googlesource.com/c/chromium/src/+/3590451/ Example error log: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8816532799903001889/+/u/compile__with_patch_/stdout Log Excerpt: [802/31819] LINK ./dawn_unittests FAILED: dawn_unittests TOOL_VERSION=1650247560 ../../build/toolchain/apple/linker_driver.py -Wcrl,strippath,../../build/mac_files/xcode_binaries/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -Wcrl,installnametoolpath,../../build/mac_files/xcode_binaries/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool ../../third_party/llvm-build/Release+Asserts/bin/clang++ -Werror -fuse-ld=lld -Wl,-fatal_warnings -Wl,--color-diagnostics -arch x86_64 -no-canonical-prefixes -Wl,-dead_strip -nostdlib++ -isysroot ../../build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -mmacosx-version-min=10.11.0 -fprofile-instr-generate -Wl,-ObjC -rpath @executable_path/ -o "./dawn_unittests" "@./dawn_unittests.rsp" ld64.lld: error: duplicate symbol: __ZN4absl15AsciiStrToLowerEPNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE >>> defined in obj/third_party/dawn/third_party/gn/abseil-cpp/strings/ascii.o >>> defined in obj/third_party/abseil-cpp/absl/strings/strings/ascii.o ld64.lld: error: duplicate symbol: __ZN4absl15AsciiStrToUpperEPNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE >>> defined in obj/third_party/dawn/third_party/gn/abseil-cpp/strings/ascii.o >>> defined in obj/third_party/abseil-cpp/absl/strings/strings/ascii.o ld64.lld: error: duplicate symbol: __ZN4absl26RemoveExtraAsciiWhitespaceEPNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE >>> defined in obj/third_party/dawn/third_party/gn/abseil-cpp/strings/ascii.o >>> defined in obj/third_party/abseil-cpp/absl/strings/strings/ascii.o Original change's description: > Enable gn check for all build targets. > > This CL removes the `check_targets` entry from the .gn file which > will enable checking all targets. Two of the GN targets have had > missing dependencies added. > > The `gn/abseil-cpp/BUILD.gn` was referenced against the Chromium > BUILD.gn for abseil to make sure the `public_deps` and `deps` > match in the two versions. The paths are re-written to match > the Dawn paths. > > Bug: dawn:1372 > Change-Id: I371e17ec9647e6627429be5c81eb7985da3cc5b3 > Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86861 > Auto-Submit: Dan Sinclair <firstname.lastname@example.org> > Kokoro: Kokoro <email@example.com> > Reviewed-by: Brandon Jones <firstname.lastname@example.org> > Reviewed-by: Corentin Wallez <email@example.com> > Commit-Queue: Corentin Wallez <firstname.lastname@example.org> # Not skipping CQ checks because original CL landed > 1 day ago. Bug: dawn:1372 Change-Id: I1ce6d62138cd99aa3a75c74eea0ac04ce5048b6b Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87161 Reviewed-by: Brandon Jones <email@example.com> Auto-Submit: Brandon Jones <firstname.lastname@example.org> Reviewed-by: Shrek Shao <email@example.com> Kokoro: Kokoro <firstname.lastname@example.org> Reviewed-by: Austin Eng <email@example.com> Commit-Queue: Austin Eng <firstname.lastname@example.org>
Dawn is an open-source and cross-platform implementation of the work-in-progress WebGPU standard. More precisely it implements
webgpu.h that is a one-to-one mapping with the WebGPU IDL. Dawn is meant to be integrated as part of a larger system and is the underlying implementation of WebGPU in Chromium.
Dawn provides several WebGPU building blocks:
webgpu.hversion that Dawn implements.
User documentation: (TODO, figure out what overlaps with the webgpu.h docs)
Apache 2.0 Public License, please see LICENSE.
This is not an officially supported Google product.
Tint is a compiler for the WebGPU Shader Language (WGSL).
This is not an officially supported Google product.
TINT_BUILD_SPV_READER: enable the SPIR-V input reader (off by default)
TINT_BUILD_WGSL_READER: enable the WGSL input reader (on by default)
TINT_BUILD_SPV_WRITER: enable the SPIR-V output writer (on by default)
TINT_BUILD_WGSL_WRITER: enable the WGSL output writer (on by default)
TINT_BUILD_FUZZERS: enable building fuzzzers (off by default)
Tint uses Chromium dependency management so you need to install depot_tools and add it to your PATH.
# Clone the repo as "tint" git clone https://dawn.googlesource.com/tint tint cd tint # Bootstrap the gclient configuration cp scripts/standalone.gclient .gclient # Fetch external dependencies and toolchains with gclient gclient sync
mkdir -p out/Debug cd out/Debug cmake -GNinja ../.. ninja # or autoninja
mkdir -p out/Debug cd out/Debug cmake ../.. make # -j N for N-way parallel build
mkdir -p out/Debug gn gen out/Debug autoninja -C out/Debug
If you are attempting fuzz, using
TINT_BUILD_FUZZERS=ON, the version of llvm in the XCode SDK does not have the needed libfuzzer functionality included.
The build error that you will see from using the XCode SDK will look something like this:
ld: file not found:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/lib/darwin/libclang_rt.fuzzer_osx.a
The solution to this problem is to use a full version llvm, like what you would get via homebrew,
brew install llvm, and use something like
CC=<path to full clang> cmake .. to setup a build using that toolchain.
The gn based work flow uses the Chromium toolchain for building in anticipation of integration of Tint into Chromium based projects. This toolchain has additional plugins for checking for style issues, which are marked with [chromium-style] in log messages. This means that this toolchain is more strict then the default clang toolchain.
In the future we will have a CQ that will build this work flow and flag issues automatically. Until that is in place, to avoid causing breakages you can run the [chromium-style] checks using the CMake based work flows. This requires setting
CC to the version of clang checked out by
gclient sync and setting the
mkdir -p out/style cd out/style cmake ../.. CC=../../third_party/llvm-build/Release+Asserts/bin/clang cmake -DTINT_CHECK_CHROMIUM_STYLE=ON ../../ # add -GNinja for ninja builds
Please file any issues or feature requests at https://bugs.chromium.org/p/tint/issues/entry
Please see the CONTRIBUTING and CODE_OF_CONDUCT files on how to contribute to Tint.
Tint has a process for supporting experimental extensions.