2013-03-18 5 views
5

पर ऑप्टिमाइज़ेशन लोडिंग असफल रहा है, मैं इस LLVM instrumentation project को चलाने की कोशिश कर रहा हूं, लेकिन मैं केवल लिनक्स के तहत उपकरण अनुकूलन लोड करने में सक्षम हूं।एलएलवीएम: ओएसएक्स

मैंने ओएसएक्स पर एलएलवीएम 3.2 और क्लैंग 3.2 संकलित और स्थापित किया है, और लिनक्स में एक ही संस्करण है।

जब मैं लिनक्स में चलाने की कोशिश:

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 

उत्तर

1

मैं बिल्कुल नहीं जानता कि यह कैसे तय करने के लिए, लेकिन समस्या यह है कि आप ' कई कोर एलएलवीएम पुस्तकालयों को स्थिर रूप से उपकरण डिलिब में एक तरह से जोड़ने के लिए जो ऑप्टिकल ड्राइवर द्वारा 'dlopen'ed' के साथ असंगत है। इस प्रकार, जब आप इसे खोलते हैं, तो आपको विभिन्न कमांडलाइन तर्कों के लिए डुप्लिकेट ग्लोबल्स मिलते हैं। एलएलवीएम के साथ ऐसा करने की संभावना कम है और ओएस एक्स पर उपयोग की जाने वाली विशिष्ट बिल्ड प्रक्रिया के साथ प्रतीकों और/या साझा बनाम स्थैतिक लिंकिंग की दृश्यता के लिए अलग-अलग डिफ़ॉल्ट हैं।