diff --git a/clang/tools/libclang/Makefile b/clang/tools/libclang/Makefile index 5fdfd0ebb5f3..38b8a0353f45 100644 --- a/clang/tools/libclang/Makefile +++ b/clang/tools/libclang/Makefile @@ -55,7 +55,8 @@ ifeq ($(HOST_OS),Darwin) # If we're doing an Apple-style build, add the LTO object path. ifeq ($(RC_BUILDIT),YES) - TempFile = $(shell mktemp ${OBJROOT}/clang-lto.XXXXXX) + ObjDir := $(shell mkdir -p ${OBJROOT}/dSYMs) + TempFile := $(shell mktemp ${ObjDir}/clang-lto.XXXXXX) LLVMLibsOptions += -Wl,-object_path_lto -Wl,$(TempFile) endif endif