mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 17:40:04 +00:00
Fix the snapshotter to generate valid precompilation snapshots
R=asiva@google.com Review URL: https://codereview.chromium.org/1673423004 .
This commit is contained in:
parent
14417a7851
commit
63e836ceae
|
@ -50,6 +50,10 @@ config("dart_config") {
|
|||
defines += ["NDEBUG"]
|
||||
}
|
||||
|
||||
if (is_ios || is_mac) {
|
||||
defines += ["DART_PRECOMPILER"]
|
||||
}
|
||||
|
||||
cflags = [
|
||||
"-Werror",
|
||||
"-Wall",
|
||||
|
|
|
@ -435,7 +435,11 @@ static Dart_Handle LoadSnapshotCreationScript(const char* script_name) {
|
|||
if (Dart_IsError(source)) {
|
||||
return source;
|
||||
}
|
||||
return Dart_LoadLibrary(resolved_script_uri, source, 0, 0);
|
||||
if (IsSnapshottingForPrecompilation()) {
|
||||
return Dart_LoadScript(resolved_script_uri, source, 0, 0);
|
||||
} else {
|
||||
return Dart_LoadLibrary(resolved_script_uri, source, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue