<div>Hi everyone,<br><br>We are implementing a profiling instrumentation tool as a part of clang's LTO.  The tool inserts code at compile time that makes calls to a runtime library (written as a C file) during program execution.  The runtime library can collect different kinds of profile information depending on user input.<br>

<br></div><span>Previously, the user had to manually link the correct profiling </span><span>library to the application's object code. We would like to </span><span>automatically link the in the profiling library (stored on disk in </span><span>LLVM bitcode), through the ld command, by modifying </span><span>LTOCodeGenerator.cpp.</span><br>

<br><span>We are having troubling sending command-line arguments to the LTO </span><span>code, because LTO is called by the system ld. However, we've noticed </span><span>the declaration static cl::opt<bool> DisableInline in </span><span>LTOCodeGenerator.cpp.</span><br>

<br><span>How is the DisableInline argument passed to LTO, and how would we be </span><span>able to pass similar arguments, declared as cl::opt, to the LTO code?</span><div><div style="margin-top:5px;margin-right:0px;margin-bottom:5px;margin-left:0px">

</div><div><br></div><div>Thanks for your help,<br>Melanie and Kui</div></div>