From a01bf3657621187cc5e47dd1b3b4b8029acb7eb9 Mon Sep 17 00:00:00 2001 From: Nick Fisher Date: Sat, 21 Jun 2025 10:14:43 +0800 Subject: [PATCH] use ENABLE_TRACING from user defines --- thermion_dart/hook/build.dart | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/thermion_dart/hook/build.dart b/thermion_dart/hook/build.dart index 69c5bf31..f53eaf52 100644 --- a/thermion_dart/hook/build.dart +++ b/thermion_dart/hook/build.dart @@ -26,7 +26,7 @@ void main(List args) async { final packageName = input.packageName; final outputDirectory = input.outputDirectory; final targetOS = config.code.targetOS; - + final targetArchitecture = config.code.targetArchitecture; var logPath = path.join( pkgRootFilePath, ".dart_tool", "thermion_dart", "log", "build.log"); @@ -125,12 +125,11 @@ void main(List args) async { final flags = []; //"-fsanitize=address"]; - final defines = { - // uncomment this to enable (very verbose) trace logging - "ENABLE_TRACING": input.userDefines["tracing"] == null ? "0" : "1" - }; + final defines = {}; - + if ((input.userDefines["tracing"] as String?)?.isNotEmpty == true) { + defines["ENABLE_TRACING"] = "1"; + } var frameworks = []; if (platform != "windows") {