build.gradle中ldFlags(' -c')的含义是什么?

时间:2016-08-24 16:04:55

标签: android-studio build.gradle ldflags

请帮助我了解Android Studio中build.gradle中的ldFlags(' -c')是什么意思?

参考示例:https://github.com/googlesamples/android-ndk/blob/a498a7809cb7c9ec576b95e797edc4e64777ea00/MoreTeapots/nativeactivity/build.gradle

1 个答案:

答案 0 :(得分:0)

当你运行clang llvm编译器的帮助时:“clang ++”就像这样:

clang++ -help,您会看到可以传递的参数:

OVERVIEW: clang LLVM compiler

USAGE: clang++ [options] <inputs>

OPTIONS:
  -###                    Print (but do not run) the commands to run 
for this compilation
  --analyze               Run the static analyzer
  -arcmt-migrate-emit-errors
                          Emit ARC errors even if the migrator can     fix them
  -arcmt-migrate-report-output <value>
                          Output path for the plist report
  --cuda-device-only      Do device-side CUDA compilation only
  --cuda-host-only        Do host-side CUDA compilation only
  --cuda-path=<value>     CUDA installation path
  -cxx-isystem <directory>
                          Add directory to the C++ SYSTEM include         search path
  -c                      Only run preprocess, compile, and assemble steps
  ...
  ...
  ...

正如您所看到的-c标志的解释是:只运行预处理,编译和汇编步骤