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;