• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1workspace(name = "skia")
2
3load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
4load("//toolchain:build_toolchain.bzl", "build_cpp_toolchain")
5
6# See https://github.com/emscripten-core/emsdk/tree/85d27a4a2a60d591613a305b14ae438c2bb3ce11/bazel#setup-instructions
7http_archive(
8    name = "emsdk",
9    sha256 = "457fa96d4d60867743df7f7e241c9852a3eb7fdbf3091eac7a5712ddc0a5221d",
10    strip_prefix = "emsdk-2.0.32/bazel",
11    url = "https://github.com/emscripten-core/emsdk/archive/refs/tags/2.0.32.tar.gz",
12)
13
14load("@emsdk//:deps.bzl", emsdk_deps = "deps")
15
16emsdk_deps()
17
18load("@emsdk//:emscripten_deps.bzl", emsdk_emscripten_deps = "emscripten_deps")
19
20emsdk_emscripten_deps(emscripten_version = "2.0.32")
21
22build_cpp_toolchain(
23    # Meant to run on amd64 linux and compile for amd64 linux using musl as the c library.
24    name = "clang_linux_amd64_musl",
25    # From https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/clang+llvm-13.0.0-x86_64-linux-gnu-ubuntu-20.04.tar.xz.sha256
26    clang_prefix = "clang+llvm-13.0.0-x86_64-linux-gnu-ubuntu-20.04/",
27    clang_sha256 = "2c2fb857af97f41a5032e9ecadf7f78d3eff389a5cd3c9ec620d24f134ceb3c8",
28    clang_url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/clang+llvm-13.0.0-x86_64-linux-gnu-ubuntu-20.04.tar.xz",
29    # From https://packages.debian.org/bullseye/amd64/musl-dev/download
30    musl_dev_sha256 = "b017792ad6ba3650b4889238c73cd19c1d6b0e39ca8319cdd3ad9e16374e614e",
31    musl_dev_url = "http://ftp.debian.org/debian/pool/main/m/musl/musl-dev_1.2.2-1_amd64.deb",
32)
33
34http_archive(
35    name = "bazel_skylib",
36    sha256 = "c6966ec828da198c5d9adbaa94c05e3a1c7f21bd012a0b29ba8ddbccb2c93b0d",
37    urls = [
38        "https://github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
39        "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
40    ],
41)
42
43load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
44
45bazel_skylib_workspace()
46