mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 22:51:03 +02:00
Adding [no]runhooks, [no]chrome, and [no]official options.
BUG=none TEST=none Review URL: http://codereview.chromium.org/600027
This commit is contained in:
parent
5d0248feb8
commit
118fb81d3a
@ -24,11 +24,17 @@ NUM_JOBS=`grep -c "^processor" /proc/cpuinfo`
|
|||||||
|
|
||||||
# Flags
|
# Flags
|
||||||
DEFINE_string chrome_dir "$DEFAULT_CHROME_DIR" \
|
DEFINE_string chrome_dir "$DEFAULT_CHROME_DIR" \
|
||||||
"Directory to Chrome source"
|
"Directory to Chrome/Chromium source"
|
||||||
DEFINE_string mode "Release" \
|
DEFINE_string mode "Release" \
|
||||||
"The mode to build Chrome in (Debug or Release)"
|
"The mode to build Chrome/Chromium in (Debug or Release)"
|
||||||
DEFINE_string num_jobs "$NUM_JOBS" \
|
DEFINE_string num_jobs "$NUM_JOBS" \
|
||||||
"The number of jobs to run in parallel"
|
"The number of jobs to run in parallel"
|
||||||
|
DEFINE_boolean runhooks true \
|
||||||
|
"Execute gclient runhooks before build (if norunhooks then chrome and official are ignored)"
|
||||||
|
DEFINE_boolean chrome false \
|
||||||
|
"Builds a chrome branded version (requires src-internal)"
|
||||||
|
DEFINE_boolean official false \
|
||||||
|
"Builds an official version (additional optimizations)"
|
||||||
|
|
||||||
# Parse command line
|
# Parse command line
|
||||||
FLAGS "$@" || exit 1
|
FLAGS "$@" || exit 1
|
||||||
@ -45,9 +51,25 @@ FLAGS_chrome_dir=`eval readlink -f $FLAGS_chrome_dir`
|
|||||||
echo Building Chrome in mode $FLAGS_mode
|
echo Building Chrome in mode $FLAGS_mode
|
||||||
export GYP_GENERATORS="make"
|
export GYP_GENERATORS="make"
|
||||||
export GYP_DEFINES="target_arch=ia32 chromeos=1"
|
export GYP_DEFINES="target_arch=ia32 chromeos=1"
|
||||||
|
|
||||||
|
if [ $FLAGS_chrome -eq $FLAGS_TRUE ]
|
||||||
|
then
|
||||||
|
export GYP_DEFINES="${GYP_DEFINES} branding=Chrome ffmpeg_branding=Chrome"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $FLAGS_official -eq $FLAGS_TRUE ]
|
||||||
|
then
|
||||||
|
export GYP_DEFINES="${GYP_DEFINES} buildtype=Official"
|
||||||
|
fi
|
||||||
|
|
||||||
CHROME_DIR=$FLAGS_chrome_dir
|
CHROME_DIR=$FLAGS_chrome_dir
|
||||||
cd "$CHROME_DIR/src"
|
cd "$CHROME_DIR/src"
|
||||||
|
|
||||||
|
if [ $FLAGS_runhooks -eq $FLAGS_TRUE ]
|
||||||
|
then
|
||||||
gclient runhooks --force
|
gclient runhooks --force
|
||||||
|
fi
|
||||||
|
|
||||||
make BUILDTYPE=$FLAGS_mode -j$FLAGS_num_jobs -r chrome candidate_window
|
make BUILDTYPE=$FLAGS_mode -j$FLAGS_num_jobs -r chrome candidate_window
|
||||||
|
|
||||||
# Zip into chrome-chromeos.zip and put in local_assets
|
# Zip into chrome-chromeos.zip and put in local_assets
|
||||||
|
Loading…
x
Reference in New Issue
Block a user