Hi!
We’ve recently switched to the native X11 backend on Linux because we ran into an issue with the SDL/Wayland backend that prevents drag-and-drop operations from working correctly, particularly when dragging scripts.
While testing the X11 backend, we’ve encountered a few other Linux-specific issues. We’d like to help improve the engine by investigating these problems when we can and reporting reproducible bugs through GitHub issues, ideally with enough technical information to make them useful to the developers.
To help us with this task, we’d like to trace function calls using uftrace.
For this, we’d like to compile some parts of the engine with Clang’s: -finstrument-functions.
Ideally, we’d like to instrument only a specific module, or even better, a few specific source files such as Source/Engine/Platform/Linux/LinuxPlatform.cpp rather than instrumenting the whole engine.
We saw that Flax.Build exposes compilation options through BuildOptions / CompileEnv, so we were wondering what the recommended way to do this would be.
Is there a way from a .Build.cs file to:
-
add a custom compiler flag such as
-finstrument-functionsto a specific engine module; and/or -
add compiler flags only to selected
.cppfiles?
We’d prefer to do this through the normal Flax.Build configuration if possible, rather than modifying UnixToolchain.cs.
The goal is simply to temporarily instrument a small part of the engine and compare the function call traces between a working and a failing run.
How would you approach this with Flax.Build?
Thanks! ![]()