aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/ldc.js
diff options
context:
space:
mode:
authorJohan Engelen <jbc.engelen@gmail.com>2021-05-27 20:14:25 +0200
committerGitHub <noreply@github.com>2021-05-27 20:14:25 +0200
commitb00511ea102a80b43c705b0149f25251276e7bfa (patch)
tree4246d615ad47efb75680882992d5f1562385ac97 /lib/compilers/ldc.js
parent49b64a469ba8fe58fe00c341d66988023734fb7a (diff)
downloadcompiler-explorer-b00511ea102a80b43c705b0149f25251276e7bfa.tar.gz
compiler-explorer-b00511ea102a80b43c705b0149f25251276e7bfa.zip
LDC: use -gline-tables-only instead of -g by default (#2687)
This changes the default LDC compile flag from `-g` to `-gline-tables-only`, such that the LLVM IR output does not contain `call void @llvm.dbg.declare` calls that (I think) most users are not interested in. The old behavior can be restored by the user by passing `-g` (I think users are much more familiar with the `-g` option than the `-gline-tables-only` option). Line information is preserved so users can still see what IR lines correspond to user code lines.
Diffstat (limited to 'lib/compilers/ldc.js')
-rw-r--r--lib/compilers/ldc.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/compilers/ldc.js b/lib/compilers/ldc.js
index 8e27790a3..23685156a 100644
--- a/lib/compilers/ldc.js
+++ b/lib/compilers/ldc.js
@@ -47,7 +47,7 @@ export class LDCCompiler extends BaseCompiler {
}
optionsForFilter(filters, outputFilename) {
- let options = ['-g', '-of', this.filename(outputFilename)];
+ let options = ['-gline-tables-only', '-of', this.filename(outputFilename)];
if (filters.intel && !filters.binary) options = options.concat('-x86-asm-syntax=intel');
if (!filters.binary) options = options.concat('-output-s');
return options;