2018-10-09 13:36:35 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# Copyright 2018 Google LLC
|
|
|
|
#
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
2019-10-09 14:46:14 +00:00
|
|
|
# This assumes it is being run inside a docker container of emsdk-base
|
2018-10-09 13:36:35 +00:00
|
|
|
# and a Skia checkout has been mounted at /SRC and the output directory
|
|
|
|
# is mounted at /OUT
|
|
|
|
|
|
|
|
set +e
|
|
|
|
set -x
|
|
|
|
# Clean out previous builds (ignoring any errors for things like folders)
|
|
|
|
# (e.g. we don't want to delete /OUT/depot_tools/)
|
|
|
|
rm -f /OUT/*
|
2021-06-24 18:32:41 +00:00
|
|
|
# We want to clean out previously generated code and object files to avoid
|
|
|
|
# previous builds contaminating this one.
|
|
|
|
rm -rf /OUT/gen
|
|
|
|
rm -rf /OUT/obj
|
2018-10-09 13:36:35 +00:00
|
|
|
set -e
|
|
|
|
|
|
|
|
#BASE_DIR is the dir this script is in ($SKIA_ROOT/infra/canvaskit)
|
|
|
|
BASE_DIR=`cd $(dirname ${BASH_SOURCE[0]}) && pwd`
|
2019-03-11 20:11:58 +00:00
|
|
|
CANVASKIT_DIR=$BASE_DIR/../../modules/canvaskit
|
2018-10-09 13:36:35 +00:00
|
|
|
|
|
|
|
BUILD_DIR=/OUT $CANVASKIT_DIR/compile.sh $@
|
2018-11-06 12:49:40 +00:00
|
|
|
|
2021-08-05 12:03:48 +00:00
|
|
|
chmod -R 0777 /OUT/*
|