File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change
1
+
2
+ find_package (Python COMPONENTS Interpreter)
1
3
add_custom_target (dbg_controller_h
2
- COMMAND ${CMAKE_CURRENT_SOURCE_DIR} /jstoc.py ${CMAKE_CURRENT_SOURCE_DIR} /DbgController.js controllerScript
4
+ COMMAND ${Python_EXECUTABLE} ${ CMAKE_CURRENT_SOURCE_DIR} /jstoc.py ${CMAKE_CURRENT_SOURCE_DIR} /DbgController.js controllerScript
3
5
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
4
6
SOURCES ${CMAKE_CURRENT_SOURCE_DIR} /jstoc.py ${CMAKE_CURRENT_SOURCE_DIR} /DbgController.js
5
7
)
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ CMAKE_EXPORT_COMPILE_COMMANDS="-DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
127
127
LIBS_ONLY_BUILD=
128
128
ALWAYS_YES=
129
129
CCACHE_NAME=
130
- PYTHON2_BINARY =$( which python2.7 || which python2 || which python 2> /dev/null)
130
+ PYTHON_BINARY =$( which python3 || which python || which python2.7 || which python2 || which python 2> /dev/null)
131
131
132
132
UNAME_S=` uname -s`
133
133
if [[ $UNAME_S =~ ' Linux' ]]; then
@@ -538,7 +538,7 @@ export TARGET_PATH
538
538
539
539
if [[ $HAS_LTTNG == 1 ]]; then
540
540
CHAKRACORE_ROOT=` dirname $0 `
541
- " $PYTHON2_BINARY " $CHAKRACORE_ROOT /tools/lttng.py --man $CHAKRACORE_ROOT /manifests/Microsoft-Scripting-Chakra-Instrumentation.man --intermediate $TARGET_PATH /intermediate
541
+ " $PYTHON_BINARY " $CHAKRACORE_ROOT /tools/lttng.py --man $CHAKRACORE_ROOT /manifests/Microsoft-Scripting-Chakra-Instrumentation.man --intermediate $TARGET_PATH /intermediate
542
542
mkdir -p $TARGET_PATH /lttng
543
543
(diff -q $TARGET_PATH /intermediate/lttng/jscriptEtw.h $TARGET_PATH /lttng/jscriptEtw.h && echo " jscriptEtw.h up to date; skipping" ) || cp $TARGET_PATH /intermediate/lttng/* $TARGET_PATH /lttng/
544
544
fi
553
553
BUILD_DIRECTORY=" ${TARGET_PATH} /${BUILD_TYPE_DIR: 0} "
554
554
echo " Build path: ${BUILD_DIRECTORY} "
555
555
556
- BUILD_RELATIVE_DIRECTORY=$( " $PYTHON2_BINARY " -c " import os.path;print \
557
- os.path.relpath('${CHAKRACORE_DIR} ', '$BUILD_DIRECTORY ')" )
556
+ BUILD_RELATIVE_DIRECTORY=$( " $PYTHON_BINARY " -c " from __future__ import print_function; import os.path;\
557
+ print( os.path.relpath('${CHAKRACORE_DIR} ', '$BUILD_DIRECTORY ') )" )
558
558
559
559
# ################ Write-barrier check/analyze run #################
560
560
WB_FLAG=
You can’t perform that action at this time.
0 commit comments