Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: platform_tools/chromeos/bin/chromeos_setup.sh

Issue 1059443002: Revert of tidy up chromeos_setup.sh (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Set up the environment to build Skia for ChromeOS. 1 # Set up the environment to build Skia for ChromeOS.
2 ###############################################################################
3 # Copyright 2015 Google Inc.
4 #
5 # Use of this source code is governed by a BSD-style license that can be
6 # found in the LICENSE file.
7 ###############################################################################
8 2
9 function exportVar { 3 function exportVar {
10 NAME=$1 4 NAME=$1
11 VALUE=$2 5 VALUE=$2
12 echo export $NAME=\"$VALUE\" 6 echo export $NAME=\"$VALUE\"
13 export $NAME="$VALUE" 7 export $NAME="$VALUE"
14 } 8 }
15 9
16 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 10 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
17 11
18 # Helper function to configure the GYP defines to the appropriate values 12 # Helper function to configure the GYP defines to the appropriate values
19 # based on the target device. 13 # based on the target device.
20 setup_device() { 14 setup_device() {
21 # Setup the build variation depending on the target device 15 # Setup the build variation depending on the target device
22 TARGET_DEVICE="${SDK_BOARD}" 16 TARGET_DEVICE="${SDK_BOARD}"
23 17
24 if [ -z "$TARGET_DEVICE" ]; then 18 if [ -z "$TARGET_DEVICE" ]; then
25 echo "ERROR: No target device specified!" 19 echo "ERROR: No target device specified!"
26 return 1 20 return 1
27 fi 21 fi
28 22
29 DEFINES="OS=linux host_os=linux skia_os=chromeos skia_gpu=0" 23 DEFINES="OS=linux host_os=linux skia_os=chromeos skia_gpu=0"
30 24
31 case $TARGET_DEVICE in 25 case $TARGET_DEVICE in
26 x86-alex)
27 DEFINES="${DEFINES} skia_arch_type=x86 skia_arch_width=32"
28 GENERIC_BOARD_TYPE="x86-generic"
29 ;;
32 link) 30 link)
33 DEFINES="${DEFINES} skia_arch_type=x86_64" 31 DEFINES="${DEFINES} skia_arch_type=x86 skia_arch_width=64"
34 GENERIC_BOARD_TYPE="amd64-generic" 32 GENERIC_BOARD_TYPE="amd64-generic"
35 ;; 33 ;;
36 daisy) 34 daisy)
37 # TODO(mtklein): make this arm_version=7 and arm_neon=1 35 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 armv7=1 arm_thumb=0 sk ia_arch_width=32"
38 DEFINES="${DEFINES} skia_arch_type=arm"
39 # TODO(borenet): We have to define skia_warnings_as_errors=0 for the arm 36 # TODO(borenet): We have to define skia_warnings_as_errors=0 for the arm
40 # build, which throws lots of "mangling of va_list has changed" warnings . 37 # build, which throws lots of "mangling of va_list has changed" warnings .
41 DEFINES="${DEFINES} skia_warnings_as_errors=0" 38 DEFINES="${DEFINES} skia_warnings_as_errors=0"
42 GENERIC_BOARD_TYPE="arm-generic" 39 GENERIC_BOARD_TYPE="arm-generic"
43 ;; 40 ;;
44 *) 41 *)
45 echo -n "ERROR: unknown device specified ($TARGET_DEVICE), valid values: " 42 echo -n "ERROR: unknown device specified ($TARGET_DEVICE), valid values: "
46 echo "x86-alex link daisy" 43 echo "x86-alex link daisy"
47 return 1; 44 return 1;
48 ;; 45 ;;
49 esac 46 esac
50 47
51 echo "The build is targeting the device: $TARGET_DEVICE" 48 echo "The build is targeting the device: $TARGET_DEVICE"
52 49
53 exportVar GENERIC_BOARD_TYPE ${GENERIC_BOARD_TYPE} 50 exportVar GENERIC_BOARD_TYPE ${GENERIC_BOARD_TYPE}
54 exportVar GYP_DEFINES "$DEFINES" 51 exportVar GYP_DEFINES "$DEFINES"
55 exportVar GYP_GENERATORS "ninja" 52 exportVar GYP_GENERATORS "ninja"
56 exportVar GYP_GENERATOR_FLAGS "" 53 exportVar GYP_GENERATOR_FLAGS ""
57 exportVar SKIA_OUT "out/config/chromeos-${TARGET_DEVICE}" 54 exportVar SKIA_OUT "out/config/chromeos-${TARGET_DEVICE}"
58 exportVar builddir_name "." 55 exportVar builddir_name "."
59 } 56 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698