@@ -669,6 +669,10 @@ function set_build_options_for_host() {
669
669
-DCOMPILER_RT_ENABLE_TVOS:BOOL=FALSE
670
670
-DSANITIZER_MIN_OSX_VERSION=" ${cmake_osx_deployment_target} "
671
671
-DLLVM_ENABLE_MODULES:BOOL=" $( true_false ${LLVM_ENABLE_MODULES} ) "
672
+ # NOTE(compnerd) this explicitly sets up the python executable
673
+ # since we sometimes end up with python 3 and the tooling
674
+ # currently relies on python 2.7
675
+ -DPYTHON_EXECUTABLE:PATH=/usr/bin/python2.7
672
676
)
673
677
if [[ $( is_llvm_lto_enabled) == " TRUE" ]]; then
674
678
if [[ $( cmake_needs_to_specify_standard_computed_defaults) == " TRUE" ]]; then
@@ -2558,6 +2562,21 @@ for host in "${ALL_HOSTS[@]}"; do
2558
2562
cmake_options+=(
2559
2563
-DLLDB_CODESIGN_IDENTITY=" "
2560
2564
-DLLDB_USE_SYSTEM_DEBUGSERVER:BOOL=" ${LLDB_USE_SYSTEM_DEBUGSERVER} "
2565
+
2566
+ # NOTE(compnerd) this explicitly sets up the python
2567
+ # executable since we sometimes end up with python 3 and
2568
+ # the tooling currently relies on python 2.7
2569
+ -DPython_ADDITIONAL_VERSIONS=" 2.7"
2570
+ -DPYTHON_EXECUTABLE:PATH=/usr/bin/python2.7
2571
+ -DPYTHON_LIBRARY=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) /System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.tbd"
2572
+ -DPYTHON_INCLUDE_DIR=" $( xcrun --sdk ${xcrun_sdk_name} --show-sdk-path) /System/Library/Frameworks/Python.framework/Headers"
2573
+ )
2574
+ else
2575
+ cmake_options+=(
2576
+ # NOTE(compnerd) this explicitly sets up the python
2577
+ # executable since we sometimes end up with python 3 and
2578
+ # the tooling currently relies on python 2.7
2579
+ -DPYTHON_EXECUTABLE:PATH=/usr/bin/python2.7
2561
2580
)
2562
2581
fi
2563
2582
fi
0 commit comments