From 496e5e4a2cce1dbdf093060cc37d76263af301e1 Mon Sep 17 00:00:00 2001 From: Daco Harkes Date: Mon, 25 Nov 2024 11:57:40 +0000 Subject: [PATCH] [native_toolchain_c] Compile with `-O3` by default --- pkgs/native_toolchain_c/lib/src/cbuilder/cbuilder.dart | 4 ++-- pkgs/native_toolchain_c/lib/src/cbuilder/clinker.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/native_toolchain_c/lib/src/cbuilder/cbuilder.dart b/pkgs/native_toolchain_c/lib/src/cbuilder/cbuilder.dart index c3a97f8b7..62ec22015 100644 --- a/pkgs/native_toolchain_c/lib/src/cbuilder/cbuilder.dart +++ b/pkgs/native_toolchain_c/lib/src/cbuilder/cbuilder.dart @@ -68,7 +68,7 @@ class CBuilder extends CTool implements Builder { super.language = Language.c, super.cppLinkStdLib, super.linkModePreference, - super.optimizationLevel = OptimizationLevel.oS, + super.optimizationLevel = OptimizationLevel.o3, }) : super(type: OutputType.library); CBuilder.executable({ @@ -89,7 +89,7 @@ class CBuilder extends CTool implements Builder { super.std, super.language = Language.c, super.cppLinkStdLib, - super.optimizationLevel = OptimizationLevel.oS, + super.optimizationLevel = OptimizationLevel.o3, }) : super( type: OutputType.executable, assetName: null, diff --git a/pkgs/native_toolchain_c/lib/src/cbuilder/clinker.dart b/pkgs/native_toolchain_c/lib/src/cbuilder/clinker.dart index 9a10f504a..b79174967 100644 --- a/pkgs/native_toolchain_c/lib/src/cbuilder/clinker.dart +++ b/pkgs/native_toolchain_c/lib/src/cbuilder/clinker.dart @@ -37,7 +37,7 @@ class CLinker extends CTool implements Linker { super.language = Language.c, super.cppLinkStdLib, super.linkModePreference, - super.optimizationLevel = OptimizationLevel.oS, + super.optimizationLevel = OptimizationLevel.o3, }) : super(type: OutputType.library); /// Runs the C Linker with on this C build spec.