[LLVMdev] LLVM 3.2 on Xcode
Relph, Richard
Richard.Relph at amd.com
Wed Dec 19 09:48:00 PST 2012
Following a blend of instructions on 3 web pages, I have succeeded in getting LLVM 3.2 (with clang, extras, and compiler-rt) building - but not testing - on Xcode. I used CMake 2.8.10 GUI to create the Xcode project file. Below are my notes.
First, I believe CMake ends up setting things up so that Xcode has 1 warning after scanning the project having to do with hires images or some such… it takes a long time to fix that up in a project as large as this, but I'm not sure there's anything we can do about it.
Second, a build of the ALL_BUILD target in Xcode produces 16 warnings about 8 functions declared noreturn, but without a expected __builtin_unreachable() before the end of the function. (The first attempt to build produced 2 errors, the first an unable to create directory error for runtime/libprofile/LLVM.build/Debug/profile_rt-static.build/Objects-normal/x86_64; the second a libtool failure… both went away upon a rebuild.)
Third, a build of the check-all target produced 8 warnings about the 8 functions declared noreturn as for ALL_BUILD, and 6 or 7 "errors", mostly from asan_mac_test.mm. After fixing up these "errors" (int vs. size_t comparisons and malloc being assigned to volatile pointers), I got 372 duplicate symbol errors from this:
Ld /Volumes/Shared/NewShared/llvm/3.2/xcode/projects/compiler-rt/lib/asan/tests/Debug/AsanTest normal x86_64
cd /Volumes/Shared/NewShared/llvm/3.2/source
setenv MACOSX_DEPLOYMENT_TARGET 10.8
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -L/Volumes/Shared/NewShared/llvm/3.2/xcode/projects/compiler-rt/lib/asan/tests/Debug -F/Volumes/Shared/NewShared/llvm/3.2/xcode/projects/compiler-rt/lib/asan/tests/Debug -filelist /Volumes/Shared/NewShared/llvm/3.2/xcode/projects/compiler-rt/lib/asan/tests/LLVM.build/Debug/AsanTest.build/Objects-normal/x86_64/AsanTest.LinkFileList -mmacosx-version-min=10.8 -framework Foundation -Wl,-search_paths_first -Wl,-headerpad_max_install_names -lpthread /Volumes/Shared/NewShared/llvm/3.2/xcode/lib/Debug/libgtest.a /Volumes/Shared/NewShared/llvm/3.2/xcode/lib/Debug/libgtest_main.a /Volumes/Shared/NewShared/llvm/3.2/xcode/lib/Debug/libLLVMSupport.a /Volumes/Shared/NewShared/llvm/3.2/xcode/lib/clang/3.2/lib/darwin/Debug/libclang_rt.asan_osx.a /Volumes/Shared/NewShared/llvm/3.2/xcode/lib/Debug/libgtest.a /Volumes/Shared/NewShared/llvm/3.2/xcode/lib/Debug/libLLVMSupport.a -lpthread -fobjc-link-runtime /Volumes/Shared/NewShared/llvm/3.2/source/../xcode/projects/compiler-rt/lib/asan/tests/asan_globals_test.cc.asan.o /Volumes/Shared/NewShared/llvm/3.2/source/../xcode/projects/compiler-rt/lib/asan/tests/asan_test.cc.asan.o /Volumes/Shared/NewShared/llvm/3.2/source/../xcode/projects/compiler-rt/lib/asan/tests/asan_mac_test.mm.asan.o -o /Volumes/Shared/NewShared/llvm/3.2/xcode/projects/compiler-rt/lib/asan/tests/Debug/AsanTest
duplicate symbol __Z11GlobalsTesti in:
/Volumes/Shared/NewShared/llvm/3.2/xcode/projects/compiler-rt/lib/asan/tests/LLVM.build/Debug/AsanTest.build/Objects-normal/x86_64/asan_globals_test.o
/Volumes/Shared/NewShared/llvm/3.2/source/../xcode/projects/compiler-rt/lib/asan/tests/asan_globals_test.cc.asan.o
duplicate symbol _kStartupStr in:
/Volumes/Shared/NewShared/llvm/3.2/xcode/projects/compiler-rt/lib/asan/tests/LLVM.build/Debug/AsanTest.build/Objects-normal/x86_64/asan_mac_test.o
/Volumes/Shared/NewShared/llvm/3.2/source/../xcode/projects/compiler-rt/lib/asan/tests/asan_mac_test.mm.asan.o
and 370 more…
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121219/c5206389/attachment.html>
More information about the llvm-dev
mailing list