| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Delete all filegroups that supported legacy (non-buffet) Bazel build We don't need most of the flags and all these file groups which had made a big "ball o mud" build. Change-Id: I690f38c3555e390b7c8d459b4649a270c3e03ce2 Bug: b/40045064 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/889266 Commit-Queue: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> | 1 年前 | |
Make Bazel boilerplate presubmit platform dependent This also adds the boilerplate to a few files using a bespoke script. Change-Id: Ie65d2490ada73e08ae64d1757cc90a8c8eaa9e74 No-Try: true Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1000396 Reviewed-by: Michael Ludwig <michaelludwig@google.com> | 1 年前 | |
Remove references to obsolete ChromeOS devices We stopped testing on these devices in late 2024 / early 2025. The Chromebook Plus had been obsolete earlier, maybe Dec 2023? Change-Id: Ie89502b62ac1165d45a27267665b70aa6b0e86a0 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1070478 Reviewed-by: Noelle Scobie <nscobie@google.com> | 8 个月前 | |
[rust png] Create skeleton for rust common gn integration in Chromium This CL is creating defining the required gni vars for the integration in Chromium. This CL is intended to be landed in conjunction to this CL on Chromium repository: https://chromium-review.googlesource.com/c/chromium/src/+/7130444 Both are a pre-requisite for landing the CL refactoring rust png to extract ReadAndSeek traits to rust/common: https://skia-review.googlesource.com/c/skia/+/1093916?tab=comments Bug: 452666425 Change-Id: If0321e0f510b0717025e1044bf5616def018aaf1 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1095596 Reviewed-by: Kaylee Lubick <kjlubick@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Łukasz Anforowicz <lukasza@google.com> | 7 个月前 | |
[rust png] Extract ReadAndSeek traits from rust/png to rust/common Extract the StreamAdapter (Read+Seek) classes from PNG-specific code to rust/common for reuse across multiple codec implementations (PNG, BMP, JPEG, etc.). Key changes: - Created rust/common/SkStreamAdapter.h with StreamAdapter classes that wrap SkStream for Rust FFI - Created rust/common/io_traits_ffi.rs as canonical CXX bridge declaration for type unification across codec modules - Updated rust/png/FFI.rs to use unified types from rust::stream namespace Bug: 452666425 Change-Id: I8e2ec205d485603816690c0e15600f0c9a4eb89f Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1093916 Reviewed-by: Łukasz Anforowicz <lukasza@google.com> Reviewed-by: Kaylee Lubick <kjlubick@google.com> Commit-Queue: Łukasz Anforowicz <lukasza@google.com> | 7 个月前 | |
[Fontations] Roll Fontations Skrifa 0.34 -> 0.36 Read-fonts 0.32 -> 0.34 Roll process: Update versions in MODULE.bazel and bazel/external/fontations/Cargo.toml, build to ensure Bazel locks versions, for example: $ bazel build //tools/viewer Bug: skia:40045335 Cq-Include-Trybots: luci.skia.skia.primary:BazelBuild-fontations-release-linux_x64,Build-Mac-Clang-x86_64-Debug-Fontations,Build-Ubuntu24.04-Clang-x86_64-Debug-Fontations,Test-Mac14-Clang-MacMini8.1-CPU-AVX2-x86_64-Debug-All-NativeFonts_Fontations,Test-Mac15-Clang-MacBookPro15.1-CPU-AppleIntel-x86_64-Debug-All-NativeFonts_Fontations,Test-Ubuntu24.04-Clang-GCE-CPU-AVX2-x86_64-Debug-All-NativeFonts_Fontations Change-Id: I465f1516225d1c7854b85238b33c8411fb5e9da3 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1050116 Auto-Submit: Dominik Röttsches <drott@google.com> Reviewed-by: Kaylee Lubick <kjlubick@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> | 9 个月前 | |
[cdn] Use cdn.skia.org instead of gs://skia-world-readable Bug: b/430275865 Change-Id: If799d8ca903f81cedd61f46e6a0d98f658269fe2 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1020436 Reviewed-by: Kaylee Lubick <kjlubick@google.com> Commit-Queue: Eric Boren <borenet@google.com> | 11 个月前 | |
Update Bazel to 8.2.1 and use bzlmod The update to bzlmod [1] changes how we handle third_party deps (dramatically) and how our toolchains work (minorly). To review and understand the changes, I suggest going language by language through the changes: C++ === We have Bazel check out git repositories listed in deps.bzl (like before), but this has been converted to a module_extension [2] which behaves basically the same. In MODULE.bazel, we load the extension and then specify all the dependencies that Skia directly depends on from there. If we can depend on versions from the Bazel registry [3], for example bazel_dep(name = "libpng", version = "1.6.47.bcr.1") we could remove the git repository versions and this might make things easier for external clients if there are version mismatches. A big change was required with how we customize our compilation of expat, FreeType, Harfbuzz, and ICU. Previously, we'd copied in (or cleverly referenced) files from the Skia repo in the third party copy of the code and this sort of worked. External clients had to use some helpers to load these configs and it was Fine (tm). This does not work with bzlmod's dependency graph. I tried several things to make this work cleanly and ran into road blocks with either RBE or external client usage (or both). See earlier patchsets for that, if interested. What *did* work (at least ok) was making a patch file per third party dep that needed it using tools/generate_patches.py to combine all those files and specify an output location. This has the downside of not being in sync, but I made the existing roll scripts for expat, FreeType, Harfbuzz shell out to the script to minimize that. Toolchains needed to be slightly updated to have a different path in the external/ output directory, which now includes some prefixing. To make this as robust as possible, I made the trampoline scripts use paths relative to where the script lives and use a glob to find the path no matter what the prefix is. Clang remains at 15.0.1 for Bazel builds. Rust ==== The rust toolchain has been updated to 1.86.0 (this was the primary impetus for this change). External crate dependences use crate_universe [4] and specify the versions we need directly in MODULE.bazel instead of using a toml file. I chose that approach because it seemed more direct when one wants to figure out what version our Bazel build uses. All crates except cxx worked "out of the box", meaning the rules_rust generated BUILD.bazel files for them in a way that just worked. I had to use crate.annotation to customize cxx to use bazel/external/cxx/BUILD.bazel.skia in addition to the generated rule so we can overwrite the include path. This was a bit fiddly and required me to spend a while looking through the bazel cache to experiment with what the output was. The only other major change is how we reference rust dependencies now. For example in src/ports/fontations/BUILD.bazel see that all rust dependencies are based out of @crates instead of all being top level dependencies. Again, poking into the bazel cache is helpful for figuring out what the generated target names are. Another upside of this update is the big long "splicing workspaces" seems to have gone away. Golang ====== The golang version is now 1.24.2. These were the most fiddly changes - particularly with some changes in the ecosystem related to protos. In MODULE.bazel, the go.mod file is read in to get both the go version and the direct golang dependencies. go_rules uses gazelle [5] to generate BUILD.bazel files for any deps if they don't have them. This includes generating BUILD.bazel files for proto files, which are a bit messy due to there being some conflicting ways to include these and thus resolve the deps. This [6] is why I ended up mothballing the upgrade of the Skia Infra repo in favor of a minimal [7] change. In this case, we only had to tell the go.chromium.org/luci repo not to autogenerate .go files for .proto files because there are pre-existing ones. While building task drivers, there was a problem where some go deps were not being brought in and thus our transitive dependencies were failing to build. This is why tools.go was added (inspired by [8] to force those to be included. Python3 ======= This was a straightforward upgrade to Python 3.13. MODULE.bazel still reads requirements.txt to figure out what to download. The BUILD.bazel file we build for Dawn uses these requirements, but we didn't have to change how that worked at all. Other Notes =========== Renames ------- There are many mechanical changes (e.g. io_bazel_rules_go->rules_go) throughout as a result of bzlmod having different (non prefixed) package names in some cases. bazel/buildrc ------------- Sandboxing seems much faster in this new Bazel version on Mac. Thus I deleted the no_sandbox config. This change also updates the version of emsdk we use to compile CanvasKit. I had to squelch some warnings that they have via our config because I didn't see another way to override their toolchain settings. buildifier ---------- Updated the version used by Bazel to 8.0.3 I suggest folks also update their local version too, so presubmits work [9] Not working (yet) / disabled ============================ - karma_tests (JS tests for CanvasKit). This was based on long-deprecated rules and I didn't have the time to fix this. We still have GN based tests for CanvasKit, so this was low enough priority to skip for now - codesize_test. git_common.WithGitFinder was not working. As this is a test for our task_driver and has been stable for a while, it seemed like a low priority to fix. - bazel run //:gofmt. This moved with new go_rules and I couldn't find an easy replacement. - bazel run //:errcheck. This needs to shell out to golang and doesn't work on systems that don't have go installed because of the hermeticity. Not sure what to do about that. - clang_ios and clang_windows_amd64 toolchains. We don't have any CI jobs that use these atm, and they are lower priority for now. I made some changes based on other toolchains, but didn't test these. [1] https://bazel.build/external/migration [2] https://bazel.build/external/extension [3] https://registry.bazel.build/modules/libpng [4] https://bazelbuild.github.io/rules_rust/crate_universe_bzlmod.html [5] https://github.com/bazel-contrib/bazel-gazelle/blob/master/extensions.md#go_deps [6] https://skia-review.googlesource.com/c/buildbot/+/988440/11/MODULE.bazel [7] http://review.skia.org/990801 [8] https://github.com/google/skia-buildbot/blob/b4a7f41e01ea288eadd197f9eee0b1a8a12c5aa4/tools.go [9] https://github.com/bazelbuild/buildtools/releases/tag/v8.0.3 Change-Id: I68be15c5c4a5d2b14359fa460075591dafab336a Bug: b/413044303 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/984976 Commit-Queue: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Dominik Röttsches <drott@google.com> Reviewed-by: Eric Boren <borenet@google.com> | 1 年前 | |
Make Bazel boilerplate presubmit platform dependent This also adds the boilerplate to a few files using a bespoke script. Change-Id: Ie65d2490ada73e08ae64d1757cc90a8c8eaa9e74 No-Try: true Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1000396 Reviewed-by: Michael Ludwig <michaelludwig@google.com> | 1 年前 | |
Use buildifier to reformat all Bazel files After updating to buildifier 6.3.3 Ran the following commands: shopt -s globstar buildifier --mode=fix --lint=fix **/BUILD.bazel buildifier --mode=fix --lint=fix **/*.bzl This mostly sorted the load statements. Change-Id: I7da7513afbc147300cfecb38073ad52c05da2f16 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/763276 Reviewed-by: Leandro Lovisolo <lovisolo@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> | 2 年前 | |
[infra] Add BazelBuild task to build CanvasKit on the CI with Bazel For additional context, see "Codifying Certain Build Options" and "Building on the CI" in the design doc go/skia-bazel Suggested review order: - builder_name_schema.json to see the three required and one optional part of BazelBuild jobs. - jobs.json to see one new BazelBuild job added. In an ideal world, this job would have been named BazelBuild-//modules/canvaskit:canvaskit_wasm-debug-linux_x64 but Buildbucket (?) requires jobs match the regex ^[a-zA-Z0-9\\-_.\\(\\) ]{1,128}$ so we use spaces instead of slashes or colons. - gen_tasks_logic.go; noting the makeBazelLabel function expands most of the spaces to / and the last one to a colon to make a single-target label. If there are three dots, then it is a multi-target label, and we do not need to add a colon. - bazel_build.go; This is a very simple task driver, and I do not anticipate getting too much more complex. The place where we decide which args to augment a build with depend on the host platform and thus should be set in gen_tasks_logic.go. - bazel/buildrc to see some initial configurations set, one of which, "debug", is used by the new job. The "release" version of CanvasKit probably works on 3.1.10 which had a bugfix, but we are still on 3.1.9 - .bazelrc to see a rename of the linux-rbe config to linux_rbe (our configs should have no dashes if we want to specify them verbatim in our Job names). It also imports the Skia-specified build configs from //bazel/buildrc and supports the user-specified //bazel/user/buildrc file if it exists. - All other files in any order. Change-Id: Ib954dd6045100eadcbbf4ffee0888f6fbce65fa7 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537797 Reviewed-by: Eric Boren <borenet@google.com> Reviewed-by: Jorge Betancourt <jmbetancourt@google.com> | 4 年前 | |
Update Bazel to 8.2.1 and use bzlmod The update to bzlmod [1] changes how we handle third_party deps (dramatically) and how our toolchains work (minorly). To review and understand the changes, I suggest going language by language through the changes: C++ === We have Bazel check out git repositories listed in deps.bzl (like before), but this has been converted to a module_extension [2] which behaves basically the same. In MODULE.bazel, we load the extension and then specify all the dependencies that Skia directly depends on from there. If we can depend on versions from the Bazel registry [3], for example bazel_dep(name = "libpng", version = "1.6.47.bcr.1") we could remove the git repository versions and this might make things easier for external clients if there are version mismatches. A big change was required with how we customize our compilation of expat, FreeType, Harfbuzz, and ICU. Previously, we'd copied in (or cleverly referenced) files from the Skia repo in the third party copy of the code and this sort of worked. External clients had to use some helpers to load these configs and it was Fine (tm). This does not work with bzlmod's dependency graph. I tried several things to make this work cleanly and ran into road blocks with either RBE or external client usage (or both). See earlier patchsets for that, if interested. What *did* work (at least ok) was making a patch file per third party dep that needed it using tools/generate_patches.py to combine all those files and specify an output location. This has the downside of not being in sync, but I made the existing roll scripts for expat, FreeType, Harfbuzz shell out to the script to minimize that. Toolchains needed to be slightly updated to have a different path in the external/ output directory, which now includes some prefixing. To make this as robust as possible, I made the trampoline scripts use paths relative to where the script lives and use a glob to find the path no matter what the prefix is. Clang remains at 15.0.1 for Bazel builds. Rust ==== The rust toolchain has been updated to 1.86.0 (this was the primary impetus for this change). External crate dependences use crate_universe [4] and specify the versions we need directly in MODULE.bazel instead of using a toml file. I chose that approach because it seemed more direct when one wants to figure out what version our Bazel build uses. All crates except cxx worked "out of the box", meaning the rules_rust generated BUILD.bazel files for them in a way that just worked. I had to use crate.annotation to customize cxx to use bazel/external/cxx/BUILD.bazel.skia in addition to the generated rule so we can overwrite the include path. This was a bit fiddly and required me to spend a while looking through the bazel cache to experiment with what the output was. The only other major change is how we reference rust dependencies now. For example in src/ports/fontations/BUILD.bazel see that all rust dependencies are based out of @crates instead of all being top level dependencies. Again, poking into the bazel cache is helpful for figuring out what the generated target names are. Another upside of this update is the big long "splicing workspaces" seems to have gone away. Golang ====== The golang version is now 1.24.2. These were the most fiddly changes - particularly with some changes in the ecosystem related to protos. In MODULE.bazel, the go.mod file is read in to get both the go version and the direct golang dependencies. go_rules uses gazelle [5] to generate BUILD.bazel files for any deps if they don't have them. This includes generating BUILD.bazel files for proto files, which are a bit messy due to there being some conflicting ways to include these and thus resolve the deps. This [6] is why I ended up mothballing the upgrade of the Skia Infra repo in favor of a minimal [7] change. In this case, we only had to tell the go.chromium.org/luci repo not to autogenerate .go files for .proto files because there are pre-existing ones. While building task drivers, there was a problem where some go deps were not being brought in and thus our transitive dependencies were failing to build. This is why tools.go was added (inspired by [8] to force those to be included. Python3 ======= This was a straightforward upgrade to Python 3.13. MODULE.bazel still reads requirements.txt to figure out what to download. The BUILD.bazel file we build for Dawn uses these requirements, but we didn't have to change how that worked at all. Other Notes =========== Renames ------- There are many mechanical changes (e.g. io_bazel_rules_go->rules_go) throughout as a result of bzlmod having different (non prefixed) package names in some cases. bazel/buildrc ------------- Sandboxing seems much faster in this new Bazel version on Mac. Thus I deleted the no_sandbox config. This change also updates the version of emsdk we use to compile CanvasKit. I had to squelch some warnings that they have via our config because I didn't see another way to override their toolchain settings. buildifier ---------- Updated the version used by Bazel to 8.0.3 I suggest folks also update their local version too, so presubmits work [9] Not working (yet) / disabled ============================ - karma_tests (JS tests for CanvasKit). This was based on long-deprecated rules and I didn't have the time to fix this. We still have GN based tests for CanvasKit, so this was low enough priority to skip for now - codesize_test. git_common.WithGitFinder was not working. As this is a test for our task_driver and has been stable for a while, it seemed like a low priority to fix. - bazel run //:gofmt. This moved with new go_rules and I couldn't find an easy replacement. - bazel run //:errcheck. This needs to shell out to golang and doesn't work on systems that don't have go installed because of the hermeticity. Not sure what to do about that. - clang_ios and clang_windows_amd64 toolchains. We don't have any CI jobs that use these atm, and they are lower priority for now. I made some changes based on other toolchains, but didn't test these. [1] https://bazel.build/external/migration [2] https://bazel.build/external/extension [3] https://registry.bazel.build/modules/libpng [4] https://bazelbuild.github.io/rules_rust/crate_universe_bzlmod.html [5] https://github.com/bazel-contrib/bazel-gazelle/blob/master/extensions.md#go_deps [6] https://skia-review.googlesource.com/c/buildbot/+/988440/11/MODULE.bazel [7] http://review.skia.org/990801 [8] https://github.com/google/skia-buildbot/blob/b4a7f41e01ea288eadd197f9eee0b1a8a12c5aa4/tools.go [9] https://github.com/bazelbuild/buildtools/releases/tag/v8.0.3 Change-Id: I68be15c5c4a5d2b14359fa460075591dafab336a Bug: b/413044303 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/984976 Commit-Queue: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Dominik Röttsches <drott@google.com> Reviewed-by: Eric Boren <borenet@google.com> | 1 年前 | |
[rust png] Move Rust PNG implementation to non-"experimental" dir. This CL moves the remaining experimental/rust_png/... files into non-experimental directories. Bug: chromium:444061405 Change-Id: I6a266f6d1823c08bef147c6334c3d735367dec6a Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1055756 Commit-Queue: Łukasz Anforowicz <lukasza@google.com> Auto-Submit: Łukasz Anforowicz <lukasza@google.com> Reviewed-by: Kaylee Lubick <kjlubick@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> Owners-Override: Kaylee Lubick <kjlubick@google.com> | 9 个月前 | |
Build everything with c++20 And clean up configs such as skia_use_cpp20. Bug: 311238827, chromium:388070065 Change-Id: I8149243f3f051c2432a1910febe1462d6292a360 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1082056 Reviewed-by: Kaylee Lubick <kjlubick@google.com> Commit-Queue: Victor Vianna <victorvianna@google.com> Auto-Submit: Victor Vianna <victorvianna@google.com> | 8 个月前 | |
Update Bazel to 8.2.1 and use bzlmod The update to bzlmod [1] changes how we handle third_party deps (dramatically) and how our toolchains work (minorly). To review and understand the changes, I suggest going language by language through the changes: C++ === We have Bazel check out git repositories listed in deps.bzl (like before), but this has been converted to a module_extension [2] which behaves basically the same. In MODULE.bazel, we load the extension and then specify all the dependencies that Skia directly depends on from there. If we can depend on versions from the Bazel registry [3], for example bazel_dep(name = "libpng", version = "1.6.47.bcr.1") we could remove the git repository versions and this might make things easier for external clients if there are version mismatches. A big change was required with how we customize our compilation of expat, FreeType, Harfbuzz, and ICU. Previously, we'd copied in (or cleverly referenced) files from the Skia repo in the third party copy of the code and this sort of worked. External clients had to use some helpers to load these configs and it was Fine (tm). This does not work with bzlmod's dependency graph. I tried several things to make this work cleanly and ran into road blocks with either RBE or external client usage (or both). See earlier patchsets for that, if interested. What *did* work (at least ok) was making a patch file per third party dep that needed it using tools/generate_patches.py to combine all those files and specify an output location. This has the downside of not being in sync, but I made the existing roll scripts for expat, FreeType, Harfbuzz shell out to the script to minimize that. Toolchains needed to be slightly updated to have a different path in the external/ output directory, which now includes some prefixing. To make this as robust as possible, I made the trampoline scripts use paths relative to where the script lives and use a glob to find the path no matter what the prefix is. Clang remains at 15.0.1 for Bazel builds. Rust ==== The rust toolchain has been updated to 1.86.0 (this was the primary impetus for this change). External crate dependences use crate_universe [4] and specify the versions we need directly in MODULE.bazel instead of using a toml file. I chose that approach because it seemed more direct when one wants to figure out what version our Bazel build uses. All crates except cxx worked "out of the box", meaning the rules_rust generated BUILD.bazel files for them in a way that just worked. I had to use crate.annotation to customize cxx to use bazel/external/cxx/BUILD.bazel.skia in addition to the generated rule so we can overwrite the include path. This was a bit fiddly and required me to spend a while looking through the bazel cache to experiment with what the output was. The only other major change is how we reference rust dependencies now. For example in src/ports/fontations/BUILD.bazel see that all rust dependencies are based out of @crates instead of all being top level dependencies. Again, poking into the bazel cache is helpful for figuring out what the generated target names are. Another upside of this update is the big long "splicing workspaces" seems to have gone away. Golang ====== The golang version is now 1.24.2. These were the most fiddly changes - particularly with some changes in the ecosystem related to protos. In MODULE.bazel, the go.mod file is read in to get both the go version and the direct golang dependencies. go_rules uses gazelle [5] to generate BUILD.bazel files for any deps if they don't have them. This includes generating BUILD.bazel files for proto files, which are a bit messy due to there being some conflicting ways to include these and thus resolve the deps. This [6] is why I ended up mothballing the upgrade of the Skia Infra repo in favor of a minimal [7] change. In this case, we only had to tell the go.chromium.org/luci repo not to autogenerate .go files for .proto files because there are pre-existing ones. While building task drivers, there was a problem where some go deps were not being brought in and thus our transitive dependencies were failing to build. This is why tools.go was added (inspired by [8] to force those to be included. Python3 ======= This was a straightforward upgrade to Python 3.13. MODULE.bazel still reads requirements.txt to figure out what to download. The BUILD.bazel file we build for Dawn uses these requirements, but we didn't have to change how that worked at all. Other Notes =========== Renames ------- There are many mechanical changes (e.g. io_bazel_rules_go->rules_go) throughout as a result of bzlmod having different (non prefixed) package names in some cases. bazel/buildrc ------------- Sandboxing seems much faster in this new Bazel version on Mac. Thus I deleted the no_sandbox config. This change also updates the version of emsdk we use to compile CanvasKit. I had to squelch some warnings that they have via our config because I didn't see another way to override their toolchain settings. buildifier ---------- Updated the version used by Bazel to 8.0.3 I suggest folks also update their local version too, so presubmits work [9] Not working (yet) / disabled ============================ - karma_tests (JS tests for CanvasKit). This was based on long-deprecated rules and I didn't have the time to fix this. We still have GN based tests for CanvasKit, so this was low enough priority to skip for now - codesize_test. git_common.WithGitFinder was not working. As this is a test for our task_driver and has been stable for a while, it seemed like a low priority to fix. - bazel run //:gofmt. This moved with new go_rules and I couldn't find an easy replacement. - bazel run //:errcheck. This needs to shell out to golang and doesn't work on systems that don't have go installed because of the hermeticity. Not sure what to do about that. - clang_ios and clang_windows_amd64 toolchains. We don't have any CI jobs that use these atm, and they are lower priority for now. I made some changes based on other toolchains, but didn't test these. [1] https://bazel.build/external/migration [2] https://bazel.build/external/extension [3] https://registry.bazel.build/modules/libpng [4] https://bazelbuild.github.io/rules_rust/crate_universe_bzlmod.html [5] https://github.com/bazel-contrib/bazel-gazelle/blob/master/extensions.md#go_deps [6] https://skia-review.googlesource.com/c/buildbot/+/988440/11/MODULE.bazel [7] http://review.skia.org/990801 [8] https://github.com/google/skia-buildbot/blob/b4a7f41e01ea288eadd197f9eee0b1a8a12c5aa4/tools.go [9] https://github.com/bazelbuild/buildtools/releases/tag/v8.0.3 Change-Id: I68be15c5c4a5d2b14359fa460075591dafab336a Bug: b/413044303 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/984976 Commit-Queue: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Dominik Röttsches <drott@google.com> Reviewed-by: Eric Boren <borenet@google.com> | 1 年前 | |
[cdn] Use cdn.skia.org instead of gs://skia-world-readable Bug: b/430275865 Change-Id: If799d8ca903f81cedd61f46e6a0d98f658269fe2 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1020436 Reviewed-by: Kaylee Lubick <kjlubick@google.com> Commit-Queue: Eric Boren <borenet@google.com> | 11 个月前 | |
Make MODULE.bazel.lock updates easier for autorollers Everytime we updated deps.bzl, the MODULE.bazel.lock file needed to have a proprietary checksum re-calculated (via bazel mod tidy). This is problematic for autorollers, which strive to use find/replace (e.g. old revision with new revision) because that can be achieved w/o needing a full checkout (and are thus faster). I tried a few things to remove the checksum entirely, and eventually drew inspiration from how rules for go work [1], by returning a non-empty extension_metadata [2][3] that contains the reproducible flag. This tells Bazel "my generated rules are hermetic all by themselves" so it doesn't have to track the hash of the input files (neither cpp_modules.bzl nor deps.json). The result is simpler, as we don't have to generate hand-written Starlark code, but can instead just generate JSON data that is later parsed. Autorollers should be able to just keep doing find and replace on deps.json when updating. [1] https://github.com/bazel-contrib/bazel-gazelle/blob/4440fb7e8b6c29b7e0b69a77572bd91ed325398e/internal/bzlmod/go_deps.bzl#L336 [2] https://github.com/bazel-contrib/bazel-gazelle/blob/4440fb7e8b6c29b7e0b69a77572bd91ed325398e/internal/bzlmod/utils.bzl#L122-L137 [3] https://bazel.build/rules/lib/builtins/module_ctx#extension_metadata Change-Id: Ia36412a1d4ebec434bcf9986601d84481b1ee8aa Bug: b/418260494 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/995896 Commit-Queue: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Eric Boren <borenet@google.com> | 1 年前 | |
Update pinned libpng version See https://groups.google.com/a/google.com/g/skia-team/c/klqB8W2Bupg Disabled test and filed bug https://crbug.com/skia/464028670 Change-Id: I539763cf483bbec0519ae4f930a68c4551ea5fdf Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1111416 Commit-Queue: Kaylee Lubick <kjlubick@google.com> Auto-Submit: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Eric Boren <borenet@google.com> Commit-Queue: Eric Boren <borenet@google.com> | 7 个月前 | |
Remove references to obsolete ChromeOS devices We stopped testing on these devices in late 2024 / early 2025. The Chromebook Plus had been obsolete earlier, maybe Dec 2023? Change-Id: Ie89502b62ac1165d45a27267665b70aa6b0e86a0 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1070478 Reviewed-by: Noelle Scobie <nscobie@google.com> | 8 个月前 | |
Add buffet rule for png encoding and fontconfig SkFontMgr Clients need a way to get @freetype_config (a small set of files to configure how freetype is compiled), so I added bazel/download_config_files.bzl to copy them from the Skia repository. We will eventually want something more robust/hermetic, but for now this just downloads them from GitHub because that was easiest. When using a toolchain that is not the Skia hermetic one, clients will have to have the fontconfig headers and something to link against (these are in the docker container we test the compilation with [1]). [1] https://github.com/google/skia/blob/3e1e653634557386e53eaecbca97f6489d25c990/infra/gcc/Debian11/Dockerfile#L6 Change-Id: I5b16f98a487091ea95916946b9094eb1a22b71ae Bug: b/305780908 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/778139 Reviewed-by: Leandro Lovisolo <lovisolo@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> | 2 年前 | |
Use buildifier to reformat all Bazel files After updating to buildifier 6.3.3 Ran the following commands: shopt -s globstar buildifier --mode=fix --lint=fix **/BUILD.bazel buildifier --mode=fix --lint=fix **/*.bzl This mostly sorted the load statements. Change-Id: I7da7513afbc147300cfecb38073ad52c05da2f16 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/763276 Reviewed-by: Leandro Lovisolo <lovisolo@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> | 2 年前 | |
[cdn] Use cdn.skia.org instead of gs://skia-world-readable Bug: b/430275865 Change-Id: If799d8ca903f81cedd61f46e6a0d98f658269fe2 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1020436 Reviewed-by: Kaylee Lubick <kjlubick@google.com> Commit-Queue: Eric Boren <borenet@google.com> | 11 个月前 | |
Build everything with c++20 And clean up configs such as skia_use_cpp20. Bug: 311238827, chromium:388070065 Change-Id: I8149243f3f051c2432a1910febe1462d6292a360 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1082056 Reviewed-by: Kaylee Lubick <kjlubick@google.com> Commit-Queue: Victor Vianna <victorvianna@google.com> Auto-Submit: Victor Vianna <victorvianna@google.com> | 8 个月前 | |
Compile include/ headers on their own In https://review.skia.org/1024156, we removed IWYU logic, but this also removed the ability for us to test compiling headers on their own (which other build systems do). This caused a missing #include to land in Skia but break upstream things [1]. By adding in the way to generate .cpp files for headers, this will allow us to catch that type of error. Unlike before, where there was a hand-curated list of headers, I did my best to include all public headers (and then those from select/core) which would have caught the previous error. If we like this, I can add other subdirectories to src to the list. I also did my best to avoid duplication of header files, so they are listed in one place and not two (e.g. 2 different BUILD.bazel rules) so it's hopefully easier to maintain. Change-Id: Ib5589c6ac06709d5a472bc7c524cc7a3b2a506b0 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1029376 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> | 10 个月前 | |
Skia: Upgrade Go to 1.21. This CL aims to unblock the Skia Infrastructure -> Skia autoroller, which has been broken ever since Skia Infrastructure was upgraded to Go 1.21 in https://skia-review.googlesource.com/c/buildbot/+/775867. This CL also updates rules_go and Gazelle to match the version in Skia Infrastructure. It includes the same compatibility changes as in https://skia-review.googlesource.com/c/buildbot/+/772355. The reason for updating rules_go is two-fold: a previous attempt at updating Go suggests we might need a newer rules_go version (https://skia-review.googlesource.com/c/skia/+/781216), and I think aligning the rules_go versions might prevent future Skia Infra -> Skia autoroller failures. The "skia/bots/go" CIPD package needed to be updated as well to prevent Housekeeper-PerCommit-InfraTests_Linux errors (example: https://task-scheduler.skia.org/job/LRdkt8Jt87HicKl6hptU). Notable change: I had add a special case to //toolchain/linux_trampolines/clang_trampoline_linux.sh in order to prevent C++ errors while compiling the Go standard library. This new special case does not affect Skia's C++ compilation. See comments for details. Bug: b/316979074 Change-Id: Ia6514440b97219b64db2ca41c452dacfe97240b4 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/791499 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Leandro Lovisolo <lovisolo@google.com> | 2 年前 | |
Remove IWYU build logic from Bazel Follow-up from https://skia-review.googlesource.com/c/skia/+/896098/13/infra/bots/jobs.json#b17 Change-Id: I7f9d3860ba2cedebe55523dfdf1d80d4387f2d46 Bug: b/40044159 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1024156 Auto-Submit: Kaylee Lubick <kjlubick@google.com> Commit-Queue: Eric Boren <borenet@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Eric Boren <borenet@google.com> | 11 个月前 | |
Reland "Reland: [bazel] Housekeeper-PerCommit-CheckGeneratedFiles: Add "go generate", Gazelle and Buildifier steps." This is a reland of commit 42444c063aea15caa3803290a32574e797556e80 Original change's description: > Reland: [bazel] Housekeeper-PerCommit-CheckGeneratedFiles: Add "go generate", Gazelle and Buildifier steps. > > This CL relands https://skia-review.googlesource.com/c/skia/+/778517. > > It turns out that defining "buildifier" in //BUILD.bazel breaks some tasks, such as BazelTest-external_client-png_decoder-default-linux_x64. This CL fixes the breakage by moving its definition to //bazel/BUILD.bazel. > > Bug: b/40045301 > Change-Id: Ib22071cb897de62c834962f68ca2f9646fbf4c75 > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/778609 > Auto-Submit: Leandro Lovisolo <lovisolo@google.com> > Commit-Queue: Kevin Lubick <kjlubick@google.com> > Reviewed-by: Kevin Lubick <kjlubick@google.com> Bug: b/40045301 Change-Id: Ib6eb4b76b51e6df1c9ea23ac2a2c238b5a4e2eef Reviewed-on: https://skia-review.googlesource.com/c/skia/+/779496 Commit-Queue: Leandro Lovisolo <lovisolo@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com> | 2 年前 | |
Update Bazel to 8.2.1 and use bzlmod The update to bzlmod [1] changes how we handle third_party deps (dramatically) and how our toolchains work (minorly). To review and understand the changes, I suggest going language by language through the changes: C++ === We have Bazel check out git repositories listed in deps.bzl (like before), but this has been converted to a module_extension [2] which behaves basically the same. In MODULE.bazel, we load the extension and then specify all the dependencies that Skia directly depends on from there. If we can depend on versions from the Bazel registry [3], for example bazel_dep(name = "libpng", version = "1.6.47.bcr.1") we could remove the git repository versions and this might make things easier for external clients if there are version mismatches. A big change was required with how we customize our compilation of expat, FreeType, Harfbuzz, and ICU. Previously, we'd copied in (or cleverly referenced) files from the Skia repo in the third party copy of the code and this sort of worked. External clients had to use some helpers to load these configs and it was Fine (tm). This does not work with bzlmod's dependency graph. I tried several things to make this work cleanly and ran into road blocks with either RBE or external client usage (or both). See earlier patchsets for that, if interested. What *did* work (at least ok) was making a patch file per third party dep that needed it using tools/generate_patches.py to combine all those files and specify an output location. This has the downside of not being in sync, but I made the existing roll scripts for expat, FreeType, Harfbuzz shell out to the script to minimize that. Toolchains needed to be slightly updated to have a different path in the external/ output directory, which now includes some prefixing. To make this as robust as possible, I made the trampoline scripts use paths relative to where the script lives and use a glob to find the path no matter what the prefix is. Clang remains at 15.0.1 for Bazel builds. Rust ==== The rust toolchain has been updated to 1.86.0 (this was the primary impetus for this change). External crate dependences use crate_universe [4] and specify the versions we need directly in MODULE.bazel instead of using a toml file. I chose that approach because it seemed more direct when one wants to figure out what version our Bazel build uses. All crates except cxx worked "out of the box", meaning the rules_rust generated BUILD.bazel files for them in a way that just worked. I had to use crate.annotation to customize cxx to use bazel/external/cxx/BUILD.bazel.skia in addition to the generated rule so we can overwrite the include path. This was a bit fiddly and required me to spend a while looking through the bazel cache to experiment with what the output was. The only other major change is how we reference rust dependencies now. For example in src/ports/fontations/BUILD.bazel see that all rust dependencies are based out of @crates instead of all being top level dependencies. Again, poking into the bazel cache is helpful for figuring out what the generated target names are. Another upside of this update is the big long "splicing workspaces" seems to have gone away. Golang ====== The golang version is now 1.24.2. These were the most fiddly changes - particularly with some changes in the ecosystem related to protos. In MODULE.bazel, the go.mod file is read in to get both the go version and the direct golang dependencies. go_rules uses gazelle [5] to generate BUILD.bazel files for any deps if they don't have them. This includes generating BUILD.bazel files for proto files, which are a bit messy due to there being some conflicting ways to include these and thus resolve the deps. This [6] is why I ended up mothballing the upgrade of the Skia Infra repo in favor of a minimal [7] change. In this case, we only had to tell the go.chromium.org/luci repo not to autogenerate .go files for .proto files because there are pre-existing ones. While building task drivers, there was a problem where some go deps were not being brought in and thus our transitive dependencies were failing to build. This is why tools.go was added (inspired by [8] to force those to be included. Python3 ======= This was a straightforward upgrade to Python 3.13. MODULE.bazel still reads requirements.txt to figure out what to download. The BUILD.bazel file we build for Dawn uses these requirements, but we didn't have to change how that worked at all. Other Notes =========== Renames ------- There are many mechanical changes (e.g. io_bazel_rules_go->rules_go) throughout as a result of bzlmod having different (non prefixed) package names in some cases. bazel/buildrc ------------- Sandboxing seems much faster in this new Bazel version on Mac. Thus I deleted the no_sandbox config. This change also updates the version of emsdk we use to compile CanvasKit. I had to squelch some warnings that they have via our config because I didn't see another way to override their toolchain settings. buildifier ---------- Updated the version used by Bazel to 8.0.3 I suggest folks also update their local version too, so presubmits work [9] Not working (yet) / disabled ============================ - karma_tests (JS tests for CanvasKit). This was based on long-deprecated rules and I didn't have the time to fix this. We still have GN based tests for CanvasKit, so this was low enough priority to skip for now - codesize_test. git_common.WithGitFinder was not working. As this is a test for our task_driver and has been stable for a while, it seemed like a low priority to fix. - bazel run //:gofmt. This moved with new go_rules and I couldn't find an easy replacement. - bazel run //:errcheck. This needs to shell out to golang and doesn't work on systems that don't have go installed because of the hermeticity. Not sure what to do about that. - clang_ios and clang_windows_amd64 toolchains. We don't have any CI jobs that use these atm, and they are lower priority for now. I made some changes based on other toolchains, but didn't test these. [1] https://bazel.build/external/migration [2] https://bazel.build/external/extension [3] https://registry.bazel.build/modules/libpng [4] https://bazelbuild.github.io/rules_rust/crate_universe_bzlmod.html [5] https://github.com/bazel-contrib/bazel-gazelle/blob/master/extensions.md#go_deps [6] https://skia-review.googlesource.com/c/buildbot/+/988440/11/MODULE.bazel [7] http://review.skia.org/990801 [8] https://github.com/google/skia-buildbot/blob/b4a7f41e01ea288eadd197f9eee0b1a8a12c5aa4/tools.go [9] https://github.com/bazelbuild/buildtools/releases/tag/v8.0.3 Change-Id: I68be15c5c4a5d2b14359fa460075591dafab336a Bug: b/413044303 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/984976 Commit-Queue: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Dominik Röttsches <drott@google.com> Reviewed-by: Eric Boren <borenet@google.com> | 1 年前 | |
[Fontations] Remove middle gen/ path extension for cxxbridge output Inserting gen/ is not compatible with how Blink buildfiles generate cxxbridge output and leads to requiring #include statements with different paths in the Skia and in the Blink context. Blink's GN rules for cxxbridge output the generated files (as other Blink generated files) to a top-level gen/ directory in the GN output directory, then add these paths as include path. The path pointing to the source file in the #include directive in the C++ file should a) be the same in Skia and Blink contexts and b) should look identical to the path to the Rust source from which cxxbridge generated this file. To that effect, remove the "gen/" path extension in the run_cxxbridge_cmd rule. Fixed: skia:14332 Change-Id: Ia3246f6a6a7073aa9f5d731003cf354b345e2459 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/703856 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Dominik Röttsches <drott@google.com> | 3 年前 | |
Mac viewer builds with bazel Some of the required objective-c files were compiled with ARC but they do MRC and so didn't compile. objc_library has a non_arc_srcs list that compiles files with -fno-objc-arc but using this through the skia_objc_library macro causes an obscure crash in bazel. So it is reimplemented in the macro using a nested objc_library that augments its copts. Change-Id: Ie04f2531ff741ac0d209a6bdca2f793c488e63ab Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1051339 Commit-Queue: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> | 9 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 年前 | ||
| 1 年前 | ||
| 8 个月前 | ||
| 7 个月前 | ||
| 7 个月前 | ||
| 9 个月前 | ||
| 11 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 11 个月前 | ||
| 1 年前 | ||
| 7 个月前 | ||
| 8 个月前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 11 个月前 | ||
| 8 个月前 | ||
| 10 个月前 | ||
| 2 年前 | ||
| 11 个月前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 9 个月前 |