Skip to content

Instantly share code, notes, and snippets.

@fischman
Created Apr 10, 2012
Embed
What would you like to do?
goma/ninja/clang setup
#!/bin/bash
export PATH="/home/fischman/src/goma:$PATH"
# AMI: per http://go/g-d/msg/goma-users/iqAEq3IBLk8/K0gOhNxLxVoJ
if [ -n "$GOMA_IMPLICIT_INPUT_FILES" ]; then
GOMA_IMPLICIT_INPUT_FILES="$GOMA_IMPLICIT_INPUT_FILES,"
fi
export GOMA_IMPLICIT_INPUT_FILES="${GOMA_IMPLICIT_INPUT_FILES}$(dirname $(realpath $0))/src/build/common.gypi"
exec $(dirname $0)/ninja -j5000 "$@"
#!/bin/bash -e
OUTPUT_DIR="$(echo $GYP_GENERATOR_FLAGS |sed -n -e 's/.*output_dir=\([^ ]*\).*/\1/p')" #
FLAVOR="$OUTPUT_DIR/$(echo $GYP_GENERATOR_FLAGS |sed -n -e 's/.*config=\([^ ]*\).*/\1/p')" #
if [ ! -d $FLAVOR ]; then mkdir -p $FLAVOR; fi
NINJA_BINARY=~/src/fninja/ninja
#NINJA_BINARY=ninja
if [ ! -e $NINJA_BINARY ]; then
# For CrOS chroot, for now.
NINJA_BINARY=ninja
fi
$NINJA_BINARY -C $FLAVOR -j20 "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment