Skip to content

Commit 97d085c

Browse files
dcharkesCommit Queue
authored and
Commit Queue
committed
Revert "Reland "[dart2wasm] Include wasm-opt in the shipped dart-sdk.""
This reverts commit b190913. Reason for revert: This breaks the Flutter build. '../../third_party/dart/third_party/dart/third_party/binaryen/src/src/ir/memory-utils.cpp', needed by 'obj/third_party/dart/third_party/dart/third_party/binaryen/src/src/ir/binaryen_sources.memory-utils.o', missing and no known rule to make it Original change's description: > Reland "[dart2wasm] Include wasm-opt in the shipped dart-sdk." > > This is a reland of commit 6271d26 > > The change broke the gcc riscv64 builders, due to a `unused-variable` > warning coming from binaryen sources. That warning has now been > disabled for binaryen targets. > > Original change's description: > > [dart2wasm] Include wasm-opt in the shipped dart-sdk. > > > > Change-Id: Ib224f0b92fa28019ad3cf67d7ba2bef5c31b92ef > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280840 > > Reviewed-by: Martin Kustermann <[email protected]> > > Commit-Queue: Jackson Gardner <[email protected]> > > Reviewed-by: Aske Simon Christensen <[email protected]> > > Change-Id: I76bf4ad5d1f6a8116631df4b91cbc5a52cac4f31 > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283240 > Reviewed-by: Martin Kustermann <[email protected]> > Commit-Queue: Jackson Gardner <[email protected]> [email protected],[email protected],[email protected],[email protected],[email protected] Change-Id: Iee8e909d701d22abac00d199dee7591bf9bf5f7a No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283560 Reviewed-by: Daco Harkes <[email protected]> Reviewed-by: Martin Kustermann <[email protected]> Commit-Queue: Daco Harkes <[email protected]>
1 parent daab5d4 commit 97d085c

File tree

5 files changed

+4
-66
lines changed

5 files changed

+4
-66
lines changed

build/config/compiler/BUILD.gn

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -610,12 +610,12 @@ if (is_win) {
610610
default_warning_flags += [
611611
"-Wno-tautological-constant-compare",
612612
"-Wno-unused-but-set-variable", # icu
613+
"-Wno-unused-but-set-parameter", # binaryen
613614
"-Wno-deprecated-non-prototype", # zlib
614615
]
615616
} else {
616-
default_warning_flags += [
617-
"-Wno-ignored-qualifiers", # Warnings in BoringSSL headers
618-
]
617+
default_warning_flags +=
618+
[ "-Wno-ignored-qualifiers" ] # Warnings in BoringSSL headers
619619
}
620620

621621
if (is_mac) {
@@ -729,15 +729,6 @@ config("no_rtti") {
729729
}
730730
}
731731

732-
config("enable_exceptions") {
733-
if (is_win) {
734-
cflags_cc = [ "/EHsc" ]
735-
defines = [ "_HAS_EXCEPTIONS=1" ]
736-
} else if (is_clang) {
737-
cflags_cc = [ "-fexceptions" ]
738-
}
739-
}
740-
741732
# Optimization -----------------------------------------------------------------
742733
#
743734
# Note that BUILDCONFIG.gn sets up a variable "default_optimization_config"

