-
Notifications
You must be signed in to change notification settings - Fork 6k
[web] Build multiple CanvasKit variants (using toolchain_args) #38448
Changes from 11 commits
0b6486f
251e970
fbcaf7d
bb376cc
533864a
b59bf8c
0572533
ea0e192
8783c22
0d34f98
5cb2d24
098ee39
6551b11
7fe057b
3ea622c
3ce4045
59e7fc8
f681283
b15ae6e
27434d0
f2f0ba0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,36 @@ | ||||||
| # Copyright 2022 The Flutter Authors. All rights reserved. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| # Use of this source code is governed by a BSD-style license that can be | ||||||
| # found in the LICENSE file. | ||||||
|
|
||||||
| import("//build/toolchain/wasm.gni") | ||||||
|
|
||||||
| # This toolchain is only to be used by the canvaskit group below. | ||||||
| wasm_toolchain("canvaskit") { | ||||||
| # Prevent accidental use of this toolchain. | ||||||
| assert(target_name == "canvaskit", "Only :canvaskit can use this toolchain.") | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I've poked around the GN docs and source. It looks like it is not possible to set the visibility of a toolchain, or of a template. Also it looks like the label of the target that the toolchain is building is only available in the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Oh thanks for pointing this out. I'll remove the assert. I also think I should rename this to
I did the same and even tried it (in case it was an oversight in the docs) but gn yelled at me lol. That's when I changed it to an assert.
😞
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ugh.. if I change this to @zanderso Do you know how I can control the output directory for the toolchain? I couldn't find any documentation on it.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, I don't know of any way to override the name there. |
||||||
| extra_toolchain_args = { | ||||||
| skia_use_icu = true | ||||||
| skia_use_client_icu = false | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
| group("canvaskit") { | ||||||
| visibility = [ "//flutter/web_sdk:*" ] | ||||||
| public_deps = [ "//third_party/skia/modules/canvaskit(:canvaskit)" ] | ||||||
| } | ||||||
|
|
||||||
| # This toolchain is only to be used by the canvaskit_lite group below. | ||||||
| wasm_toolchain("canvaskit_lite") { | ||||||
| # Prevent accidental use of this toolchain. | ||||||
| assert(target_name == "canvaskit_lite", | ||||||
| "Only :canvaskit_lite can use this toolchain.") | ||||||
| extra_toolchain_args = { | ||||||
| skia_use_icu = false | ||||||
| skia_use_client_icu = true | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
| group("canvaskit_lite") { | ||||||
| visibility = [ "//flutter/web_sdk:*" ] | ||||||
| public_deps = [ "//third_party/skia/modules/canvaskit(:canvaskit_lite)" ] | ||||||
| } | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double check that this won't revert someone else's buildroot roll =)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the reminder! Yes, this needs to change to whatever SHA is produced once the buildroot PR lands.