Add $$VERSION and $$PRERELEASE (#2751)

* Add 64507VERSION and 64507PRERELEASE

* Migrate to compiler define method

---------

Co-authored-by: Christoffer Lerno <christoffer@aegik.com>
This commit is contained in:
Kiana
2026-01-14 23:15:55 +01:00
committed by GitHub
parent d61beef7e0
commit 0a9d4e398d
2 changed files with 4 additions and 0 deletions

View File

@@ -14,6 +14,7 @@
- Generics using `@generic` rather than module based. - Generics using `@generic` rather than module based.
- Reduced memory usage for backtraces on Linux. - Reduced memory usage for backtraces on Linux.
- On win32 utf-8 console output is now enabled by default in compiled programs - On win32 utf-8 console output is now enabled by default in compiled programs
- Add `$$VERSION` and `$$PRERELEASE` compile time constants.
### Fixes ### Fixes
- Regression with npot vector in struct triggering an assert #2219. - Regression with npot vector in struct triggering an assert #2219.

View File

@@ -1522,6 +1522,9 @@ void compile()
setup_int_define("LLVM_VERSION", 0, type_int); setup_int_define("LLVM_VERSION", 0, type_int);
#endif #endif
setup_string_define("VERSION", COMPILER_VERSION);
setup_bool_define("PRERELEASE", PRERELEASE);
setup_bool_define("BENCHMARKING", compiler.build.benchmarking); setup_bool_define("BENCHMARKING", compiler.build.benchmarking);
setup_int_define("JMP_BUF_SIZE", jump_buffer_size(), type_int); setup_int_define("JMP_BUF_SIZE", jump_buffer_size(), type_int);
setup_bool_define("TESTING", compiler.build.testing); setup_bool_define("TESTING", compiler.build.testing);