1cb93a386Sopenharmony_ci#!/bin/bash 2cb93a386Sopenharmony_ci# Copyright 2018 Google LLC 3cb93a386Sopenharmony_ci# 4cb93a386Sopenharmony_ci# Use of this source code is governed by a BSD-style license that can be 5cb93a386Sopenharmony_ci# found in the LICENSE file. 6cb93a386Sopenharmony_ci 7cb93a386Sopenharmony_ci# This assumes it is being run inside a docker container of emsdk-base 8cb93a386Sopenharmony_ci# and a Skia checkout has been mounted at /SRC and the output directory 9cb93a386Sopenharmony_ci# is mounted at /OUT 10cb93a386Sopenharmony_ci 11cb93a386Sopenharmony_ciset +e 12cb93a386Sopenharmony_ciset -x 13cb93a386Sopenharmony_ci# Clean out previous builds (ignoring any errors for things like folders) 14cb93a386Sopenharmony_ci# (e.g. we don't want to delete /OUT/depot_tools/) 15cb93a386Sopenharmony_cirm -f /OUT/* 16cb93a386Sopenharmony_ci# We want to clean out previously generated code and object files to avoid 17cb93a386Sopenharmony_ci# previous builds contaminating this one. 18cb93a386Sopenharmony_cirm -rf /OUT/gen 19cb93a386Sopenharmony_cirm -rf /OUT/obj 20cb93a386Sopenharmony_ciset -e 21cb93a386Sopenharmony_ci 22cb93a386Sopenharmony_ci#BASE_DIR is the dir this script is in ($SKIA_ROOT/infra/canvaskit) 23cb93a386Sopenharmony_ciBASE_DIR=`cd $(dirname ${BASH_SOURCE[0]}) && pwd` 24cb93a386Sopenharmony_ciCANVASKIT_DIR=$BASE_DIR/../../modules/canvaskit 25cb93a386Sopenharmony_ci 26cb93a386Sopenharmony_ciBUILD_DIR=/OUT $CANVASKIT_DIR/compile.sh $@ 27cb93a386Sopenharmony_ci 28cb93a386Sopenharmony_cichmod -R 0777 /OUT/* 29