2013-03-18 26 views
5

üzerinde en iyileştirme yüklemesi başarısız oluyor Bu LLVM instrumentation project'u çalıştırmaya çalışıyorum, ancak yalnızca Linux altında enstrümantasyon optimizasyonunu yükleyebiliyorum.LLVM: OSX

OSX'te LLVM 3.2 ve Clang 3.2'yi derledim ve yükledim ve aynı sürümü Linux'ta aldım.

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 

Aynı komutu, OSX içinde:

Linux çalıştırmak için deneyin

Bunu düzeltmek için ne kadar tam olarak bilmiyorum

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 

cevap

1

ama sorun olduğunu sen' çekirdek LLVM kütüphanelerinin birçoğunu statik olarak enstrümantasyon dylib'e, opt sürücüsü tarafından 'dlopen'ed olmakla uyumsuz bir şekilde bağlar. Böylece, açtığınızda, çeşitli komut satırı argümanları için yinelenen globals alırsınız. Bu muhtemelen LLVM ile ilgisi yoktur ve OS X'de kullanılan özel oluşturma işlemiyle daha fazla sembollerin ve/veya paylaşımlı ve statik bağlantıların görünmesi için farklı varsayılan değerlere sahiptir.