Skip to content

Commit

Permalink
[native_toolchain_c] Compile with -O3 by default (#1747)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcharkes authored Nov 25, 2024
1 parent fccabe3 commit 028f89d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkgs/native_toolchain_c/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

- For Android, produce dylibs with page-size set to 16kb by default.
https://github.com/dart-lang/native/issues/1611
- Make optimization level configurable. Defaults to `-Os` and `/Os`.
- Make optimization level configurable. Defaults to `-3s` and `/O3`.
https://github.com/dart-lang/native/issues/1267

## 0.6.0
Expand Down
4 changes: 2 additions & 2 deletions pkgs/native_toolchain_c/lib/src/cbuilder/cbuilder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion pkgs/native_toolchain_c/lib/src/cbuilder/clinker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 028f89d

Please sign in to comment.