blob: 6879c95dfb1f5b94f6f1adacc2708e1951e68307 [file] [log] [blame]
Kevin Lubick8e9750d2018-10-09 09:36:35 -04001#!/bin/bash
2# Copyright 2018 Google LLC
3#
4# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
6
Kevin Lubickfa5a1382019-10-09 10:46:14 -04007# This assumes it is being run inside a docker container of emsdk-base
Kevin Lubick8e9750d2018-10-09 09:36:35 -04008# and a Skia checkout has been mounted at /SRC and the output directory
9# is mounted at /OUT
10
11# For example:
Kevin Lubickd1285b12020-05-21 09:59:44 -040012# docker run -v $SKIA_ROOT:/SRC -v $SKIA_ROOT/out/canvaskit:/OUT gcr.io/skia-public/emsdk-base:1.39.16_v1 /SRC/infra/canvaskit/build_canvaskit.sh
Kevin Lubick8e9750d2018-10-09 09:36:35 -040013
14set +e
15set -x
16# Clean out previous builds (ignoring any errors for things like folders)
17# (e.g. we don't want to delete /OUT/depot_tools/)
18rm -f /OUT/*
19set -e
20
21#BASE_DIR is the dir this script is in ($SKIA_ROOT/infra/canvaskit)
22BASE_DIR=`cd $(dirname ${BASH_SOURCE[0]}) && pwd`
Kevin Lubick3f67f412019-03-11 16:11:58 -040023CANVASKIT_DIR=$BASE_DIR/../../modules/canvaskit
Kevin Lubick8e9750d2018-10-09 09:36:35 -040024
25BUILD_DIR=/OUT $CANVASKIT_DIR/compile.sh $@
Kevin Lubicke70c6b12018-11-06 07:49:40 -050026