From 56e6b1428c954108f61f395758c77e9f3517e33a Mon Sep 17 00:00:00 2001 From: fanmingyu212 Date: Fri, 30 Sep 2022 22:53:34 -0700 Subject: [PATCH] llvm: change addr2line to symbolizer `llvm-addr2line` is not included as part of the llvm binary package for Windows. This causes ARTIQ python compilations issues when conda is not used (so the `llvm-tools` conda package is not installed, which provides `llvm-addr2line` currently). --- artiq/compiler/targets.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/artiq/compiler/targets.py b/artiq/compiler/targets.py index f25d8f77d..e2e0c1b24 100644 --- a/artiq/compiler/targets.py +++ b/artiq/compiler/targets.py @@ -91,7 +91,7 @@ class Target: tool_ld = "ld.lld" tool_strip = "llvm-strip" - tool_addr2line = "llvm-addr2line" + tool_symbolizer = "llvm-symbolizer" tool_cxxfilt = "llvm-cxxfilt" def __init__(self): @@ -218,8 +218,8 @@ class Target: # the backtrace entry should point at. last_inlined = None offset_addresses = [hex(addr - 1) for addr in addresses] - with RunTool([self.tool_addr2line, "--addresses", "--functions", "--inlines", - "--demangle", "--exe={library}"] + offset_addresses, + with RunTool([self.tool_symbolizer, "--addresses", "--functions", "--inlines", + "--demangle", "--output-style=GNU", "--exe={library}"] + offset_addresses, library=library) \ as results: lines = iter(results["__stdout__"].read().rstrip().split("\n")) @@ -275,7 +275,7 @@ class RV32IMATarget(Target): tool_ld = "ld.lld" tool_strip = "llvm-strip" - tool_addr2line = "llvm-addr2line" + tool_symbolizer = "llvm-symbolizer" tool_cxxfilt = "llvm-cxxfilt" class RV32GTarget(Target): @@ -288,7 +288,7 @@ class RV32GTarget(Target): tool_ld = "ld.lld" tool_strip = "llvm-strip" - tool_addr2line = "llvm-addr2line" + tool_symbolizer = "llvm-symbolizer" tool_cxxfilt = "llvm-cxxfilt" class CortexA9Target(Target): @@ -301,5 +301,5 @@ class CortexA9Target(Target): tool_ld = "ld.lld" tool_strip = "llvm-strip" - tool_addr2line = "llvm-addr2line" + tool_symbolizer = "llvm-symbolizer" tool_cxxfilt = "llvm-cxxfilt"