Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -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>
22 changes: 22 additions & 0 deletions runtime/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
Expand Down