You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cd into the project root (<git dir>/other-builds/ndkbuild/hello-jni)
run the following command, which sets a custom macro fooyoo=a + b. /usr/local/google/home/tgeng/Android/Sdk/ndk/21.2.6472646/ndk-build NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=`pwd`/app/Android.mk APP_ABI=x86 NDK_ALL_ABIS=x86 NDK_DEBUG=1 APP_PLATFORM=android-16 NDK_OUT=/tmp/junk-123 NDK_LIBS_OUT=/tmp/junk-123 'APP_CFLAGS+=-Dfooyoo="a + b"' APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B compile_commands.json
open the generated compile_commands.json and it contains -Dfooyoo=a + b, which won't work since a + b is not quoted.
The text was updated successfully, but these errors were encountered:
Not certain there's much we can do about this given the difficulty of generating JSON from make, but I want to at least have a look for r22. Could be something simple.
Modifies dump_compile_commands.py to have it add shell escapes to
command line arguments where needed. Currently this does not support
APP_SHORT_COMMANDS set to true. That will be done in a separate change.
Bug: android/ndk#1334
Change-Id: Ieb8d421b938c58510eaadc37c7a83cc6a070908d
osspop
pushed a commit
to osspop/android-ndk
that referenced
this issue
Jan 17, 2023
Any project using NDK would do. Take the ndk-build hello-jni as an example.
Repro instruction:
<git dir>/other-builds/ndkbuild/hello-jni
)fooyoo=a + b
./usr/local/google/home/tgeng/Android/Sdk/ndk/21.2.6472646/ndk-build NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=`pwd`/app/Android.mk APP_ABI=x86 NDK_ALL_ABIS=x86 NDK_DEBUG=1 APP_PLATFORM=android-16 NDK_OUT=/tmp/junk-123 NDK_LIBS_OUT=/tmp/junk-123 'APP_CFLAGS+=-Dfooyoo="a + b"' APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B compile_commands.json
-Dfooyoo=a + b
, which won't work sincea + b
is not quoted.The text was updated successfully, but these errors were encountered: