diff options
| author | Guillaume Wenzek <gwenzek@users.noreply.github.com> | 2022-08-09 15:37:08 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-10-15 10:39:19 -0700 |
| commit | 85c6b0f0bcda2e3bb2dc5f3347e5c6712d268a39 (patch) | |
| tree | 8c4d96906ecb7fa8b8146240e5d672fdd7493778 /src | |
| parent | 65f860bef7995a6120e49606d549bdf154bca150 (diff) | |
| download | zig-85c6b0f0bcda2e3bb2dc5f3347e5c6712d268a39.tar.gz zig-85c6b0f0bcda2e3bb2dc5f3347e5c6712d268a39.zip | |
allow ptx kernel export
Diffstat (limited to 'src')
| -rw-r--r-- | src/Sema.zig | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Sema.zig b/src/Sema.zig index 1b2bf84885..da3dea6125 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -21397,7 +21397,12 @@ fn validateExternType( }, .Fn => { if (position != .other) return false; - return !Type.fnCallingConventionAllowsZigTypes(ty.fnCallingConvention()); + return switch (ty.fnCallingConvention()) { + // For now we want to authorize PTX kernel to use zig objects, even if we end up exposing the ABI. + // The goal is to experiment with more integrated CPU/GPU code. + .PtxKernel => true, + else => !Type.fnCallingConventionAllowsZigTypes(ty.fnCallingConvention()), + }; }, .Enum => { var buf: Type.Payload.Bits = undefined; |
