2013-03-18 11 views
5

Próbuję uruchomić to LLVM instrumentation project, ale jestem w stanie załadować optymalizację oprzyrządowania tylko pod Linuksem.LLVM: Niepowodzenie ładowania optymalizacji w systemie OSX

Mam skompilowane i zainstalowane LLVM 3.2 i Clang 3.2 na OSX, i mam taką samą wersję w systemie Linux.

Kiedy próbuję uruchomić w Linuksie:

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 

samego polecenia w 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 

Odpowiedz

1

nie wiem dokładnie, jak to naprawić, ale problemem jest to, że” Ponowne łączenie kilku podstawowych bibliotek LLVM statycznie w instrumentarium w sposób niekompatybilny z tym, że jest dlopenowany przez sterownik opt. Tak więc, gdy go otworzysz, otrzymasz zduplikowane globale dla różnych argumentów linii poleceń. Prawdopodobnie ma to niewiele wspólnego z LLVM, a więcej na temat konkretnego procesu kompilacji stosowanego w OS X ma różne ustawienia domyślne dla widoczności symboli i/lub wspólnego lub statycznego łączenia.