Subzero: Fix Makefile.standalone to enable format with DEBUG flag
When building pnacl with --host-flavor=debug, tools at
../../out/llvm_x86_64_linux_work/Release+Asserts/bin
are not available, so we need a fix to enable source code formatting
with tools from
../../out/llvm_x86_64_linux_debug_work/Debug+Asserts/bin
R=stichnot@chromium.org
Review URL: https://codereview.chromium.org/2081223003 .
Patch from Srdjan Obucina <Srdjan.Obucina@imgtec.com>.
diff --git a/Makefile.standalone b/Makefile.standalone
index 201a8e4..3164798 100644
--- a/Makefile.standalone
+++ b/Makefile.standalone
@@ -219,7 +219,13 @@
# LLVM autoconf build
LLVM_LIBS := -lLLVM-3.7svn
GTEST_LIB_PATH ?= -L../../out/llvm_x86_64_linux_work/Release+Asserts/lib
- CLANG_FORMAT_PATH ?= ../../out/llvm_x86_64_linux_work/Release+Asserts/bin
+ ifneq ($(wildcard \
+ ../../out/llvm_x86_64_linux_work/Release+Asserts/bin/clang-format),)
+ CLANG_FORMAT_PATH ?= ../../out/llvm_x86_64_linux_work/Release+Asserts/bin
+ else
+ CLANG_FORMAT_PATH ?= \
+ ../../out/llvm_x86_64_linux_debug_work/Debug+Asserts/bin
+ endif
endif
LLVM_LDFLAGS := $(LLVM_LIBS) \