mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-26 15:07:14 +00:00
Build arguments for Tracy
This commit is contained in:
parent
4bc2510d3c
commit
b70983a0e4
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
|
@ -96,6 +96,11 @@
|
||||||
"target": "windows",
|
"target": "windows",
|
||||||
"args": ["-debug", "-DFEATURE_DEBUG_FUNCTIONS"]
|
"args": ["-debug", "-DFEATURE_DEBUG_FUNCTIONS"]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Windows / Debug (Tracy)",
|
||||||
|
"target": "windows",
|
||||||
|
"args": ["-debug", "-DFEATURE_DEBUG_TRACY", "-DFEATURE_DEBUG_FUNCTIONS"]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Linux / Debug",
|
"label": "Linux / Debug",
|
||||||
"target": "linux",
|
"target": "linux",
|
||||||
|
|
18
project.hxp
18
project.hxp
|
@ -149,6 +149,14 @@ class Project extends HXProject {
|
||||||
*/
|
*/
|
||||||
static final FEATURE_DEBUG_FUNCTIONS:FeatureFlag = "FEATURE_DEBUG_FUNCTIONS";
|
static final FEATURE_DEBUG_FUNCTIONS:FeatureFlag = "FEATURE_DEBUG_FUNCTIONS";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* `-DFEATURE_DEBUG_TRACY`
|
||||||
|
* If this flag is enabled, the game will have the necessary hooks for the Tracy profiler.
|
||||||
|
* Only enable this if you're using the correct fork of Haxe to support this.
|
||||||
|
* @see https://github.com/HaxeFoundation/hxcpp/pull/1153
|
||||||
|
*/
|
||||||
|
static final FEATURE_DEBUG_TRACY:FeatureFlag = "FEATURE_DEBUG_TRACY";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* `-DFEATURE_DISCORD_RPC`
|
* `-DFEATURE_DISCORD_RPC`
|
||||||
* If this flag is enabled, the game will enable the Discord Remote Procedure Call library.
|
* If this flag is enabled, the game will enable the Discord Remote Procedure Call library.
|
||||||
|
@ -516,6 +524,16 @@ class Project extends HXProject {
|
||||||
|
|
||||||
// Cleaner looking compiler errors.
|
// Cleaner looking compiler errors.
|
||||||
setHaxedef("message.reporting", "pretty");
|
setHaxedef("message.reporting", "pretty");
|
||||||
|
|
||||||
|
if (FEATURE_DEBUG_TRACY.isEnabled(this)) {
|
||||||
|
setHaxedef("HXCPP_TELEMETRY"); // Enable telemetry
|
||||||
|
setHaxedef("HXCPP_TRACY"); // Enable Tracy telemetry
|
||||||
|
setHaxedef("HXCPP_TRACY_MEMORY"); // Track memory allocations
|
||||||
|
setHaxedef("HXCPP_TRACY_ON_DEMAND"); // Only collect telemetry when Tracy is open and reachable
|
||||||
|
// setHaxedef("HXCPP_TRACY_INCLUDE_CALLSTACKS"); // Inspect callstacks per zone, inflating telemetry data
|
||||||
|
|
||||||
|
setHaxedef("absolute-paths"); // Fix source locations so Tracy can see them
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue