".weak" symbols cannot be consumed by ptxas (PR21685). This patch makes the
weak directive in MCAsmPrinter customizable, and disables emitting ".weak"
symbols for NVPTX.
Details
Details
Diff Detail
Diff Detail
Event Timeline
include/llvm/MC/MCAsmInfo.h | ||
---|---|---|
269 | Does it default to .weak? |
Comment Actions
This looks fine for now, considering the same approach is taken for the .globl directive. That said, we really need a better way to handle this. Ptxas supports just enough GNU-style syntax to let us get by without a custom AsmStreamer in most cases, but not enough to avoid these annoying issues.
Comment Actions
Thanks Justin. Closed in r223077.
I totally agree with you. What do you think is a good long-term solution? I'm thinking of overriding EmitFunctionHeader to emit the format ptxas can consume.
Does it default to .weak?