feat: produce debug symbols on Windows

This commit is contained in:
Nick Fisher
2024-10-23 16:40:30 +11:00
parent d5824239f5
commit 73846ffa9b

View File

@@ -21,7 +21,9 @@ void main(List<String> args) async {
var platform = config.targetOS.toString().toLowerCase(); var platform = config.targetOS.toString().toLowerCase();
logger.info("Building Thermion for ${config.targetOS} in mode ${config.buildMode.name}"); if(!config.dryRun) {
logger.info("Building Thermion for ${config.targetOS} in mode ${config.buildMode.name}");
}
// We don't support Linux (yet), so the native/Filament libraries won't be // We don't support Linux (yet), so the native/Filament libraries won't be
// compiled/available. However, we still want to be able to run the Dart // compiled/available. However, we still want to be able to run the Dart
@@ -109,7 +111,7 @@ void main(List<String> args) async {
if (platform != "windows") { if (platform != "windows") {
flags.addAll(['-std=c++17']); flags.addAll(['-std=c++17']);
} else { } else if(!config.dryRun) {
defines["WIN32"] = "1"; defines["WIN32"] = "1";
defines["_DLL"] = "1"; defines["_DLL"] = "1";
if(config.buildMode == BuildMode.debug) { if(config.buildMode == BuildMode.debug) {
@@ -121,7 +123,7 @@ void main(List<String> args) async {
flags.addAll([ flags.addAll([
"/std:c++20", "/std:c++20",
if(config.buildMode == BuildMode.debug) if(config.buildMode == BuildMode.debug)
"/MDd", ...["/MDd","/Zi"],
if(config.buildMode == BuildMode.release) if(config.buildMode == BuildMode.release)
"/MD", "/MD",
"/VERBOSE", "/VERBOSE",
@@ -326,4 +328,4 @@ Future<Directory> getLibDir(BuildConfig config, Logger logger) async {
successToken.writeAsStringSync("SUCCESS"); successToken.writeAsStringSync("SUCCESS");
} }
return libDir; return libDir;
} }