llvm.org GIT mirror llvm / ba1ac60
Reorder FindPythonInterp so that config-ix can use PYTHON_EXECUTABLE Summary: Code in config-ix tries to call `PYTHON_EXECUTABLE` to search for some python modules but that variable isn't set until the moved chunk of code that finds Python is called. Reorder it so CMake can use PYTHON_EXECUTABLE Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D52763 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346367 91177308-0d34-0410-b5e6-96231b3b80d8 Nathan Lanza 10 months ago
1 changed file(s) with 19 addition(s) and 19 deletion(s). Raw diff Collapse all Expand all
571571 set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR OFF CACHE BOOL
572572 "Enable per-target runtimes directory")
573573
574 # All options referred to from HandleLLVMOptions have to be specified
575 # BEFORE this include, otherwise options will not be correctly set on
576 # first cmake run
577 include(config-ix)
578
579 string(REPLACE "Native" ${LLVM_NATIVE_ARCH}
580 LLVM_TARGETS_TO_BUILD "${LLVM_TARGETS_TO_BUILD}")
581 list(REMOVE_DUPLICATES LLVM_TARGETS_TO_BUILD)
582
583 # By default, we target the host, but this can be overridden at CMake
584 # invocation time.
585 set(LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_HOST_TRIPLE}" CACHE STRING
586 "Default target for which LLVM will generate code." )
587 set(TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}")
588 message(STATUS "LLVM host triple: ${LLVM_HOST_TRIPLE}")
589 message(STATUS "LLVM default target triple: ${LLVM_DEFAULT_TARGET_TRIPLE}")
590
591 include(HandleLLVMOptions)
592
593574 # Verify that we can find a Python 2 interpreter. Python 3 is unsupported.
594575 # FIXME: We should support systems with only Python 3, but that requires work
595576 # on LLDB.
605586 if( ${PYTHON_VERSION_STRING} VERSION_LESS 2.7 )
606587 message(FATAL_ERROR "Python 2.7 or newer is required")
607588 endif()
589
590 # All options referred to from HandleLLVMOptions have to be specified
591 # BEFORE this include, otherwise options will not be correctly set on
592 # first cmake run
593 include(config-ix)
594
595 string(REPLACE "Native" ${LLVM_NATIVE_ARCH}
596 LLVM_TARGETS_TO_BUILD "${LLVM_TARGETS_TO_BUILD}")
597 list(REMOVE_DUPLICATES LLVM_TARGETS_TO_BUILD)
598
599 # By default, we target the host, but this can be overridden at CMake
600 # invocation time.
601 set(LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_HOST_TRIPLE}" CACHE STRING
602 "Default target for which LLVM will generate code." )
603 set(TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}")
604 message(STATUS "LLVM host triple: ${LLVM_HOST_TRIPLE}")
605 message(STATUS "LLVM default target triple: ${LLVM_DEFAULT_TARGET_TRIPLE}")
606
607 include(HandleLLVMOptions)
608608
609609 ######
610610 # LLVMBuild Integration