Closed
Description
- NDK Version: 21.2.6472646
- Build system: ndk-build
- Host OS: gLinux
Any project using NDK would do. Take the ndk-build hello-jni as an example.
Repro instruction:
- download https://github.com/android/ndk-samples/tree/master/other-builds/ndkbuild/hello-jni
- 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 sincea + b
is not quoted.