[compiler-rt] r189486 - sanitizer_common: Use PYTHON_EXECUTABLE to choose appropriate python.
Will Dietz
wdietz2 at illinois.edu
Wed Aug 28 08:53:17 PDT 2013
Author: wdietz2
Date: Wed Aug 28 10:53:17 2013
New Revision: 189486
URL: http://llvm.org/viewvc/llvm-project?rev=189486&view=rev
Log:
sanitizer_common: Use PYTHON_EXECUTABLE to choose appropriate python.
Fixes build on systems where 'python' is not python2.
Modified:
compiler-rt/trunk/cmake/Modules/SanitizerUtils.cmake
compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt
compiler-rt/trunk/lib/sanitizer_common/scripts/check_lint.sh
Modified: compiler-rt/trunk/cmake/Modules/SanitizerUtils.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/Modules/SanitizerUtils.cmake?rev=189486&r1=189485&r2=189486&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/Modules/SanitizerUtils.cmake (original)
+++ compiler-rt/trunk/cmake/Modules/SanitizerUtils.cmake Wed Aug 28 10:53:17 2013
@@ -12,7 +12,8 @@ macro(add_sanitizer_rt_symbols name)
get_target_property(libfile ${name} LOCATION)
set(symsfile "${libfile}.syms")
add_custom_target(${name}-symbols ALL
- COMMAND ${SANITIZER_GEN_DYNAMIC_LIST} ${libfile} ${ARGN}
+ COMMAND ${PYTHON_EXECUTABLE}
+ ${SANITIZER_GEN_DYNAMIC_LIST} ${libfile} ${ARGN}
> ${symsfile}
DEPENDS ${name} ${SANITIZER_GEN_DYNAMIC_LIST} ${ARGN}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
Modified: compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt?rev=189486&r1=189485&r2=189486&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt Wed Aug 28 10:53:17 2013
@@ -105,6 +105,7 @@ if(UNIX)
set(SANITIZER_LINT_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/scripts/check_lint.sh)
add_custom_target(SanitizerLintCheck ALL
COMMAND LLVM_CHECKOUT=${LLVM_MAIN_SRC_DIR} SILENT=1 TMPDIR=
+ PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}
${SANITIZER_LINT_SCRIPT}
DEPENDS ${SANITIZER_LINT_SCRIPT}
COMMENT "Running lint check for sanitizer sources..."
Modified: compiler-rt/trunk/lib/sanitizer_common/scripts/check_lint.sh
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/scripts/check_lint.sh?rev=189486&r1=189485&r2=189486&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/scripts/check_lint.sh (original)
+++ compiler-rt/trunk/lib/sanitizer_common/scripts/check_lint.sh Wed Aug 28 10:53:17 2013
@@ -8,8 +8,10 @@ if [ "${LLVM_CHECKOUT}" == "" ]; then
fi
# Cpplint setup
-cd ${SCRIPT_DIR}
CPPLINT=${SCRIPT_DIR}/cpplint.py
+if [ "${PYTHON_EXECUTABLE}" != "" ]; then
+ CPPLINT="${PYTHON_EXECUTABLE} ${CPPLINT}"
+fi
# Filters
# TODO: remove some of these filters
More information about the llvm-commits
mailing list