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

Side by Side Diff: platform_tools/nacl/nacl_make

Issue 914413003: set skia_arch_type in nacl_make (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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 #!/bin/bash 1 #!/bin/bash
2 2
3 function exportVar { 3 function exportVar {
4 NAME=$1 4 NAME=$1
5 VALUE=$2 5 VALUE=$2
6 echo export $NAME=\"$VALUE\" 6 echo export $NAME=\"$VALUE\"
7 export $NAME="$VALUE" 7 export $NAME="$VALUE"
8 } 8 }
9 9
10 function setenv { 10 function setenv {
11 if [ -z "$1" ]; then 11 if [ -z "$1" ]; then
12 echo "ERROR: setenv() requires one argument." 12 echo "ERROR: setenv() requires one argument."
13 exit 1 13 exit 1
14 fi 14 fi
15 if [ -z "${NACL_SDK_ROOT}" ]; then 15 if [ -z "${NACL_SDK_ROOT}" ]; then
16 echo "ERROR: This script requires NACL_SDK_ROOT to be set." 16 echo "ERROR: This script requires NACL_SDK_ROOT to be set."
17 exit 1 17 exit 1
18 fi 18 fi
19 19
20 ARCH_WIDTH=$1 20 ARCH_WIDTH=$1
21 if [ ${ARCH_WIDTH} = "32" ]; then 21 if [ ${ARCH_WIDTH} = "32" ]; then
22 ARCH_TYPE=x86
22 CROSS_ID=i686 23 CROSS_ID=i686
23 elif [ ${ARCH_WIDTH} = "64" ]; then 24 elif [ ${ARCH_WIDTH} = "64" ]; then
25 ARCH_TYPE=x86_64
24 CROSS_ID=x86_64 26 CROSS_ID=x86_64
25 else 27 else
26 echo "ERROR: Unknown arch width: ${ARCH_WIDTH}" 28 echo "ERROR: Unknown arch width: ${ARCH_WIDTH}"
27 exit 1 29 exit 1
28 fi 30 fi
29 31
30 OS_NAME=$(uname -s) 32 OS_NAME=$(uname -s)
31 if [ $OS_NAME = "Darwin" ]; then 33 if [ $OS_NAME = "Darwin" ]; then
32 OS_SUBDIR="mac" 34 OS_SUBDIR="mac"
33 OS_SUBDIR_SHORT="mac" 35 OS_SUBDIR_SHORT="mac"
(...skipping 25 matching lines...) Expand all
59 exportVar NACLSTRINGS ${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-strings 61 exportVar NACLSTRINGS ${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-strings
60 exportVar NACLSTRIP ${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-strip 62 exportVar NACLSTRIP ${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-strip
61 63
62 exportVar CC "${NACLCC}" 64 exportVar CC "${NACLCC}"
63 exportVar CXX "${NACLCXX}" 65 exportVar CXX "${NACLCXX}"
64 exportVar AR "${NACLAR}" 66 exportVar AR "${NACLAR}"
65 exportVar RANLIB "${NACLRANLIB}" 67 exportVar RANLIB "${NACLRANLIB}"
66 exportVar PATH ${NACL_BIN_PATH}:${PATH}; 68 exportVar PATH ${NACL_BIN_PATH}:${PATH};
67 exportVar C_INCLUDE_PATH "${NACL_SDK_ROOT}/include:${NACL_SDK_ROOT}/ports/incl ude:${C_INCLUDE_PATH}" 69 exportVar C_INCLUDE_PATH "${NACL_SDK_ROOT}/include:${NACL_SDK_ROOT}/ports/incl ude:${C_INCLUDE_PATH}"
68 exportVar CPLUS_INCLUDE_PATH "${NACL_SDK_ROOT}/include:${NACL_SDK_ROOT}/ports/ include:${CPLUS_INCLUDE_PATH}" 70 exportVar CPLUS_INCLUDE_PATH "${NACL_SDK_ROOT}/include:${NACL_SDK_ROOT}/ports/ include:${CPLUS_INCLUDE_PATH}"
69 exportVar GYP_DEFINES "skia_os=nacl skia_gpu=0 skia_arch_width=${ARCH_WIDTH}" 71 exportVar GYP_DEFINES \
72 "skia_os=nacl skia_gpu=0 skia_arch_width=${ARCH_WIDTH} skia_arch_type=${AR CH_TYPE}"
70 } 73 }
71 74
72 function build { 75 function build {
73 if [ -z "$1" ]; then 76 if [ -z "$1" ]; then
74 echo "ERROR: build() requires one argument." 77 echo "ERROR: build() requires one argument."
75 exit 1 78 exit 1
76 fi 79 fi
77 setenv $1 80 setenv $1
78 81
79 export SKIA_OUT=out/nacl$1 82 export SKIA_OUT=out/nacl$1
(...skipping 22 matching lines...) Expand all
102 if [[ "$?" != "0" ]]; then 105 if [[ "$?" != "0" ]]; then
103 echo "Unable to find ccache!" 106 echo "Unable to find ccache!"
104 exit 1 107 exit 1
105 fi 108 fi
106 fi 109 fi
107 110
108 build 32 && \ 111 build 32 && \
109 build 64 && \ 112 build 64 && \
110 if ! [ -L platform_tools/nacl/out ]; then 113 if ! [ -L platform_tools/nacl/out ]; then
111 ln -s ../../out platform_tools/nacl 114 ln -s ../../out platform_tools/nacl
112 fi 115 fi
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