aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/argument-parsers.ts
diff options
context:
space:
mode:
authorGuo Ci <zguoci@gmail.com>2023-06-19 21:26:15 -0400
committerGitHub <noreply@github.com>2023-06-19 20:26:15 -0500
commit7651874a98982430258c4c037221229b92ca69d7 (patch)
treefd4d3f492f5d0cef6344f718425a436ab955f476 /lib/compilers/argument-parsers.ts
parentc8b131cf2d445e2b296167cfa72c3e47d08ba76a (diff)
downloadcompiler-explorer-7651874a98982430258c4c037221229b92ca69d7.tar.gz
compiler-explorer-7651874a98982430258c4c037221229b92ca69d7.zip
add Stack Usage Viewer (#5160)gh-7881
For #4834
Diffstat (limited to 'lib/compilers/argument-parsers.ts')
-rw-r--r--lib/compilers/argument-parsers.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/compilers/argument-parsers.ts b/lib/compilers/argument-parsers.ts
index f3756203c..b528f8a55 100644
--- a/lib/compilers/argument-parsers.ts
+++ b/lib/compilers/argument-parsers.ts
@@ -161,6 +161,10 @@ export class GCCParser extends BaseParser {
if (this.hasSupport(options, '-masm=')) {
await this.checkAndSetMasmIntelIfSupported(compiler);
}
+ if (this.hasSupport(options, '-fstack-usage')) {
+ compiler.compiler.stackUsageArg = '-fstack-usage';
+ compiler.compiler.supportsStackUsageOutput = true;
+ }
if (this.hasSupport(options, '-fdiagnostics-color')) {
if (compiler.compiler.options) compiler.compiler.options += ' ';
compiler.compiler.options += '-fdiagnostics-color=always';
@@ -255,6 +259,11 @@ export class ClangParser extends BaseParser {
compiler.compiler.optArg = '-fsave-optimization-record';
compiler.compiler.supportsOptOutput = true;
}
+ if (this.hasSupport(options, '-fstack-usage')) {
+ compiler.compiler.stackUsageArg = '-fstack-usage';
+ compiler.compiler.supportsStackUsageOutput = true;
+ }
+
if (this.hasSupport(options, '-emit-llvm')) {
compiler.compiler.supportsIrView = true;
compiler.compiler.irArg = ['-Xclang', '-emit-llvm', '-fsyntax-only'];