[bazel] Update to use emsdk 3.1.4

PS1 regenerates the BUILD.bazel files

This allows us to use closure to minify the JS in canvaskit.js

Change-Id: Ib8326d2e3a19cd2168b740b6946f9165a2810133
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/509177
Reviewed-by: Ben Wagner <bungeman@google.com>
This commit is contained in:
Kevin Lubick 2022-02-15 11:24:34 -05:00
parent ee910053ec
commit 7f568e968e
13 changed files with 95 additions and 26 deletions

View File

@ -6,11 +6,11 @@ load("//toolchain:build_toolchain.bzl", "build_cpp_toolchain")
# See https://github.com/emscripten-core/emsdk/tree/85d27a4a2a60d591613a305b14ae438c2bb3ce11/bazel#setup-instructions
http_archive(
name = "emsdk",
sha256 = "a2c5f3cf36525cf6a4b569f9d25500e3b2f7341c6e6779b54bcf4703b834202d",
strip_prefix = "emsdk-3.1.0/bazel",
sha256 = "7dc13d967705582e11ff62ae143425dbc63c38372f1a1b14f0cb681fda413714",
strip_prefix = "emsdk-3.1.4/bazel",
urls = [
"https://github.com/emscripten-core/emsdk/archive/refs/tags/3.1.0.tar.gz",
"https://storage.googleapis.com/skia-world-readable/bazel/a2c5f3cf36525cf6a4b569f9d25500e3b2f7341c6e6779b54bcf4703b834202d.tar.gz",
"https://github.com/emscripten-core/emsdk/archive/refs/tags/3.1.4.tar.gz",
"https://storage.googleapis.com/skia-world-readable/bazel/7dc13d967705582e11ff62ae143425dbc63c38372f1a1b14f0cb681fda413714.tar.gz",
],
)
@ -20,7 +20,7 @@ emsdk_deps()
load("@emsdk//:emscripten_deps.bzl", emsdk_emscripten_deps = "emscripten_deps")
emsdk_emscripten_deps(emscripten_version = "3.1.0")
emsdk_emscripten_deps(emscripten_version = "3.1.4")
build_cpp_toolchain(
# Meant to run on amd64 linux and compile for amd64 linux.

View File

@ -44,7 +44,7 @@ func main() {
if (*url != "" && *sha256Hash == "") || (*url == "" && *sha256Hash != "") {
flag.Usage()
fatalf("Must set both of or non of --url and --sha256")
} else if !*jsonFromStdin {
} else if *url == "" && *sha256Hash == "" && !*jsonFromStdin {
fatalf("Must specify --url and --sha256 or --json")
}

View File

@ -288,6 +288,7 @@ generated_cc_atom(
"//experimental/graphite/include:Recorder_hdr",
"//experimental/graphite/src/geom:BoundsManager_hdr",
"//experimental/graphite/src/geom:Shape_hdr",
"//include/core:SkPixmap_hdr",
"//include/private:SkColorData_hdr",
],
)
@ -805,7 +806,10 @@ generated_cc_atom(
name = "Resource_hdr",
hdrs = ["Resource.h"],
visibility = ["//:__subpackages__"],
deps = ["//include/core:SkTypes_hdr"],
deps = [
":ResourceTypes_hdr",
"//include/core:SkTypes_hdr",
],
)
generated_cc_atom(
@ -916,6 +920,7 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":Task_hdr",
"//include/core:SkImageInfo_hdr",
"//include/core:SkRect_hdr",
"//include/core:SkRefCnt_hdr",
],
@ -927,10 +932,15 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":Buffer_hdr",
":Caps_hdr",
":CommandBuffer_hdr",
":Log_hdr",
":RecorderPriv_hdr",
":ResourceProvider_hdr",
":TextureProxy_hdr",
":Texture_hdr",
":UploadTask_hdr",
"//experimental/graphite/include:Recorder_hdr",
"//src/core:SkConvertPixels_hdr",
],
)

View File