build/toolchain/win/tool_wrapper.py

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"""
99

1010
import os
11-
import pathlib
1211
import re
1312
import shutil
1413
import subprocess
@@ -150,28 +149,7 @@ def ExecLinkWrapper(self, arch, use_separate_mspdbsrv, *args):
150149
not line.startswith('Generating code') and
151150
not line.startswith('Finished generating code')):
152151
print(line)
153-
link_result = link.wait()
154-
155-
if link_result != 0:
156-
return link_result
157-
158-
# The toolchain configuration in gn always expects a .lib file to be
159-
# included in the output of the link step. However, this only happens
160-
# when the output has exports, and that is not always the case. In
161-
# order to satisfy the expected outputs, we create a dummy .lib file
162-
# in cases where the link step didn't actually create one.
163-
for arg in args:
164-
m = _LINK_EXE_OUT_ARG.match(arg)
165-
if m:
166-
output_filename = m.group('out')
167-
(basename, extension) = os.path.splitext(output_filename)
168-
if extension == '.exe':
169-
lib_path = pathlib.Path(basename + ".lib")
170-
if not os.path.exists(lib_path):
171-
lib_path.touch()
172-
break
173-
174-
return link_result
152+
return link.wait()
175153

176154
def ExecMidlWrapper(self, arch, outdir, tlb, h, dlldata, iid, proxy, idl,
177155
*flags):

sdk/BUILD.gn

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ declare_args() {
2727
dart_precompiled_runtime_stripped_binary = "dart_precompiled_runtime_product"
2828
gen_snapshot_stripped_binary = "gen_snapshot_product"
2929
analyze_snapshot_binary = "analyze_snapshot"
30-
wasm_opt_stripped_binary = "wasm-opt"
3130
}
3231

3332
# The directory layout of the SDK is as follows:
@@ -519,16 +518,6 @@ copy("copy_dart2wasm_snapshot") {
519518
[ "$root_out_dir/$dart_sdk_output/bin/snapshots/{{source_file_part}}" ]
520519
}
521520

522-
copy("copy_wasm_opt") {
523-
visibility = [ ":create_full_sdk" ]
524-
deps = [
525-
":copy_libraries",
526-
"../third_party/binaryen:wasm-opt",
527-
]
528-
sources = [ "$root_out_dir/${wasm_opt_stripped_binary}${executable_suffix}" ]
529-
outputs = [ "$root_out_dir/$dart_sdk_output/bin/utils/{{source_file_part}}" ]
530-
}
531-
532521
# Copies DDC's SDK full and outline .dill files to lib/_internal.
533522
copy("copy_dev_compiler_dills") {
534523
visibility = [ ":copy_dev_compiler_sdk" ]
@@ -766,7 +755,6 @@ group("create_full_sdk") {
766755
public_deps += [
767756
":copy_dart2wasm_platform",
768757
":copy_dart2wasm_snapshot",
769-
":copy_wasm_opt",
770758
]
771759
}
772760
}

third_party/binaryen/BUILD.gn

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@
44

55
import("../../sdk_args.gni")
66

7-
config("binaryen_warnings") {
8-
if (is_clang) {
9-
cflags = [ "-Wno-unused-but-set-parameter" ]
10-
} else if (!is_win) {
11-
cflags = [ "-Wno-unused-variable" ]
12-
}
13-
}
14-
157
action("generate_needed_files") {
168
script = "generate_needed_files.py"
179

@@ -67,11 +59,6 @@ source_set("binaryen_sources") {
6759

6860
# Ensure generated config.h file is include path.
6961
include_dirs += [ "$target_gen_dir" ]
70-
71-
configs += [
72-
"//build/config/compiler:enable_exceptions",
73-
":binaryen_warnings",
74-
]
7562
}
7663

7764
template("wasm_tool") {
@@ -85,11 +72,6 @@ template("wasm_tool") {
8572
include_dirs = [ "src/src" ]
8673
deps = [ ":binaryen_sources" ]
8774
forward_variables_from(invoker, "*")
88-
89-
configs += [
90-
"//build/config/compiler:enable_exceptions",
91-
":binaryen_warnings",
92-
]
9375
}
9476
}
9577

tools/gn.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,6 @@ def ToGnArgs(args, mode, arch, target_os, sanitizer, verify_sdk_hash):
300300
gn_args['gen_snapshot_stripped_binary'] = (
301301
'exe.stripped/gen_snapshot_product')
302302
gn_args['analyze_snapshot_binary'] = ('exe.stripped/analyze_snapshot')
303-
gn_args['wasm_opt_stripped_binary'] = 'exe.stripped/wasm-opt'
304303

305304
# Setup the user-defined sysroot.
306305
if UseSysroot(args, gn_args):

0 commit comments

Comments
 (0)