authorgravatar for gwenzek@users.noreply.github.comGuillaume Wenzek <gwenzek@users.noreply.github.com> 2022-08-09 15:37:08+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-10-15 10:39:19-07:00
log85c6b0f0bcda2e3bb2dc5f3347e5c6712d268a39
tree8c4d96906ecb7fa8b8146240e5d672fdd7493778
parent65f860bef7995a6120e49606d549bdf154bca150

allow ptx kernel export


1 files changed, 6 insertions(+), 1 deletions(-)

src/Sema.zig+6-1
......@@ -21397,7 +21397,12 @@ fn validateExternType(
2139721397 },
2139821398 .Fn => {
2139921399 if (position != .other) return false;
21400 return !Type.fnCallingConventionAllowsZigTypes(ty.fnCallingConvention());
21400 return switch (ty.fnCallingConvention()) {
21401 // For now we want to authorize PTX kernel to use zig objects, even if we end up exposing the ABI.
21402 // The goal is to experiment with more integrated CPU/GPU code.
21403 .PtxKernel => true,
21404 else => !Type.fnCallingConventionAllowsZigTypes(ty.fnCallingConvention()),
21405 };
2140121406 },
2140221407 .Enum => {
2140321408 var buf: Type.Payload.Bits = undefined;