From ef11c9d3aeba40eda465ff703362fa1ef7f2f5d9 Mon Sep 17 00:00:00 2001 From: Jackson Gardner Date: Thu, 13 Apr 2023 21:08:29 -0700 Subject: [PATCH] Only set `dart_include_wasm_opt` when we are actually building the dart sdk. (flutter/engine#41175) Only set `dart_include_wasm_opt` when we are actually building the dart sdk. --- engine/src/flutter/tools/gn | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/src/flutter/tools/gn b/engine/src/flutter/tools/gn index 9dfc5bcad6e..5599b3c1c91 100755 --- a/engine/src/flutter/tools/gn +++ b/engine/src/flutter/tools/gn @@ -383,10 +383,6 @@ def to_gn_args(args): else: gn_args['dart_runtime_mode'] = runtime_mode - # If we are building the dart sdk in-tree, exclude the wasm-opt target, as - # it doesn't build properly with our gn configuration. - gn_args['dart_include_wasm_opt'] = False - # Desktop embeddings can have more dependencies than the engine library, # which can be problematic in some build environments (e.g., building on # Linux will bring in pkg-config dependencies at generation time). These @@ -494,6 +490,10 @@ def to_gn_args(args): 'source by setting `--no-prebuilt-dart-sdk` flag to tools/gn' ) elif is_host_build(args): + # If we are building the dart sdk in-tree, exclude the wasm-opt target, as + # it doesn't build properly with our gn configuration. + gn_args['dart_include_wasm_opt'] = False + # dart_platform_sdk is only defined for host builds, linux arm host builds # specify target_os=linux. # dart_platform_sdk=True means exclude web-related files, e.g. dart2js,