[clang] [WebAssembly] Enable musttail only when tail-call is enabled (PR #163618)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 23 06:24:11 PDT 2025
================
@@ -508,6 +509,10 @@ def TargetMicrosoftRecordLayout : TargetArch<["x86", "x86_64", "arm", "thumb",
let CustomCode = [{ Target.hasMicrosoftRecordLayout() }];
}
+def TargetMustTailAvaiable: TargetArch<!listconcat(TargetARM.Arches, TargetAArch64.Arches, TargetAnyX86.Arches, TargetWebAssembly.Arches, TargetPowerPC.Arches)> {
+ let CustomCode = [{ Target.hasMustTail() }];
+}
+
----------------
AaronBallman wrote:
This is close to what I was thinking, but I was going for something more like this:
```
def TargetMustTailAvaiable: TargetSpec {
let CustomCode = [{ Target.hasMustTail() }];
}
```
(so no need to list the architectures)
https://github.com/llvm/llvm-project/pull/163618
More information about the cfe-commits
mailing list