make_game.py: NX2NAVI_GUEST_OPT=2 builds the lifted code at -O2.

With the lifted code built for the CPU's level, a profile on an RX 580 PC (Haswell-class CPU) has two game threads
running it nearly all the time and the replay thread idle a quarter of the time: the game's own code bounds the frame.
The lifted code is built at -O1 for build time; the environment variable NX2NAVI_GUEST_OPT=2 builds it at -O2 for a
player who will wait for the longer build. Part of each object's key, so changing it rebuilds the lifted code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Tobim6
2026-11-12 16:22:01 +01:00
parent f3a9d2967f
commit 8913ce1736

View File

@@ -1440,7 +1440,7 @@ def runtime_cmd(clang, clangxx, inc, level=0, fast=None, msys=None, first=()):
cc = [str(fast), f'--sysroot={msys}'] if guest and fast else [str(clangxx if cpp else clang)]
# -fdeclspec: third_party/ffx_api/ffx_api.h declares its entry points __declspec(dllexport) unconditionally
declspec = ['-fdeclspec'] if cpp and not WIN else []
return [*cc, '-c', '-std=gnu++17' if cpp else '-std=gnu11', '-O1' if guest else '-O2',
return [*cc, '-c', '-std=gnu++17' if cpp else '-std=gnu11', guest_opt if guest else '-O2',
*march, '-fno-strict-aliasing', '-w', *declspec, *([] if guest else first), *inc, '-o', str(dst), str(src)]
return cmd_for