Add success message for validator tool (#7055)

This commit is contained in:
Spencer Fricke
2024-11-08 08:29:05 -07:00
committed by GitHub
parent 4651cbd7bb
commit 7a19db3378
3 changed files with 10 additions and 0 deletions

View File

@@ -3350,6 +3350,11 @@ but nothing was dumped. Possible causes are:
filters,
)
: (async () => {
if (result.validatorTool && result.code === 0) {
// A validator tool is unique because if successful, there will be no asm output
result.asm = '<Validator was successful>';
return result;
}
if (result.asmSize === undefined) {
result.asm = '<No output file>';
return result;

View File

@@ -157,6 +157,10 @@ export class SPIRVToolsCompiler extends BaseCompiler {
const spvBin = await this.exec(compiler, options, execOptions);
result = this.transformToCompilationResult(spvBin, inputFilename);
if (isValidator) {
result.validatorTool = true;
}
if (spvBin.code !== 0 || !(await utils.fileExists(spvBinFilename)) || isValidator) {
return result;
}

View File

@@ -169,6 +169,7 @@ export type CompilationResult = {
stderr: ResultLine[];
truncated?: boolean;
didExecute?: boolean;
validatorTool?: boolean;
executableFilename?: string;
execResult?: CompilationResult;
gnatDebugOutput?: ResultLine[];