Weird build problem while building libcxx_tsan

Hi,

Currently on openSUSE 13.2 building llvm+clang trunk fails with:

Run Build Command:“/usr/bin/ninja” “cmTryCompileExec3878271410”

[1/2] Building CXX object
CMakeFiles/cmTryCompileExec3878271410.dir/testCXXCompiler.cxx.o

FAILED: /home/abuild/rpmbuild/BUILD/llvm/stage2/./bin/clang
-fsanitize=thread -o
CMakeFiles/cmTryCompileExec3878271410.dir/testCXXCompiler.cxx.o -c
testCXXCompiler.cxx

/home/abuild/rpmbuild/BUILD/llvm/stage2/./bin/clang: symbol lookup error:
/home/abuild/rpmbuild/BUILD/llvm/stage2/./bin/clang: undefined symbol:
_ZN4llvm3sys7Process28FixupStandardFileDescriptorsEv

ninja: build stopped: subcommand failed.

This is weird because surely the stage2 clang has this symbol, and manually running stage2/bin/clang foo.cxx works fine. Any ideas what might be going on here?

Never mind this was a problem with LD_LIBRARY_PATH.