karl-zylinski / odin-raylib-hot-reload-game-template

An Odin + Raylib game template with Hot Reloading pre-setup. My game projects tend to have some things in common, so I made this template so I can get up and running quicker.
Other
134 stars 16 forks source link

Build release optimized for speed? #4

Closed alfredbaudisch closed 4 months ago

alfredbaudisch commented 4 months ago

Shouldn't build_release be optimized for speed with -o:speed? Maybe also -strict-style.

From https://github.com/odin-lang/Odin/wiki/Compiler-Flags

And from https://github.com/odin-lang/Odin/blob/76229cabfaf1f3fd973842b8e11e16c2e4e64896/src/main.cpp#L2000

print_usage_line(1, "-strict-style");
print_usage_line(2, "Errs on unneeded tokens, such as unneeded semicolons.");
print_usage_line(2, "Errs on missing trailing commas followed by a newline.");
print_usage_line(2, "Errs on deprecated syntax.");

I.e.:

odin build main_release -define:RAYLIB_SHARED=false -out:game_release.exe -no-bounds-check -subsystem:windows -o:speed -strict-style
karl-zylinski commented 4 months ago

Thank you, fixed in https://github.com/karl-zylinski/odin-raylib-hot-reload-game-template/commit/93548e226d4f825b49262d20f25f48c7dc8cc1a2 and https://github.com/karl-zylinski/odin-raylib-hot-reload-game-template/commit/813cfb1b541e037b1b1bbd8d20416bd3d64ebec2

I added the same vetting and strict checks as in the hot reload batch script. However, dynlib.initialize_symbols has an unused variable so I need to PR into odin and fix that one, so -vet-unused is disabled when building game.exe

alfredbaudisch commented 4 months ago

Cool, thanks :)