From afb9ffa50e7c3824a10da61391717c917185920a Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Tue, 17 Sep 2024 11:22:32 +0200 Subject: [PATCH] Rust: add windows tools --- rust/tools/BUILD.bazel | 1 + rust/tools/autobuild.cmd | 5 +++++ rust/tools/autobuild.sh | 1 - rust/tools/index-files.cmd | 5 +++++ 4 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 rust/tools/autobuild.cmd create mode 100644 rust/tools/index-files.cmd diff --git a/rust/tools/BUILD.bazel b/rust/tools/BUILD.bazel index a61ab84edbf..92a97109ede 100644 --- a/rust/tools/BUILD.bazel +++ b/rust/tools/BUILD.bazel @@ -2,6 +2,7 @@ load("//misc/bazel:pkg.bzl", "codeql_pkg_files") codeql_pkg_files( name = "tools", + srcs = glob(["*.cmd"]), exes = glob(["*.sh"]), visibility = ["//rust:__pkg__"], ) diff --git a/rust/tools/autobuild.cmd b/rust/tools/autobuild.cmd new file mode 100644 index 00000000000..fd5b113ffe4 --- /dev/null +++ b/rust/tools/autobuild.cmd @@ -0,0 +1,5 @@ +@echo off + +type NUL && "%CODEQL_DIST%\codeql.exe" database index-files --working-dir=. --language=rust --include-extension=.rs "%CODEQL_EXTRACTOR_RUST_WIP_DATABASE%" + +exit /b %ERRORLEVEL% diff --git a/rust/tools/autobuild.sh b/rust/tools/autobuild.sh index b35a1729858..fdea6e80e52 100755 --- a/rust/tools/autobuild.sh +++ b/rust/tools/autobuild.sh @@ -2,5 +2,4 @@ exec "${CODEQL_DIST}/codeql" database index-files \ --working-dir=. --language=rust --include-extension=.rs \ - ${CODEQL_VERBOSITY:+"--verbosity=${CODEQL_VERBOSITY}"} \ "${CODEQL_EXTRACTOR_RUST_WIP_DATABASE}" diff --git a/rust/tools/index-files.cmd b/rust/tools/index-files.cmd new file mode 100644 index 00000000000..3991f30b62f --- /dev/null +++ b/rust/tools/index-files.cmd @@ -0,0 +1,5 @@ +@echo off + +type NUL && "%CODEQL_EXTRACTOR_RUST_ROOT%\tools\%CODEQL_PLATFORM%\extractor" @"%1" + +exit /b %ERRORLEVEL%