diff options
Diffstat (limited to 'lib/compilers/argument-parsers.js')
-rw-r--r-- | lib/compilers/argument-parsers.js | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/compilers/argument-parsers.js b/lib/compilers/argument-parsers.js index 10255df3e..98641f47a 100644 --- a/lib/compilers/argument-parsers.js +++ b/lib/compilers/argument-parsers.js @@ -132,29 +132,25 @@ export class GCCParser extends BaseParser { } export class ClangParser extends BaseParser { - static async setCompilerSettingsFromOptions(compiler, options) { + static setCompilerSettingsFromOptions(compiler, options) { logger.debug(`clang-like compiler options: ${_.keys(options).join(' ')}`); if (BaseParser.hasSupport(options, '-fsave-optimization-record')) { compiler.compiler.optArg = '-fsave-optimization-record'; compiler.compiler.supportsOptOutput = true; } - if (BaseParser.hasSupport(options, '-fcolor-diagnostics')) { - if (compiler.compiler.options) compiler.compiler.options += ' '; - compiler.compiler.options += '-fcolor-diagnostics'; - } if (BaseParser.hasSupport(options, '-emit-llvm')) { compiler.compiler.supportsIrView = true; compiler.compiler.irArg = ['-Xclang', '-emit-llvm', '-fsyntax-only']; } - if (BaseParser.hasSupport(options, '-fno-crash-diagnostics')) { - if (compiler.compiler.options) compiler.compiler.options += ' '; - compiler.compiler.options += '-fno-crash-diagnostics'; - } + + if (BaseParser.hasSupport(options, '-fcolor-diagnostics')) compiler.compiler.options += ' -fcolor-diagnostics'; + if (BaseParser.hasSupport(options, '-fno-crash-diagnostics')) + compiler.compiler.options += ' -fno-crash-diagnostics'; } static async parse(compiler) { const options = await ClangParser.getOptions(compiler, '--help'); - await this.setCompilerSettingsFromOptions(compiler, options); + this.setCompilerSettingsFromOptions(compiler, options); return compiler; } } |