This revision was automatically updated to reflect the committed changes. Closed by commit rG061b5bf914c6: [analyzer] SATest: Do not re-run CMake in Docker if not needed (authored by vsavchenko).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81596/new/ 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 " \
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 " \
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits