2013-03-18 5 views
5

Ich versuche, diese LLVM instrumentation project ausführen, aber ich bin nur in der Lage, die Optimierung der Instrumentierung unter Linux zu laden.LLVM: Optimierung Laden fehlgeschlagen auf OSX

Ich habe LLVM 3.2 und Clang 3.2 auf OSX kompiliert und installiert, und habe die gleiche Version in Linux.

Wenn ich versuche, in Linux zu laufen:

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 

Same-Befehl, in 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 

Antwort

1

ich genau weiß nicht, wie dieses Problem zu beheben, aber das Problem ist, dass Sie‘ Mehrere statische LLVM-Bibliotheken werden statisch in die Instrumentierungs-Dylib eingebunden, so dass sie nicht vom opt-Treiber "geöffnet" werden können. Wenn Sie es öffnen, erhalten Sie also doppelte Globals für verschiedene Befehlszeilenargumente. Dies hat wahrscheinlich wenig mit LLVM zu tun und mehr mit dem spezifischen Build-Prozess zu tun, der auf OS X verwendet wird, haben unterschiedliche Standardwerte für die Sichtbarkeit von Symbolen und/oder Shared vs. Static Linking.

Verwandte Themen