skia2/platform_tools/chromeos/bin/chromeos_setup.sh
mtklein cb49c07b73 tidy up chromeos_setup.sh
- remove unused alex
- streamline Link's config
- remove misleading Daisy config:
  1) armv7=1 does nothing.  We meant to type arm_version=7 here.
  2) arm_neon=1 does nothing unless arm_version == 7.
  3) arm_thumb=0 is the default when arm_version <= 7.
  4) skia_arch_width=32 is the default when skia_arch_type=arm.

I'd just fix this to make Daisy arm_version=7 and arm_neon=1 (and
arm_thumb=1, which I'm going to separately make the default for
arm_version=7), but there are known color-order bugs with our
NEON procs that would make Daisy start pushing bad images to
Gold.  Going to take baby steps here...

BUG=skia:1843

Committed: https://skia.googlesource.com/skia/+/3c2809bc612f4a265770914f860d214c9665dc4a

CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-Arm7-Debug-CrOS_Daisy-Trybot

Review URL: https://codereview.chromium.org/1051253002
2015-04-02 09:27:57 -07:00

60 lines
1.9 KiB
Bash
Executable File

# Set up the environment to build Skia for ChromeOS.
###############################################################################
# Copyright 2015 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
###############################################################################
function exportVar {
NAME=$1
VALUE=$2
echo export $NAME=\"$VALUE\"
export $NAME="$VALUE"
}
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Helper function to configure the GYP defines to the appropriate values
# based on the target device.
setup_device() {
# Setup the build variation depending on the target device
TARGET_DEVICE="${SDK_BOARD}"
if [ -z "$TARGET_DEVICE" ]; then
echo "ERROR: No target device specified!"
return 1
fi
DEFINES="OS=linux host_os=linux skia_os=chromeos skia_gpu=0"
case $TARGET_DEVICE in
link)
DEFINES="${DEFINES} skia_arch_type=x86_64"
GENERIC_BOARD_TYPE="amd64-generic"
;;
daisy)
# TODO(mtklein): make this arm_version=7 and arm_neon=1
DEFINES="${DEFINES} skia_arch_type=arm arm_thumb=0"
# TODO(borenet): We have to define skia_warnings_as_errors=0 for the arm
# build, which throws lots of "mangling of va_list has changed" warnings.
DEFINES="${DEFINES} skia_warnings_as_errors=0"
GENERIC_BOARD_TYPE="arm-generic"
;;
*)
echo -n "ERROR: unknown device specified ($TARGET_DEVICE), valid values: "
echo "x86-alex link daisy"
return 1;
;;
esac
echo "The build is targeting the device: $TARGET_DEVICE"
exportVar GENERIC_BOARD_TYPE ${GENERIC_BOARD_TYPE}
exportVar GYP_DEFINES "$DEFINES"
exportVar GYP_GENERATORS "ninja"
exportVar GYP_GENERATOR_FLAGS ""
exportVar SKIA_OUT "out/config/chromeos-${TARGET_DEVICE}"
exportVar builddir_name "."
}