[PATCH] D81596: [analyzer] SATest: Do not re-run CMake in Docker if not needed
Valeriy Savchenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 10 11:05:25 PDT 2020
vsavchenko created this revision.
Herald added subscribers: cfe-commits, ASDenysPetrov, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun.
Herald added a project: clang.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D81596
Files:
clang/utils/analyzer/entrypoint.py
Index: clang/utils/analyzer/entrypoint.py
===================================================================
--- clang/utils/analyzer/entrypoint.py
+++ clang/utils/analyzer/entrypoint.py
@@ -23,16 +23,21 @@
return parser.parse_known_args()
-def build_llvm() -> None:
+def build_llvm():
os.chdir('/build')
try:
- cmake()
+ if is_cmake_needed():
+ cmake()
ninja()
except CalledProcessError:
print("Build failed!")
sys.exit(1)
+def is_cmake_needed():
+ return "build.ninja" not in os.listdir()
+
+
CMAKE_COMMAND = "cmake -G Ninja -DCMAKE_BUILD_TYPE=Release " \
"-DCMAKE_INSTALL_PREFIX=/analyzer -DLLVM_TARGETS_TO_BUILD=X86 " \
"-DLLVM_ENABLE_PROJECTS=clang -DLLVM_BUILD_RUNTIME=OFF " \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81596.269903.patch
Type: text/x-patch
Size: 778 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200610/df415b66/attachment-0001.bin>
More information about the cfe-commits
mailing list