diff options
| author | Michael Dusan <michael.dusan@gmail.com> | 2023-09-24 02:57:03 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-09-24 14:44:15 -0700 |
| commit | 127198e58cb3dcf2d2287124cf15a23a7d3a9c02 (patch) | |
| tree | cfbb741d5acdb26cdcf7184ba0a8e4391e761c69 /lib/zig.h | |
| parent | fb6fff2561b5a56917e5efee4c374130189ab8b0 (diff) | |
| download | zig-127198e58cb3dcf2d2287124cf15a23a7d3a9c02.tar.gz zig-127198e58cb3dcf2d2287124cf15a23a7d3a9c02.zip | |
cbe: support more symbol attributes
implement codegen for:
- decl weak linkage
- decl aliases
- fn decl weak linkage
windows msvc:
- `__declspec(selectany)` is not supported for functions
- skip weak linkage for functions
closes #17050
Diffstat (limited to 'lib/zig.h')
| -rw-r--r-- | lib/zig.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -190,10 +190,13 @@ typedef char bool; #if zig_has_attribute(weak) || defined(zig_gnuc) #define zig_weak_linkage __attribute__((weak)) +#define zig_weak_linkage_fn __attribute__((weak)) #elif _MSC_VER #define zig_weak_linkage __declspec(selectany) +#define zig_weak_linkage_fn #else #define zig_weak_linkage zig_weak_linkage_unavailable +#define zig_weak_linkage_fn zig_weak_linkage_unavailable #endif #if zig_has_builtin(trap) |
