mirror of
https://github.com/ziglang/zig.git
synced 2026-01-15 20:05:16 +00:00
To unify the wasm backend with the other backends, we will now call `generateSymbol` to lower a Decl into bytes. This means we also have to change some function signatures to comply with the linker interface. Since the general purpose generateSymbol is less featureful than wasm's, some tests are temporarily disabled.
24 lines
724 B
Zig
24 lines
724 B
Zig
const builtin = @import("builtin");
|
|
const nrfx_uart_t = extern struct {
|
|
p_reg: [*c]u32,
|
|
drv_inst_idx: u8,
|
|
};
|
|
|
|
pub fn nrfx_uart_rx(p_instance: [*c]const nrfx_uart_t) void {
|
|
_ = p_instance;
|
|
}
|
|
|
|
threadlocal var g_uart0 = nrfx_uart_t{
|
|
.p_reg = 0,
|
|
.drv_inst_idx = 0,
|
|
};
|
|
|
|
test "reference a global threadlocal variable" {
|
|
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
|
|
if (builtin.zig_backend == .stage2_c) return error.SkipZigTest;
|
|
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
|
|
if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
|
|
if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;
|
|
_ = nrfx_uart_rx(&g_uart0);
|
|
}
|