andrewrk / HellOS

"hello world" x86 kernel example
271 stars 36 forks source link

HellOS patched to compile using Zig 0.6.0 #4

Closed peterhellberg closed 3 years ago

peterhellberg commented 4 years ago

Issue #3

Handles build failure due to @newStackCall being removed in 0.6.0

cubranic commented 4 years ago

BTW, is it possible to get the version string from the compiler as a compile-time constant rather than hard code "0.6.0" in the code?

peterhellberg commented 4 years ago

@cubranic Not sure, didn’t see anything under https://ziglang.org/documentation/master/#Compile-Variables but maybe there is some way to access https://github.com/ziglang/zig/blob/e26dda5308d5c853d195b65558454db4058ff218/src/config.zig.in#L1

andrewrk commented 3 years ago

@cubranic there is now: std.builtin.zig_version. It's of type std.SemanticVersion.