diff options
author | partouf <partouf@gmail.com> | 2022-07-21 23:12:37 +0200 |
---|---|---|
committer | partouf <partouf@gmail.com> | 2022-07-21 23:12:37 +0200 |
commit | 068fbbfb2fa8408d4a4be93dc87dbbfb2d1fc21d (patch) | |
tree | a3d519f1632e062863568bede8ac34305b353575 | |
parent | a5153c867ee503961e27315e7138f428f5bb1b37 (diff) | |
download | compiler-explorer-gh-3705.tar.gz compiler-explorer-gh-3705.zip |
fix for pre v11 nvccgh-3705
-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); |