提交 8f4a0a7c 编写于 作者: S shoryukenn 提交者: stuartmorgan

Support build windows release/profile embedding builds (#11475)

Fixes missing symbol errors in Windows release and profile builds due to different lookup approach on Windows.

Fixes https://github.com/flutter/flutter/issues/32746
上级 89cac5ab
......@@ -14,3 +14,4 @@ Victor Choueiri <victor@ctrlanddev.com>
Simon Lightfoot <simon@devangels.london>
Dwayne Slater <ds84182@gmail.com>
Tetsuhiro Ueda <najeira@gmail.com>
shoryukenn <naifu.guan@gmail.com>
......@@ -87,6 +87,28 @@ source_set("runtime") {
"//third_party/tonic",
]
# On Windows the engine finds the Dart snapshot data through symbols
# that are statically linked into the executable. On other platforms this
# data is obtained by a dynamic symbol lookup.
# The current Windows platform uses static-link instead of dynamic lookups.
# Because:
# 1. The size of the executable on Windows is not as concerned as on mobile
# platforms.
# 2. If it is a dynamic lookup method, you need to modify the properties of
# the memory page after the *.bin is dynamically loaded at runtime and
# mark it as executable. This is feasible (similar to V8 on Windows), but
# this increases the complexity of the implementation(These operations
# involve the use of some system file/memory privilege APIs and there is
# a risk of failure).
# 3. In the executable can enjoy the advantages of the windows preload
# mechanism, speed up I/O.
if (is_win) {
if (flutter_runtime_mode == "profile" ||
flutter_runtime_mode == "release") {
deps += [ "$flutter_root/lib/snapshot" ]
}
}
public_deps = [
"//third_party/rapidjson",
]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册