From b889fddcfab24152e9d964a4bda431a7e12f0d4a Mon Sep 17 00:00:00 2001 From: Nick Fisher Date: Fri, 21 Jun 2024 16:20:42 +0800 Subject: [PATCH] fix: exit build.dart early on Linux builds so we can use the package on a Linux host --- thermion_dart/hook/build.dart | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/thermion_dart/hook/build.dart b/thermion_dart/hook/build.dart index c5a0b361..4e550f53 100644 --- a/thermion_dart/hook/build.dart +++ b/thermion_dart/hook/build.dart @@ -22,6 +22,14 @@ void main(List args) async { var platform = config.targetOS.toString().toLowerCase(); + // 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 + // package itself on a Linux host(e.g. for dart_services backed), so if + // we detect that we're running on Linux, just exit here. + if (platform == "linux") { + return; + } + var libDir = config.dryRun ? "" : (await getLibDir(config, logger)).path; final packageName = config.packageName; @@ -81,7 +89,7 @@ void main(List args) async { } else { libs.add("stdc++"); } - final flags = []; //"-fsanitize=address"]; + final flags = []; //"-fsanitize=address"]; final defines = {}; var frameworks = [];