From d223198a1616aca3e18c10ac50a79feb471a4979 Mon Sep 17 00:00:00 2001 From: jaxl Date: Tue, 15 Oct 2019 13:59:17 +0800 Subject: [PATCH] Cherry pick CL2012695 Switch llvm to llvm-project Change-Id: Ib815e98f76bd413af5bd2ffd47058241cda319fc --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 737df5e6..8fcb4cd3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -147,7 +147,13 @@ set(PAL_BUILD_VEGA20 ${XGL_BUILD_VEGA20} CACHE BOOL "${PROJECT_NAME} override." set(PAL_BUILD_GFX10 ${XGL_BUILD_GFX10} CACHE BOOL "${PROJECT_NAME} override." FORCE) # LLVM -set(XGL_LLVM_SRC_PATH ${PROJECT_SOURCE_DIR}/../llvm CACHE PATH "Specify the path to the LLVM.") +# LLVM will be switched to llvm monorepo. Check if the new llvm exist first and fallback to +# the old llvm if it doesn't during the transition. The old path should be removed once the transition gets completed. +if(EXISTS ${PROJECT_SOURCE_DIR}/../llvm-project/llvm) + set(XGL_LLVM_SRC_PATH ${PROJECT_SOURCE_DIR}/../llvm-project/llvm CACHE PATH "Specify the path to the LLVM.") +else() + set(XGL_LLVM_SRC_PATH ${PROJECT_SOURCE_DIR}/../llvm CACHE PATH "Specify the path to the LLVM.") +endif() # Wayland if (BUILD_WAYLAND_SUPPORT)