do not optimize the test lib

else localFunction in test_local_function is likely inlined and the tests fail
This commit is contained in:
Lysann Tranvouez 2025-11-21 13:16:01 +01:00
parent ec870ef992
commit 701d6c78f2
2 changed files with 6 additions and 1 deletions

View file

@ -4,6 +4,9 @@
#include <mach_detours.h>
// Note that this file must be compiled without optimizations (or at least without inlining)
// else localFunction() calls below are likely going to be inlined at the call site, and detours will not work.
static int localFunctionCounter = 0;
int localFunction()
{