mirror of https://github.com/m-labs/artiq.git
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).
This commit is contained in:
parent
b895846322
commit
56e6b1428c
|
@ -91,7 +91,7 @@ class Target:
|
||||||
|
|
||||||
tool_ld = "ld.lld"
|
tool_ld = "ld.lld"
|
||||||
tool_strip = "llvm-strip"
|
tool_strip = "llvm-strip"
|
||||||
tool_addr2line = "llvm-addr2line"
|
tool_symbolizer = "llvm-symbolizer"
|
||||||
tool_cxxfilt = "llvm-cxxfilt"
|
tool_cxxfilt = "llvm-cxxfilt"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
@ -218,8 +218,8 @@ class Target:
|
||||||
# the backtrace entry should point at.
|
# the backtrace entry should point at.
|
||||||
last_inlined = None
|
last_inlined = None
|
||||||
offset_addresses = [hex(addr - 1) for addr in addresses]
|
offset_addresses = [hex(addr - 1) for addr in addresses]
|
||||||
with RunTool([self.tool_addr2line, "--addresses", "--functions", "--inlines",
|
with RunTool([self.tool_symbolizer, "--addresses", "--functions", "--inlines",
|
||||||
"--demangle", "--exe={library}"] + offset_addresses,
|
"--demangle", "--output-style=GNU", "--exe={library}"] + offset_addresses,
|
||||||
library=library) \
|
library=library) \
|
||||||
as results:
|
as results:
|
||||||
lines = iter(results["__stdout__"].read().rstrip().split("\n"))
|
lines = iter(results["__stdout__"].read().rstrip().split("\n"))
|
||||||
|
@ -275,7 +275,7 @@ class RV32IMATarget(Target):
|
||||||
|
|
||||||
tool_ld = "ld.lld"
|
tool_ld = "ld.lld"
|
||||||
tool_strip = "llvm-strip"
|
tool_strip = "llvm-strip"
|
||||||
tool_addr2line = "llvm-addr2line"
|
tool_symbolizer = "llvm-symbolizer"
|
||||||
tool_cxxfilt = "llvm-cxxfilt"
|
tool_cxxfilt = "llvm-cxxfilt"
|
||||||
|
|
||||||
class RV32GTarget(Target):
|
class RV32GTarget(Target):
|
||||||
|
@ -288,7 +288,7 @@ class RV32GTarget(Target):
|
||||||
|
|
||||||
tool_ld = "ld.lld"
|
tool_ld = "ld.lld"
|
||||||
tool_strip = "llvm-strip"
|
tool_strip = "llvm-strip"
|
||||||
tool_addr2line = "llvm-addr2line"
|
tool_symbolizer = "llvm-symbolizer"
|
||||||
tool_cxxfilt = "llvm-cxxfilt"
|
tool_cxxfilt = "llvm-cxxfilt"
|
||||||
|
|
||||||
class CortexA9Target(Target):
|
class CortexA9Target(Target):
|
||||||
|
@ -301,5 +301,5 @@ class CortexA9Target(Target):
|
||||||
|
|
||||||
tool_ld = "ld.lld"
|
tool_ld = "ld.lld"
|
||||||
tool_strip = "llvm-strip"
|
tool_strip = "llvm-strip"
|
||||||
tool_addr2line = "llvm-addr2line"
|
tool_symbolizer = "llvm-symbolizer"
|
||||||
tool_cxxfilt = "llvm-cxxfilt"
|
tool_cxxfilt = "llvm-cxxfilt"
|
||||||
|
|
Loading…
Reference in New Issue