Skip to content

Commit

Permalink
Put the commang line args last in gn_build.sh (#4594)
Browse files Browse the repository at this point in the history
This lets the command line args override the defaults, since the last
assignment wins.
  • Loading branch information
mspang authored Feb 2, 2021
1 parent 1e46379 commit 6b3293e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gn_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,15 @@ echo gn args "$CHIP_ROOT/out/custom"
echo ninja -C "$CHIP_ROOT/out/custom"

extra_args=""
user_args=""

for arg; do
case $arg in
enable_qpg6100_builds=true)
qpg6100_enabled=1
;;
esac
extra_args+=" $arg"
user_args+=" $arg"
done

# Android SDK setup
Expand Down Expand Up @@ -136,8 +137,8 @@ echo

_chip_banner "Build: GN configure"

gn --root="$CHIP_ROOT" gen --check --fail-on-unused-args "$CHIP_ROOT/out/debug" --args='target_os="all"'"$extra_args"
gn --root="$CHIP_ROOT" gen --check --fail-on-unused-args "$CHIP_ROOT/out/release" --args='target_os="all" is_debug=false'"$extra_args"
gn --root="$CHIP_ROOT" gen --check --fail-on-unused-args "$CHIP_ROOT/out/debug" --args='target_os="all"'"$extra_args$user_args"
gn --root="$CHIP_ROOT" gen --check --fail-on-unused-args "$CHIP_ROOT/out/release" --args='target_os="all" is_debug=false'"$extra_arg$user_args"

_chip_banner "Build: Ninja build"

Expand Down

0 comments on commit 6b3293e

Please sign in to comment.