mirror of
https://github.com/dart-lang/sdk
synced 2024-10-04 18:47:55 +00:00
Revert "[dart2wasm] Include wasm-opt in the shipped dart-sdk."
This reverts commit 6271d26baf
.
Reason for revert: The build is broken on linux-riscv64 with this change.
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 <kustermann@google.com>
> Commit-Queue: Jackson Gardner <jacksongardner@google.com>
> Reviewed-by: Aske Simon Christensen <askesc@google.com>
TBR=kustermann@google.com,askesc@google.com,joshualitt@google.com,jacksongardner@google.com,dart-scoped@luci-project-accounts.iam.gserviceaccount.com
Change-Id: I520d9be6d43b55551694a58a22c0ae8ae3e7344f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281802
Commit-Queue: William Hesse <whesse@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
This commit is contained in:
parent
896e535fe9
commit
a9fe60b1f9
|
@ -729,15 +729,6 @@ config("no_rtti") {
|
|||
}
|
||||
}
|
||||
|
||||
config("enable_exceptions") {
|
||||
if (is_win) {
|
||||
cflags_cc = [ "/EHsc" ]
|
||||
defines = [ "_HAS_EXCEPTIONS=1" ]
|
||||
} else if (is_clang) {
|
||||
cflags_cc = [ "-fexceptions" ]
|
||||
}
|
||||
}
|
||||
|
||||
# Optimization -----------------------------------------------------------------
|
||||
#
|
||||
# Note that BUILDCONFIG.gn sets up a variable "default_optimization_config"
|
||||
|
|
|
@ -8,7 +8,6 @@ is used to set up calls to tools used by the build that need wrappers.
|
|||
"""
|
||||
|
||||
import os
|
||||
import pathlib
|
||||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
|
@ -150,28 +149,7 @@ class WinTool(object):
|
|||
not line.startswith('Generating code') and
|
||||
not line.startswith('Finished generating code')):
|
||||
print(line)
|
||||
link_result = link.wait()
|
||||
|
||||
if link_result != 0:
|
||||
return link_result
|
||||
|
||||
# The toolchain configuration in gn always expects a .lib file to be
|
||||
# included in the output of the link step. However, this only happens
|
||||
# when the output has exports, and that is not always the case. In
|
||||
# order to satisfy the expected outputs, we create a dummy .lib file
|
||||
# in cases where the link step didn't actually create one.
|
||||
for arg in args:
|
||||
m = _LINK_EXE_OUT_ARG.match(arg)
|
||||
if m:
|
||||
output_filename = m.group('out')
|
||||
(basename, extension) = os.path.splitext(output_filename)
|
||||
if extension == '.exe':
|
||||
lib_path = pathlib.Path(basename + ".lib")
|
||||
if not os.path.exists(lib_path):
|
||||
lib_path.touch()
|
||||
break
|
||||
|
||||
return link_result
|
||||
return link.wait()
|
||||
|
||||
def ExecMidlWrapper(self, arch, outdir, tlb, h, dlldata, iid, proxy, idl,
|
||||
*flags):
|
||||
|
|
12
sdk/BUILD.gn
12
sdk/BUILD.gn
|
@ -27,7 +27,6 @@ declare_args() {
|
|||
dart_precompiled_runtime_stripped_binary = "dart_precompiled_runtime_product"
|
||||
gen_snapshot_stripped_binary = "gen_snapshot_product"
|
||||
analyze_snapshot_binary = "analyze_snapshot"
|
||||
wasm_opt_stripped_binary = "wasm-opt"
|
||||
}
|
||||
|
||||
# The directory layout of the SDK is as follows:
|
||||
|
@ -519,16 +518,6 @@ copy("copy_dart2wasm_snapshot") {
|
|||
[ "$root_out_dir/$dart_sdk_output/bin/snapshots/{{source_file_part}}" ]
|
||||
}
|
||||
|
||||
copy("copy_wasm_opt") {
|
||||
visibility = [ ":create_full_sdk" ]
|
||||
deps = [
|
||||
":copy_libraries",
|
||||
"../third_party/binaryen:wasm-opt",
|
||||
]
|
||||
sources = [ "$root_out_dir/${wasm_opt_stripped_binary}${executable_suffix}" ]
|
||||
outputs = [ "$root_out_dir/$dart_sdk_output/bin/utils/{{source_file_part}}" ]
|
||||
}
|
||||
|
||||
# Copies DDC's SDK full and outline .dill files to lib/_internal.
|
||||
copy("copy_dev_compiler_dills") {
|
||||
visibility = [ ":copy_dev_compiler_sdk" ]
|
||||
|
@ -766,7 +755,6 @@ group("create_full_sdk") {
|
|||
public_deps += [
|
||||
":copy_dart2wasm_platform",
|
||||
":copy_dart2wasm_snapshot",
|
||||
":copy_wasm_opt",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
4
third_party/binaryen/BUILD.gn
vendored
4
third_party/binaryen/BUILD.gn
vendored
|
@ -59,8 +59,6 @@ source_set("binaryen_sources") {
|
|||
|
||||
# Ensure generated config.h file is include path.
|
||||
include_dirs += [ "$target_gen_dir" ]
|
||||
|
||||
configs += [ "//build/config/compiler:enable_exceptions" ]
|
||||
}
|
||||
|
||||
template("wasm_tool") {
|
||||
|
@ -74,8 +72,6 @@ template("wasm_tool") {
|
|||
include_dirs = [ "src/src" ]
|
||||
deps = [ ":binaryen_sources" ]
|
||||
forward_variables_from(invoker, "*")
|
||||
|
||||
configs += [ "//build/config/compiler:enable_exceptions" ]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -300,7 +300,6 @@ def ToGnArgs(args, mode, arch, target_os, sanitizer, verify_sdk_hash):
|
|||
gn_args['gen_snapshot_stripped_binary'] = (
|
||||
'exe.stripped/gen_snapshot_product')
|
||||
gn_args['analyze_snapshot_binary'] = ('exe.stripped/analyze_snapshot')
|
||||
gn_args['wasm_opt_stripped_binary'] = 'exe.stripped/wasm-opt'
|
||||
|
||||
# Setup the user-defined sysroot.
|
||||
if UseSysroot(args, gn_args):
|
||||
|
|
Loading…
Reference in a new issue