Can't compile compiler-rt, asan error

Compiler-rt is broken for me. I'm compiling with top of trunk llvm, clang and compiler-rt using automake on Darwin.

Is anyone else seeing this error?

llvm[4]: Copying runtime library darwin/asan_iossim_dynamic to build dir
llvm[4]: Copying runtime library darwin/ubsan_osx to build dir
cp: /Volumes/Files/yuchen_wu/dev/llvm/build/tools/clang/runtime/compiler-rt/clang_darwin/asan_iossim_dynamic/libcompiler_rt.dylib: No such file or directory
make[4]: *** [/Volumes/Files/yuchen_wu/dev/llvm/build/Debug+Asserts/lib/clang/3.4/lib/darwin/libclang_rt.asan_iossim_dynamic.dylib] Error 1
make[4]: *** Waiting for unfinished jobs....
llvm[4]: Fixing LC_ID_DYLIB of /Volumes/Files/yuchen_wu/dev/llvm/build/Debug+Asserts/lib/clang/3.4/lib/darwin/libclang_rt.asan_osx_dynamic.dylib
make[3]: *** [compiler-rt/.makeall] Error 2
make[2]: *** [all] Error 1
make[1]: *** [clang/.makeall] Error 2
make: *** [all] Error 1

The folder asan_iossim_dynamic does not seem to exist.

Do you have the iossim sdk installed on your machine (check by ‘xcrun --show-sdk-path --sdk iphonesimulator’)?
If the answer is yes and you’re testing on ToT, that’s a bug. I’ll take a look.

“If the answer is no”, of course.

It looks like it:

[/Volumes/Files/yuchen_wu/dev/llvm/build]$ xcrun --show-sdk-path --sdk iphonesimulator
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk

Can you please reconfigure and attach the full log of ‘make VERBOSE=1’ ?

Also, which version of OSX you’re running?

I'm running Mavericks. I'll attach the make log once it's done.

I tracked down the error. There’s an ifneq check for IOSSIM_SDK_PATH before it’s defined.

$ grep -n IOSSIM_SDK_PATH projects/compiler-rt/make/platform/clang_darwin.mk
91:ifneq ($(IOSSIM_SDK_PATH),)
157:IOSSIM_SDK_PATH := $(call XCRunSdkPath,iphonesimulator)
158:$(warning clang_darwin.mk: $(IOSSIM_SDK_PATH))
161: -isysroot $(IOSSIM_SDK_PATH) \
207: -mios-simulator-version-min=7.0 -isysroot $(IOSSIM_SDK_PATH)

Should be fixed in r195216.

Sweet, thanks!