On Sun, 1 Apr 2012 18:40:46 -0400
"James K. Lowden" <[email protected]> wrote:

> The symbols I can't seem to find with nm(1) are the most basic ones:
> operators new & delete, std::ios_base::Init::Init(), and so on.  Where
> are they defined?  

The following command line linked correctly:

/usr/local/clang30/bin/clang -stdlib=libc++ -fPIC -g -Wl,-rpath
-Wl,/usr/local/lib -L/usr/local/clang30/lib -shared -lLLVMARMCodeGen
-lLLVMAlphaCodeGen -lLLVMAnalysis -lLLVMCodeGen -lLLVMCore
-lLLVMMBlazeCodeGen -lLLVMMC -lLLVMMCDisassembler -lLLVMMipsCodeGen
-lLLVMSelectionDAG -lLLVMSupport -lLLVMSystemZCodeGen -lLLVMX86CodeGen
-lclang -lclangAST -lclangAnalysis -lclangBasic -lclangDriver
-lclangFrontend -lclangLex -lclangParse -lclangSema
-lclangSerialization  /usr/lib/libstdc++.6.dylib dxr-index.o sha1.o -o
libclang-index-plugin.so -shared

Notes:

1.  The OS X ld(1) seems not to support -R, but -rpath works.  
2.
http://llvm.org/releases/3.0/clang+llvm-3.0-x86_64-apple-darwin11.tar.gz
doesn't include a standard C++ runtime library.  
3.  I don't know whether to use libc++ or libstdc++.  I don't
understand the consequences, if any, of linking to the one
in /usr/lib.  

--jkl

_______________________________________________
dev-static-analysis mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-static-analysis

Reply via email to