我正在尝试运行这个LLVM 检测项目,但我只能在 Linux 下加载检测优化。
我已经在 OSX 上编译并安装了 LLVM 3.2 和 Clang 3.2,并且在 Linux 中具有相同的版本。
当我尝试在 Linux 中运行时:
command opt -load ./obj/llvminstrument/libllvminstrument.so -help |grep instrum
-insert-edge-profiling - Insert instrumentation for edge profiling
-insert-gcov-profiling - Insert instrumentation for GCOV profiling
-insert-optimal-edge-profiling - Insert optimal instrumentation for edge profiling
-insert-path-profiling - Insert instrumentation for Ball-Larus path profiling
-instrument_block - Injects block instrumentation instructions
-instrument_function - Injects function instrumentation instructions
-instrument_prepare - Prepares instrumentation instructions
相同的命令,在 OSX 中:
command opt -load ./obj/llvminstrument/libllvminstrument.dylib -help |grep instrum │········
opt: CommandLine Error: Argument 'track-memory' defined more than once! │········
opt: CommandLine Error: Argument 'debug-buffer-size' defined more than once! │········
opt: CommandLine Error: Argument 'print-all-options' defined more than once! │········
opt: CommandLine Error: Argument 'print-options' defined more than once! │········
opt: CommandLine Error: Argument 'print-after-all' defined more than once! │········
opt: CommandLine Error: Argument 'print-before-all' defined more than once! │········
opt: CommandLine Error: Argument 'track-memory' defined more than once! │········
opt: CommandLine Error: Argument 'debug-buffer-size' defined more than once! │········
opt: CommandLine Error: Argument 'print-all-options' defined more than once! │········
opt: CommandLine Error: Argument 'print-options' defined more than once! │········
opt: CommandLine Error: Argument 'print-after-all' defined more than once! │········
opt: CommandLine Error: Argument 'print-before-all' defined more than once! │········
-insert-edge-profiling - Insert instrumentation for edge profiling │········
-insert-gcov-profiling - Insert instrumentation for GCOV profiling │········
-insert-optimal-edge-profiling - Insert optimal instrumentation for edge profiling │········
-insert-path-profiling - Insert instrumentation for Ball-Larus path profiling