diff --git a/CHANGELOG.md b/CHANGELOG.md index 3057ceccd84b..d3d19966fdfd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## 3.4.4 + +This is a patch release that: + +- Fixes an issue where `const bool.fromEnvironment('dart.library.ffi')` is true + and conditional import condition `dart.library.ffi` is true in dart2wasm. + (issue [#55948]). + +[#55948]: https://github.com/dart-lang/sdk/issues/55948 + ## 3.4.3 - 2024-06-05 This is a patch release that: diff --git a/pkg/_js_interop_checks/lib/js_interop_checks.dart b/pkg/_js_interop_checks/lib/js_interop_checks.dart index 4cbd3363659d..33bfdd891c3b 100644 --- a/pkg/_js_interop_checks/lib/js_interop_checks.dart +++ b/pkg/_js_interop_checks/lib/js_interop_checks.dart @@ -85,6 +85,8 @@ class JsInteropChecks extends RecursiveVisitor { final ExportChecker exportChecker; final bool isDart2Wasm; + final List _disallowedInteropLibrariesInDart2Wasm; + /// Native tests to exclude from checks on external. // TODO(rileyporter): Use ExternalName from CFE to exclude native tests. static final List _allowedNativeTestPatterns = [ @@ -107,7 +109,7 @@ class JsInteropChecks extends RecursiveVisitor { // Negative lookahead to test the violation. RegExp( r'(? compileToModule(compiler.WasmCompilerOptions options, mode = wasm.Mode.regular; } final WasmTarget target = WasmTarget( - removeAsserts: !options.translatorOptions.enableAsserts, mode: mode); + enableExperimentalFfi: options.translatorOptions.enableExperimentalFfi, + removeAsserts: !options.translatorOptions.enableAsserts, + mode: mode); CompilerOptions compilerOptions = CompilerOptions() ..target = target ..sdkRoot = options.sdkPath diff --git a/pkg/dart2wasm/lib/dart2wasm.dart b/pkg/dart2wasm/lib/dart2wasm.dart index f4bf8141939c..06f65469d4d5 100644 --- a/pkg/dart2wasm/lib/dart2wasm.dart +++ b/pkg/dart2wasm/lib/dart2wasm.dart @@ -97,6 +97,9 @@ final List