aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2020-10-29 10:24:03 +0100
committerLemonBoy <thatlemon@gmail.com>2020-11-20 22:32:43 +0100
commit9b7d9c72b09bc268338b66e708b33213bbaae675 (patch)
tree3f32d8bc68f22ee91388a618b9a6bc55e199a10a /lib
parent73be59433f36f5a8f5c7fa7bbffcb8eb17b1735d (diff)
downloadzig-9b7d9c72b09bc268338b66e708b33213bbaae675.tar.gz
zig-9b7d9c72b09bc268338b66e708b33213bbaae675.zip
stage1: Initial implementation of @extern
Diffstat (limited to 'lib')
-rw-r--r--lib/std/builtin.zig9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/std/builtin.zig b/lib/std/builtin.zig
index 20195bf5a5..fa6b2ab6b4 100644
--- a/lib/std/builtin.zig
+++ b/lib/std/builtin.zig
@@ -643,6 +643,15 @@ pub const ExportOptions = struct {
section: ?[]const u8 = null,
};
+/// This data structure is used by the Zig language code generation and
+/// therefore must be kept in sync with the compiler implementation.
+pub const ExternOptions = struct {
+ name: []const u8,
+ library_name: ?[]const u8 = null,
+ linkage: GlobalLinkage = .Strong,
+ is_thread_local: bool = false,
+};
+
/// This function type is used by the Zig language code generation and
/// therefore must be kept in sync with the compiler implementation.
pub const TestFn = struct {