diff options
Diffstat (limited to 'src/stage1/zig0.cpp')
| -rw-r--r-- | src/stage1/zig0.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/stage1/zig0.cpp b/src/stage1/zig0.cpp index 6b55d97fac..73f5b4f685 100644 --- a/src/stage1/zig0.cpp +++ b/src/stage1/zig0.cpp @@ -18,6 +18,11 @@ #include "buffer.hpp" #include "os.hpp" +// This is the only file allowed to include config.h because config.h is +// only produced when building with cmake. When using the zig build system, +// zig0.cpp is never touched. +#include "config.h" + #include <stdio.h> #include <string.h> @@ -537,3 +542,11 @@ const char *stage2_add_link_lib(struct ZigStage1 *stage1, { return nullptr; } + +const char *stage2_version_string(void) { + return ZIG_VERSION_STRING; +} + +struct Stage2SemVer stage2_version(void) { + return {ZIG_VERSION_MAJOR, ZIG_VERSION_MINOR, ZIG_VERSION_PATCH}; +} |
