File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -154,11 +154,13 @@ for group in "${!BUILD_TARGET_GROUPS[@]}"; do
154154
155155 db_path=" ${CODEQL_DATABASES_DIR} /${group} _db"
156156 sarif_output=" ${CODEQL_SARIF_DIR} /${group} .sarif"
157-
157+ current_bazel_output_base=" /tmp/codeql_bazel_output_${group} _$( date +%s%N) " # Add timestamp for extra uniqueness
158+
159+
158160 # 1. Clean Bazel to ensure a fresh build for CodeQL tracing
159161 echo " Running 'bazel clean --expunge' and 'bazel shutdown'..."
160- bazel clean --expunge || { echo " Bazel clean failed for ${group} " ; exit 1; }
161- bazel shutdown || { echo " Bazel shutdown failed for ${group} " ; exit 1; }
162+ bazel clean --expunge --output_base= " ${current_bazel_output_base} " || { echo " Bazel clean failed for ${group} " ; exit 1; }
163+ bazel shutdown --output_base= " ${current_bazel_output_base} " || { echo " Bazel shutdown failed for ${group} " ; exit 1; }
162164
163165 # Log build group banner only to stdout/stderr (not into summary table file)
164166 echo " --- Building group: ${group} ---"
@@ -169,6 +171,7 @@ for group in "${!BUILD_TARGET_GROUPS[@]}"; do
169171 set +e
170172
171173 build_command=" bazel build \
174+ --output_base=\\\" ${current_bazel_output_base} \\\" \
172175 --config '${CONFIG} ' \
173176 ${targets} \
174177 --verbose_failures \
You can’t perform that action at this time.
0 commit comments