diff --git a/lib/compilers/clang.ts b/lib/compilers/clang.ts index e41f64330..b7c60d5a3 100644 --- a/lib/compilers/clang.ts +++ b/lib/compilers/clang.ts @@ -144,22 +144,6 @@ export class ClangCompiler extends BaseCompiler { return super.runExecutable(executable, executeParameters, homeDir); } - forceDwarf4UnlessOverridden(options: string[]) { - const hasOverride = _.any(options, (option: string) => { - return option.includes('-gdwarf-') || option.includes('-fdebug-default-version='); - }); - - if (!hasOverride) return ['-gdwarf-4'].concat(options); - - return options; - } - - override optionsForFilter(filters: ParseFiltersAndOutputOptions, outputFilename: string, userOptions?: string[]) { - const options = super.optionsForFilter(filters, outputFilename); - - return this.forceDwarf4UnlessOverridden(options); - } - // Clang cross-compile with -stdlib=libc++ is currently (up to at least 18.1.0) broken: // https://github.com/llvm/llvm-project/issues/57104 // diff --git a/test/base-compiler-tests.ts b/test/base-compiler-tests.ts index 4bc149b8d..9ef330ed4 100644 --- a/test/base-compiler-tests.ts +++ b/test/base-compiler-tests.ts @@ -735,7 +735,7 @@ describe('Target hints', () => { const compiler = new ClangCompiler(noExecuteSupportCompilerInfo, ce); const args = - '-gdwarf-4 -g -o output.s -mllvm --x86-asm-syntax=intel -S --gcc-toolchain=/opt/compiler-explorer/gcc-13.2.0 -fcolor-diagnostics -fno-crash-diagnostics --target=riscv64 example.cpp -isystem/opt/compiler-explorer/libs/abseil'; + '-g -o output.s -mllvm --x86-asm-syntax=intel -S --gcc-toolchain=/opt/compiler-explorer/gcc-13.2.0 -fcolor-diagnostics -fno-crash-diagnostics --target=riscv64 example.cpp -isystem/opt/compiler-explorer/libs/abseil'; const argArray = splitArguments(args); const hint = compiler.getTargetHintFromCompilerArgs(argArray); expect(hint).toBe('riscv64'); diff --git a/test/tool-tests.ts b/test/tool-tests.ts index 99e531818..82cbe6a34 100644 --- a/test/tool-tests.ts +++ b/test/tool-tests.ts @@ -189,7 +189,6 @@ describe('CompilerDropInTool', () => { it('More toolchain magic', () => { const options = [ - '-gdwarf-4', '-g', '-o', 'output.s', @@ -213,7 +212,6 @@ describe('CompilerDropInTool', () => { it('Should be able to swap toolchain', () => { const exe = '/opt/compiler-explorer/clang-16.0.0/bin/clang++'; const options = [ - '-gdwarf-4', '-g', '-o', 'output.s', @@ -231,7 +229,6 @@ describe('CompilerDropInTool', () => { const replacedOptions = replaceToolchainArg(options, '/opt/compiler-explorer/gcc-11.1.0'); expect(replacedOptions).toEqual([ - '-gdwarf-4', '-g', '-o', 'output.s',