aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/clang.ts
diff options
context:
space:
mode:
authorOfek <ofekshilon@gmail.com>2024-03-16 09:15:57 +0200
committerGitHub <noreply@github.com>2024-03-16 09:15:57 +0200
commit0cdfa06d2ff697de9f923703db2a123c56e1c38b (patch)
tree83e894b5e96d45d66495f0d8b7d6643f88aa75ab /lib/compilers/clang.ts
parent44aa5769c859311bb6404b0a7cff809115bcf7fb (diff)
downloadcompiler-explorer-0cdfa06d2ff697de9f923703db2a123c56e1c38b.tar.gz
compiler-explorer-0cdfa06d2ff697de9f923703db2a123c56e1c38b.zip
Allow overriding clang demangler from properties (#6228)gh-10989
Specifically bpf uses group.bpf.demangler (gcc demangler) This fix continues #6114.
Diffstat (limited to 'lib/compilers/clang.ts')
-rw-r--r--lib/compilers/clang.ts11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/compilers/clang.ts b/lib/compilers/clang.ts
index dab518bc7..73d14531e 100644
--- a/lib/compilers/clang.ts
+++ b/lib/compilers/clang.ts
@@ -55,10 +55,13 @@ export class ClangCompiler extends BaseCompiler {
}
constructor(info: PreliminaryCompilerInfo, env) {
- // If a compiler-local llvm demangler exists - use it
- const demanglerPath = path.join(path.dirname(info.exe), 'llvm-cxxfilt');
- if (fs.existsSync(demanglerPath)) {
- info.demangler = demanglerPath;
+ // By default use the compiler-local llvm demangler, but allow overriding from config
+ // (for bpf)
+ if (info.demangler === undefined) {
+ const demanglerPath = path.join(path.dirname(info.exe), 'llvm-cxxfilt');
+ if (fs.existsSync(demanglerPath)) {
+ info.demangler = demanglerPath;
+ }
}
super(info, env);