-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[LifetimeSafety] Fix Python path for Windows compatibility #166291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@llvm/pr-subscribers-clang-static-analyzer-1 @llvm/pr-subscribers-clang-temporal-safety Author: Utkarsh Saxena (usx95) ChangesFix Python virtual environment paths for Windows in the Lifetime Safety Analysis benchmark What changed?
How to test?
Full diff: https://github.com/llvm/llvm-project/pull/166291.diff 1 Files Affected:
diff --git a/clang/test/Analysis/LifetimeSafety/CMakeLists.txt b/clang/test/Analysis/LifetimeSafety/CMakeLists.txt
index ce37a29655668..2f9c2ac247497 100644
--- a/clang/test/Analysis/LifetimeSafety/CMakeLists.txt
+++ b/clang/test/Analysis/LifetimeSafety/CMakeLists.txt
@@ -15,6 +15,13 @@ set(LIFETIME_BENCHMARK_REQUIREMENTS
set(LIFETIME_BENCHMARK_OUTPUT_DIR
"${CMAKE_CURRENT_BINARY_DIR}/benchmark_results")
+if(WIN32)
+ set(LIFETIME_BENCHMARK_VENV_PYTHON_EXECUTABLE
+ "${LIFETIME_BENCHMARK_VENV_DIR}/Scripts/python")
+else()
+ set(LIFETIME_BENCHMARK_VENV_PYTHON_EXECUTABLE
+ "${LIFETIME_BENCHMARK_VENV_DIR}/bin/python")
+endif()
if(EXISTS ${LIFETIME_BENCHMARK_SCRIPT} AND EXISTS ${LIFETIME_BENCHMARK_REQUIREMENTS})
@@ -22,7 +29,7 @@ if(EXISTS ${LIFETIME_BENCHMARK_SCRIPT} AND EXISTS ${LIFETIME_BENCHMARK_REQUIREME
add_custom_command(
OUTPUT ${LIFETIME_BENCHMARK_VENV_DIR}/pyvenv.cfg
COMMAND ${Python3_EXECUTABLE} -m venv ${LIFETIME_BENCHMARK_VENV_DIR}
- COMMAND ${LIFETIME_BENCHMARK_VENV_DIR}/bin/python -m pip install -r ${LIFETIME_BENCHMARK_REQUIREMENTS}
+ COMMAND ${LIFETIME_BENCHMARK_VENV_PYTHON_EXECUTABLE} -m pip install -r ${LIFETIME_BENCHMARK_REQUIREMENTS}
DEPENDS ${LIFETIME_BENCHMARK_REQUIREMENTS}
COMMENT "Creating Python virtual environment and installing dependencies for benchmark..."
)
@@ -32,7 +39,7 @@ if(EXISTS ${LIFETIME_BENCHMARK_SCRIPT} AND EXISTS ${LIFETIME_BENCHMARK_REQUIREME
# Main benchmark target
add_custom_target(benchmark_lifetime_safety_analysis
- COMMAND ${LIFETIME_BENCHMARK_VENV_DIR}/bin/python ${LIFETIME_BENCHMARK_SCRIPT}
+ COMMAND ${LIFETIME_BENCHMARK_VENV_PYTHON_EXECUTABLE} ${LIFETIME_BENCHMARK_SCRIPT}
--clang-binary ${LLVM_BINARY_DIR}/bin/clang
--output-dir ${LIFETIME_BENCHMARK_OUTPUT_DIR}
|
|
Landing as this fix is confirmed #166143 (comment) |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/95/builds/19000 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/127/builds/5216 Here is the relevant piece of the build log for the reference |

Fix Python virtual environment paths for Windows in the Lifetime Safety Analysis benchmark
What changed?
Scripts/pythonpathbin/pythonpathHow to test?
ninja benchmark_lifetime_safety_analysisFixes #166143