<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Nov 6, 2015 at 1:00 AM, Greg Clayton <span dir="ltr"><<a href="mailto:gclayton@apple.com" target="_blank">gclayton@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class=""><br>
> On Nov 5, 2015, at 1:21 AM, Bruce Mitchener via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org">lldb-dev@lists.llvm.org</a>> wrote:<br>
><br>
> Greg et al:<br>
><br>
> When linking (cmake on OS X), I get a lot of warnings like this:<br>
><br>
>   ld: warning: cannot export hidden symbol lldb::endian::InlHostByteOrder()<br>
>       from lib/liblldbPluginProcessUtility.a(RegisterContextDarwin_arm64.cpp.o)<br>
><br>
> Should this function be in the public namespace?<br>
<br>
</span>No I don't believe it should.<br>
<span class=""><br>
> It is an inline function which is why I think it gets flagged as hidden.<br>
><br>
> Can we move it out of the lldb namespace? Or has that ship sailed? Is there some other way that we can suppress this warning or fix the underlying issue? (Can we exclude a symbol from being exported somehow?)<br>
<br>
</span>Please feel free to move it to the lldb_private namespace. Nothing in our lldb/API/SB* header files should use it, so it is fine to move it. Let me know if you run into any troubles doing so.</blockquote><div><br></div><div>Review: <a href="http://reviews.llvm.org/D14417">http://reviews.llvm.org/D14417</a></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">
> This isn't the only symbol that is a problem, but it is the one that generates the most output.<br>
<br>
</span>We should have no inlined functions in our public API if we can avoid it. That is a sure way to have people crash if we ever change anything and they linked against the inline code from the header file.<br></blockquote><div><br></div><div>After fixing this one, the remaining cases are:</div><div><br></div><div>ld: warning: cannot export hidden symbol lldb::SBListener::GetSP() from tools/lldb/source/API/CMakeFiles/liblldb.dir/SBAttachInfo.cpp.o</div><div>ld: warning: cannot export hidden symbol lldb::SBListener::GetSP() from tools/lldb/source/API/CMakeFiles/liblldb.dir/SBLaunchInfo.cpp.o</div><div>ld: warning: cannot export hidden symbol lldb::SBPlatform::SBPlatform(lldb::SBPlatform const&) from tools/lldb/source/API/CMakeFiles/liblldb.dir/SBTarget.cpp.o</div><div>ld: warning: cannot export hidden symbol lldb::SBListener::GetSP() from tools/lldb/source/API/CMakeFiles/liblldb.dir/SBTarget.cpp.o</div><div>ld: warning: cannot export hidden symbol lldb::SBPlatform::SBPlatform(lldb::SBPlatform const&) from tools/lldb/source/API/CMakeFiles/liblldb.dir/SBTarget.cpp.o</div><div>ld: warning: cannot export hidden symbol lldb::SBPlatform::operator=(lldb::SBPlatform const&) from tools/lldb/source/API/CMakeFiles/liblldb.dir/__/__/scripts/LLDBWrapPython.cpp.o</div><div>ld: warning: cannot export hidden symbol lldb::SBPlatform::SBPlatform(lldb::SBPlatform const&) from tools/lldb/source/API/CMakeFiles/liblldb.dir/__/__/scripts/LLDBWrapPython.cpp.o</div><div>ld: warning: cannot export hidden symbol lldb::SBPlatform::SBPlatform(lldb::SBPlatform const&) from tools/lldb/source/API/CMakeFiles/liblldb.dir/__/__/scripts/LLDBWrapPython.cpp.o</div><div>ld: warning: cannot export hidden symbol lldb::SBQueueItem::operator=(lldb::SBQueueItem const&) from tools/lldb/source/API/CMakeFiles/liblldb.dir/__/__/scripts/LLDBWrapPython.cpp.o</div><div>ld: warning: cannot export hidden symbol lldb::SBQueueItem::SBQueueItem(lldb::SBQueueItem const&) from tools/lldb/source/API/CMakeFiles/liblldb.dir/__/__/scripts/LLDBWrapPython.cpp.o</div><div>ld: warning: cannot export hidden symbol lldb::SBQueueItem::SBQueueItem(lldb::SBQueueItem const&) from tools/lldb/source/API/CMakeFiles/liblldb.dir/__/__/scripts/LLDBWrapPython.cpp.o</div><div>ld: warning: cannot export hidden symbol lldb::SBLaunchInfo::SBLaunchInfo(lldb::SBLaunchInfo const&) from tools/lldb/source/API/CMakeFiles/liblldb.dir/__/__/scripts/LLDBWrapPython.cpp.o</div><div>ld: warning: cannot export hidden symbol lldb::SBLaunchInfo::SBLaunchInfo(lldb::SBLaunchInfo const&) from tools/lldb/source/API/CMakeFiles/liblldb.dir/__/__/scripts/LLDBWrapPython.cpp.o </div><div><br></div><div> - Bruce</div><div><br></div></div></div></div>