You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[dart2wasm] Add -O/--optimization-level flag to dart compile wasm
We make the meaning of -O{0,1,2,3,4} to be similar to what dart2js has.
We also make the pkg/dart2wasm/tool/compile_benchmark accept the same flags.
Follow-up CLs will migrate Dart CI / Golem / flutter to use -O flags.
Change-Id: Id37476c596ec7483e633c7db9eec96438315e919
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348165
Reviewed-by: Slava Egorov <[email protected]>
echo -en "$(sed -n "/$1 =/,/end of $1/ p"$SDK_DIR/pkg/dartdev/lib/src/commands/compile.dart | sed '1d'| sed '$d'| tr '\n'''| sed 's#\s\+# #g'| sed 's#^\s\+##'| sed 's#\s\+$##')"
@@ -83,40 +155,8 @@ if [ -z "$DART_FILE" -o -z "$WASM_FILE" ]; then
83
155
fi
84
156
85
157
86
-
functionfollow_links() {
87
-
file="$1"
88
-
while [ -h"$file" ];do
89
-
# On Mac OS, readlink -f doesn't work.
90
-
file="$(readlink "$file")"
91
-
done
92
-
echo"$file"
93
-
}
94
-
95
-
# Unlike $0, $BASH_SOURCE points to the absolute path of this file.
96
-
PROG_NAME="$(follow_links "$BASH_SOURCE")"
97
-
98
-
# Handle the case where dart-sdk/bin has been symlinked to.
99
-
PROG_DIR="$(cd "${PROG_NAME%/*}";pwd -P)"
100
-
SDK_DIR="$(cd "${PROG_DIR}/../../..";pwd -P)"
101
-
102
-
# Use same binaryen flags as `dart compile exe`
103
-
BINARYEN_FLAGS="$(sed -n '/binaryenFlags =/,/end of binaryenFlags/ p'$SDK_DIR/pkg/dartdev/lib/src/commands/compile.dart | sed '1d'| sed '$d'| tr '\n''')"
104
-
105
-
# Locate build directory, containing executables, snapshots and platform dill.
0 commit comments