diff options
Diffstat (limited to 'lib/compilers/nvcc.js')
-rw-r--r-- | lib/compilers/nvcc.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/compilers/nvcc.js b/lib/compilers/nvcc.js index ef527e5ce..d87e4a8b4 100644 --- a/lib/compilers/nvcc.js +++ b/lib/compilers/nvcc.js @@ -94,11 +94,11 @@ export class NvccCompiler extends BaseCompiler { const {code, execTime, stdout} = await this.exec(nvdisasm, args, {maxOutput, customCwd: result.dirPath}); - if (code !== 0) { - result.asm = `<No output: ${Path.basename(nvdisasm)} returned ${code}>`; - } else { + if (code === 0) { result.objdumpTime = execTime; result.asm = this.postProcessObjdumpOutput(stdout); + } else { + result.asm = `<No output: ${Path.basename(nvdisasm)} returned ${code}>`; } return result; } @@ -113,9 +113,9 @@ export class NvccCompiler extends BaseCompiler { const maxSize = this.env.ceProps('max-asm-size', 64 * 1024 * 1024); const optPromise = result.hasOptOutput ? this.processOptOutput(result.optPath) : Promise.resolve(''); const asmPromise = ( - !filters.binary - ? fs.readFile(outputFilename, {encoding: 'utf8'}) - : this.objdump(outputFilename, {}, maxSize, filters.intel, filters.demangle, filters) + filters.binary + ? this.objdump(outputFilename, {}, maxSize, filters.intel, filters.demangle, filters) + : fs.readFile(outputFilename, {encoding: 'utf8'}) ).then(asm => { result.asm = typeof asm === 'string' ? asm : asm.asm; return result; |