diff options
| author | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2024-06-10 03:47:20 -0400 |
|---|---|---|
| committer | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2024-06-10 03:47:20 -0400 |
| commit | ff7fcb6d380d1e45402de2b2e0d2b577ad9f6d59 (patch) | |
| tree | 31cd2f33173e608f8995cc92ac3b29da1240850d /base/runtime | |
| parent | 5985c6e3df25dc693a554f824ba3d1d1f3b8086a (diff) | |
Add compilation-related constants
`ODIN_VERSION_HASH` is the `git` SHA hash of the commit the Odin
compiler was built with.
`ODIN_MICROARCH_STRING` is the string passed to `-microarch` when
the program was built.
`ODIN_OPTIMIZATION_MODE` is an enum value of which optimization mode was
used to build the program.
Diffstat (limited to 'base/runtime')
| -rw-r--r-- | base/runtime/core.odin | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/base/runtime/core.odin b/base/runtime/core.odin index 3e24060af..8671920f5 100644 --- a/base/runtime/core.odin +++ b/base/runtime/core.odin @@ -560,6 +560,19 @@ Odin_Platform_Subtarget_Type :: type_of(ODIN_PLATFORM_SUBTARGET) */ Odin_Sanitizer_Flags :: type_of(ODIN_SANITIZER_FLAGS) +/* + // Defined internally by the compiler + Odin_Optimization_Mode :: enum int { + None = -1, + Minimal = 0, + Size = 1, + Speed = 2, + Aggressive = 3, + } + + ODIN_OPTIMIZATION_MODE // is a constant +*/ +Odin_Optimization_Mode :: type_of(ODIN_OPTIMIZATION_MODE) ///////////////////////////// // Init Startup Procedures // |