diff --git a/lldb/gtest/make/Makefile.rules b/lldb/gtest/make/Makefile.rules index aba4e872e123..913be0c7c573 100644 --- a/lldb/gtest/make/Makefile.rules +++ b/lldb/gtest/make/Makefile.rules @@ -9,8 +9,13 @@ ifneq ($(wildcard $(THIS_FILE_DIR)../../llvm/utils/unittest/googletest),) # Assume lldb/llvm (MacOSX Xcode) directory form. LLVM_BASE_DIR := $(realpath $(THIS_FILE_DIR)../../llvm) else - # Assume llvm/tools/lldb (Non-MacOSX) directory form. - LLVM_BASE_DIR := $(realpath $(THIS_FILE_DIR)../../../..) + ifneq ($(wildcard $(THIS_FILE_DIR)../../../llvm/utils/unittest/googletest),) + # Assume lldb/llvm side-by-side configuration (with symbolic links) + LLVM_BASE_DIR := $(realpath $(THIS_FILE_DIR)../../../llvm) + else + # Assume llvm/tools/lldb (Non-MacOSX) directory form. + LLVM_BASE_DIR := $(realpath $(THIS_FILE_DIR)../../../..) + endif endif ifeq ($(GTEST_DIR),) @@ -88,4 +93,4 @@ include $(realpath $(THIS_FILE_DIR)../../test/make/Makefile.rules) test:: $(EXE) $(realpath $(EXE)) -endif \ No newline at end of file +endif