@ -4838,6 +4838,8 @@ generated_cc_atom(
"//include/core:SkCanvas_hdr",
"//include/core:SkImage_hdr",
"//include/core:SkPaint_hdr",
"//include/effects:SkGradientShader_hdr",
"//tools:Resources_hdr",
],
)
@ -7015,6 +7017,7 @@ generated_cc_atom(
"//include/core:SkShader_hdr",
"//include/core:SkSize_hdr",
"//include/core:SkString_hdr",
"//include/core:SkTextBlob_hdr",
"//include/core:SkTileMode_hdr",
"//include/core:SkTypes_hdr",
"//tools:ToolUtils_hdr",
@ -9551,20 +9554,6 @@ generated_cc_atom(
],
)
generated_cc_atom(
name = "xform_src",
srcs = ["xform.cpp"],
visibility = ["//:__subpackages__"],
deps = [
":gm_hdr",
"//experimental/xform:SkShape_hdr",
"//experimental/xform:SkXform_hdr",
"//include/core:SkCanvas_hdr",
"//include/core:SkPaint_hdr",
"//tools/timer:TimeUtils_hdr",
],
)
generated_cc_atom(
name = "ycbcrimage_src",
srcs = ["ycbcrimage.cpp"],

View File

@ -23,10 +23,6 @@ BASE_LINKOPTS = [
]
RELEASE_OPTS = [
# Closure disabled until https://github.com/emscripten-core/emsdk/pull/941 is sorted out.
#"--closure 1", # Run the closure compiler
# pass the externs file in
#"--closure-args=--externs=modules/canvaskit/externs.js",
"-sASSERTIONS=0", # Turn off assertions
"-Oz",
]
@ -151,6 +147,12 @@ CK_DEFINES = [
":enable_sksl_tracing_false": [],
})
CK_RELEASE_OPTS = [
"--closure 1", # Run the closure compiler
# pass the externs file in
"--closure-args=--externs=$(location externs.js)",
]
CK_OPTS = BASE_LINKOPTS + [
"-sEXPORT_NAME=CanvasKitInit",
"-sINITIAL_MEMORY=128MB",
@ -256,7 +258,7 @@ CK_OPTS = BASE_LINKOPTS + [
"--pre-js",
"modules/canvaskit/debug.js",
],
"//conditions:default": RELEASE_OPTS + [
"//conditions:default": RELEASE_OPTS + CK_RELEASE_OPTS + [
"--pre-js",
"modules/canvaskit/release.js",
],

View File

@ -1464,6 +1464,8 @@ generated_cc_atom(
hdrs = ["SkDescriptor.h"],
visibility = ["//:__subpackages__"],
deps = [
":SkBuffer_hdr",
":SkFontPriv_hdr",
":SkScalerContext_hdr",
"//include/private:SkMacros_hdr",
"//include/private:SkNoncopyable_hdr",
@ -1477,8 +1479,12 @@ generated_cc_atom(
deps = [
":SkDescriptor_hdr",
":SkOpts_hdr",
":SkReadBuffer_hdr",
":SkWriteBuffer_hdr",
"//include/core:SkTypes_hdr",
"//include/private:SkTo_hdr",
"//include/private/chromium:SkChromeRemoteGlyphCache_hdr",
"//src/gpu:GrResourceProvider_hdr",
],
)
@ -5491,6 +5497,7 @@ generated_cc_atom(
":SkDraw_hdr",
":SkEnumerate_hdr",
":SkGlyphRun_hdr",
":SkReadBuffer_hdr",
":SkScalerCache_hdr",
":SkStrikeCache_hdr",
":SkStrikeForGPU_hdr",

View File

@ -191,6 +191,7 @@ cc_library(
"//src/gpu/tessellate/shaders:GrTessellationShader_src",
"//src/gpu/text:GrAtlasManager_src",
"//src/gpu/text:GrDistanceFieldAdjustTable_src",
"//src/gpu/text:GrGlyphVector_src",
"//src/gpu/text:GrSDFMaskFilter_src",
"//src/gpu/text:GrSDFTControl_src",
"//src/gpu/text:GrSlug_src",

View File

@ -160,6 +160,7 @@ generated_cc_atom(
visibility = ["//:__subpackages__"],
deps = [
":GrAtlasManager_hdr",
":GrGlyphVector_hdr",
":GrStrikeCache_hdr",
":GrTextBlob_hdr",
"//include/core:SkColorFilter_hdr",
@ -211,3 +212,32 @@ generated_cc_atom(
"//src/gpu/v1:SurfaceDrawContext_v1_hdr",
],
)
generated_cc_atom(
name = "GrGlyphVector_hdr",
hdrs = ["GrGlyphVector.h"],
visibility = ["//:__subpackages__"],
deps = [
":GrStrikeCache_hdr",
"//include/core:SkSpan_hdr",
"//src/core:SkGlyphBuffer_hdr",
"//src/core:SkGlyph_hdr",
"//src/gpu:GrGlyph_hdr",
"//src/gpu:GrMeshDrawTarget_hdr",
"//src/gpu:GrSubRunAllocator_hdr",
],
)
generated_cc_atom(
name = "GrGlyphVector_src",
srcs = ["GrGlyphVector.cpp"],
visibility = ["//:__subpackages__"],
deps = [
":GrAtlasManager_hdr",
":GrGlyphVector_hdr",
"//src/core:SkReadBuffer_hdr",
"//src/core:SkStrikeCache_hdr",
"//src/core:SkStrikeSpec_hdr",
"//src/core:SkWriteBuffer_hdr",
],
)

View File

@ -284,7 +284,9 @@ generated_cc_atom(
"//include/core:SkBitmap_hdr",
"//include/core:SkCanvas_hdr",
"//include/core:SkColor_hdr",
"//include/core:SkDrawable_hdr",
"//include/core:SkPath_hdr",
"//include/core:SkPictureRecorder_hdr",
"//include/effects:SkGradientShader_hdr",
"//include/private:SkColorData_hdr",
"//include/private:SkTo_hdr",
@ -303,6 +305,7 @@ generated_cc_atom(
"//include/core:SkBitmap_hdr",
"//include/core:SkCanvas_hdr",
"//include/core:SkData_hdr",
"//include/core:SkDrawable_hdr",
"//include/core:SkFontMetrics_hdr",
"//include/core:SkPath_hdr",
"//include/core:SkStream_hdr",
@ -1054,6 +1057,7 @@ generated_cc_atom(
":SkTypeface_win_dw_hdr",
"//include/codec:SkCodec_hdr",
"//include/core:SkBitmap_hdr",
"//include/core:SkDrawable_hdr",
"//include/core:SkFontMetrics_hdr",
"//include/core:SkPath_hdr",
"//include/core:SkTypes_hdr",

View File

@ -272,6 +272,7 @@ generated_cc_atom(
"//include/private:SkImageInfoPriv_hdr",
"//src/core:SkArenaAlloc_hdr",
"//src/core:SkImagePriv_hdr",
"//src/core:SkMatrixPriv_hdr",
"//src/core:SkMatrixProvider_hdr",
"//src/core:SkMatrixUtils_hdr",
"//src/core:SkPicturePriv_hdr",

View File

@ -1631,8 +1631,13 @@ generated_cc_atom(
deps = [
":Test_hdr",
"//include/core:SkTypes_hdr",
"//include/private/chromium:SkChromeRemoteGlyphCache_hdr",
"//src/core:SkDescriptor_hdr",
"//src/core:SkFontPriv_hdr",
"//src/core:SkReadBuffer_hdr",
"//src/core:SkScalerContext_hdr",
"//src/core:SkWriteBuffer_hdr",
"//src/gpu:GrResourceProvider_hdr",
],
)
@ -7008,3 +7013,21 @@ generated_cc_atom(
"//tools:ToolUtils_hdr",
],
)
generated_cc_atom(
name = "GrGlyphVectorTest_src",
srcs = ["GrGlyphVectorTest.cpp"],
visibility = ["//:__subpackages__"],
deps = [
":Test_hdr",
"//src/core:SkGlyphBuffer_hdr",
"//src/core:SkGlyph_hdr",
"//src/core:SkReadBuffer_hdr",
"//src/core:SkStrikeCache_hdr",
"//src/core:SkStrikeSpec_hdr",
"//src/core:SkWriteBuffer_hdr",
"//src/gpu:GrResourceProvider_hdr",
"//src/gpu:GrSubRunAllocator_hdr",
"//src/gpu/text:GrGlyphVector_hdr",
],
)

View File

@ -30,6 +30,7 @@ generated_cc_atom(
":RandomScalerContext_hdr",
"//include/core:SkBitmap_hdr",
"//include/core:SkCanvas_hdr",
"//include/core:SkDrawable_hdr",
"//include/core:SkPath_hdr",
"//src/core:SkAdvancedTypefaceMetrics_hdr",
"//src/core:SkGlyph_hdr",

View File

@ -455,6 +455,7 @@ generated_cc_atom(
"//misc/cpp:imgui_stdlib_hdr",
"//src/core:SkAutoPixmapStorage_hdr",
"//src/core:SkColorSpacePriv_hdr",
"//src/core:SkGlyphRun_hdr",
"//src/core:SkImagePriv_hdr",
"//src/core:SkMD5_hdr",
"//src/core:SkOSFile_hdr",