diff options
author | Patrick Quist <partouf@gmail.com> | 2022-07-21 23:24:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-21 23:24:51 +0200 |
commit | e9cbc03347517a2c86d3facdaa42f04c92f2f753 (patch) | |
tree | a3d519f1632e062863568bede8ac34305b353575 /lib/compilers | |
parent | a5153c867ee503961e27315e7138f428f5bb1b37 (diff) | |
download | compiler-explorer-e9cbc03347517a2c86d3facdaa42f04c92f2f753.tar.gz compiler-explorer-e9cbc03347517a2c86d3facdaa42f04c92f2f753.zip |
fix for pre v11 nvcc (#3897)gh-3707
Diffstat (limited to 'lib/compilers')
-rw-r--r-- | lib/compilers/nvcc.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/compilers/nvcc.js b/lib/compilers/nvcc.js index a3d07a9dc..7e3a2f048 100644 --- a/lib/compilers/nvcc.js +++ b/lib/compilers/nvcc.js @@ -24,8 +24,11 @@ import path from 'path'; +import Semver from 'semver'; + import {BaseCompiler} from '../base-compiler'; import {SassAsmParser} from '../parsers/asm-parser-sass'; +import {asSafeVer} from '../utils'; import {ClangParser} from './argument-parsers'; @@ -55,8 +58,12 @@ export class NvccCompiler extends BaseCompiler { } async objdump(outputFilename, result, maxSize) { - // For nvdisasm. - const args = [outputFilename, '-c', '-g', '-hex']; + let args = [outputFilename, '-c', '-g', '-hex']; + + if (Semver.lt(asSafeVer(this.compiler.semver), '11.0.0', true)) { + args = [outputFilename, '-c', '-g']; + } + const execOptions = {maxOutput: maxSize, customCwd: path.dirname(outputFilename)}; const objResult = await this.exec(this.compiler.objdumper, args, execOptions); |