Skip to content

Commit

Permalink
Fix nRF5 lock app build instructions (project-chip#1572)
Browse files Browse the repository at this point in the history
After 52b6f03 ("[gn] Vscode integration. Fixes project-chip#1526. (project-chip#1527)")
the args are missing due to being set later in the script. Rearrange
so the correct comment is printed.
  • Loading branch information
mspang authored and kedars committed Jul 21, 2020
1 parent 8a4e6b4 commit 783dcfe
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions gn_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ echo 'To build a custom build (for help run "gn args --list out/debug")'
echo gn args "$CHIP_ROOT/out/custom"
echo ninja -C "$CHIP_ROOT/out/custom"

nrf5_sdk_args=""
extra_args=""

if [[ -d "$NRF5_SDK_ROOT/components/libraries" ]]; then
nrf5_sdk_args+="nrf5_sdk_root=\"$NRF5_SDK_ROOT\""
extra_args+=" $nrf5_sdk_args enable_nrf5_builds=true"
fi

echo
if [[ ! -d "$NRF5_SDK_ROOT/components/libraries" ]]; then
echo "Hint: Set \$NRF5_SDK_ROOT to enable building for nRF5"
Expand All @@ -80,14 +88,6 @@ echo

_chip_banner "Build: GN configure"

nrf5_sdk_args=""
extra_args=""

if [[ -d "$NRF5_SDK_ROOT/components/libraries" ]]; then
nrf5_sdk_args+="nrf5_sdk_root=\"$NRF5_SDK_ROOT\""
extra_args+=" $nrf5_sdk_args enable_nrf5_builds=true"
fi

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

Expand Down

0 comments on commit 783dcfe

Please sign in to comment.