[Bf-blender-cvs] [9bae9d97b10] master: deps: fix llvm using system python

Ray Molenkamp noreply at git.blender.org
Fri Jun 17 17:38:31 CEST 2022


Commit: 9bae9d97b105855de2d6f73d28e81fd6be77a48a
Author: Ray Molenkamp
Date:   Fri Jun 17 09:38:25 2022 -0600
Branches: master
https://developer.blender.org/rB9bae9d97b105855de2d6f73d28e81fd6be77a48a

deps: fix llvm using system python

llvm was using system python, rather than our copy
this went unnoticed on both linux and windows until
sergey tried to build the deps on a clean system with
no system python installed.

===================================================================

M	build_files/build_environment/CMakeLists.txt
M	build_files/build_environment/cmake/llvm.cmake

===================================================================

diff --git a/build_files/build_environment/CMakeLists.txt b/build_files/build_environment/CMakeLists.txt
index b63e86a3ac2..1cf63f2d332 100644
--- a/build_files/build_environment/CMakeLists.txt
+++ b/build_files/build_environment/CMakeLists.txt
@@ -57,7 +57,6 @@ include(cmake/alembic.cmake)
 include(cmake/opensubdiv.cmake)
 include(cmake/sdl.cmake)
 include(cmake/opencollada.cmake)
-include(cmake/llvm.cmake)
 if(APPLE)
   include(cmake/openmp.cmake)
 endif()
@@ -75,6 +74,7 @@ include(cmake/osl.cmake)
 include(cmake/tbb.cmake)
 include(cmake/openvdb.cmake)
 include(cmake/python.cmake)
+include(cmake/llvm.cmake)
 option(USE_PIP_NUMPY "Install NumPy using pip wheel instead of building from source" OFF)
 if(APPLE AND ("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64"))
   set(USE_PIP_NUMPY ON)
diff --git a/build_files/build_environment/cmake/llvm.cmake b/build_files/build_environment/cmake/llvm.cmake
index cf92a5175a3..df4cd8b71e9 100644
--- a/build_files/build_environment/cmake/llvm.cmake
+++ b/build_files/build_environment/cmake/llvm.cmake
@@ -25,11 +25,14 @@ set(LLVM_EXTRA_ARGS
   -DLLVM_BUILD_LLVM_C_DYLIB=OFF
   -DLLVM_ENABLE_UNWIND_TABLES=OFF
   -DLLVM_ENABLE_PROJECTS=clang${LLVM_BUILD_CLANG_TOOLS_EXTRA}
+  -DPython3_ROOT_DIR=${LIBDIR}/python/
+  -DPython3_EXECUTABLE=${PYTHON_BINARY}
   ${LLVM_XML2_ARGS}
 )
 
 if(WIN32)
   set(LLVM_GENERATOR "Ninja")
+  list(APPEND LLVM_EXTRA_ARGS -DPython3_FIND_REGISTRY=NEVER)
 else()
   set(LLVM_GENERATOR "Unix Makefiles")
 endif()
@@ -74,3 +77,9 @@ if(APPLE)
     external_xml2
   )
 endif()
+
+add_dependencies(
+  ll
+  external_python
+)
+



More information about the Bf-blender-cvs mailing list