Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sxychenjing
engine
提交
57043227
E
engine
项目概览
sxychenjing
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
57043227
编写于
4月 15, 2016
作者:
J
Jason Simmons
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add a --deploy build option that enables Dart product mode (#2598)
上级
68cc67f2
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
47 addition
and
7 deletion
+47
-7
DEPS
DEPS
+1
-1
sky/engine/config.gni
sky/engine/config.gni
+6
-0
sky/engine/core/core.gni
sky/engine/core/core.gni
+7
-2
sky/engine/core/script/dart_init.cc
sky/engine/core/script/dart_init.cc
+16
-4
sky/tools/gn
sky/tools/gn
+11
-0
sky/tools/sky_snapshot/BUILD.gn
sky/tools/sky_snapshot/BUILD.gn
+4
-0
sky/tools/sky_snapshot/vm.cc
sky/tools/sky_snapshot/vm.cc
+2
-0
未找到文件。
DEPS
浏览文件 @
57043227
...
...
@@ -25,7 +25,7 @@ vars = {
# Note: When updating the Dart revision, ensure that all entries that are
# dependencies of dart are also updated
'dart_revision': '
7060b6a07b74da52492be4469da5cd150a2ef940
',
'dart_revision': '
01c543cb0abadba28bec2fda8c72e2b8b431314d
',
'dart_observatory_packages_revision': 'cf90eb9077177d3d6b3fd5e8289477c2385c026a',
'dart_root_certificates_revision': 'aed07942ce98507d2be28cbd29e879525410c7fc',
...
...
sky/engine/config.gni
浏览文件 @
57043227
...
...
@@ -28,6 +28,8 @@ declare_args() {
} else {
sky_dart_strict_mode = false
}
flutter_develop_mode = false
}
# feature_defines_list ---------------------------------------------------------
...
...
@@ -56,3 +58,7 @@ if (sky_dart_strict_mode) {
if (sky_use_dart) {
feature_defines_list += [ "WTF_USE_DART=1" ]
}
if (flutter_develop_mode) {
feature_defines_list += [ "FLUTTER_DEVELOP_MODE=1" ]
}
sky/engine/core/core.gni
浏览文件 @
57043227
...
...
@@ -199,8 +199,6 @@ sky_core_files = [
"rendering/style/StyleVisualData.h",
"script/dart_controller.cc",
"script/dart_controller.h",
"script/dart_debugger.cc",
"script/dart_debugger.h",
"script/dart_init.cc",
"script/dart_init.h",
"script/dart_service_isolate.cc",
...
...
@@ -220,6 +218,13 @@ sky_core_files = [
"window/window.h",
]
if (flutter_develop_mode) {
sky_core_files += [
"script/dart_debugger.cc",
"script/dart_debugger.h",
]
}
core_dart_files = get_path_info([
"dart/compositing.dart",
"dart/hash_codes.dart",
...
...
sky/engine/core/script/dart_init.cc
浏览文件 @
57043227
...
...
@@ -325,6 +325,14 @@ bool IsRunningPrecompiledCode() {
#endif // DART_ALLOW_DYNAMIC_RESOLUTION
bool
IsDevelopMode
()
{
#ifdef FLUTTER_DEVELOP_MODE
return
true
;
#else
return
false
;
#endif
}
static
base
::
LazyInstance
<
std
::
unique_ptr
<
EmbedderTracingCallbacks
>>::
Leaky
g_tracing_callbacks
=
LAZY_INSTANCE_INITIALIZER
;
...
...
@@ -376,7 +384,7 @@ void InitDartVM() {
enable_checked_mode
=
true
;
#endif
if
(
IsRunningPrecompiledCode
())
{
if
(
IsRunningPrecompiledCode
()
||
!
IsDevelopMode
()
)
{
enable_checked_mode
=
false
;
}
...
...
@@ -387,9 +395,11 @@ void InitDartVM() {
// The version of the VM setup to run precompiled code does not recognize
// the mirrors or the background compilation flags. They are never enabled.
// Make sure we dont pass in unrecognized flags.
args
.
append
(
kDartMirrorsArgs
,
arraysize
(
kDartMirrorsArgs
));
args
.
append
(
kDartBackgroundCompilationArgs
,
arraysize
(
kDartBackgroundCompilationArgs
));
if
(
IsDevelopMode
())
{
args
.
append
(
kDartMirrorsArgs
,
arraysize
(
kDartMirrorsArgs
));
args
.
append
(
kDartBackgroundCompilationArgs
,
arraysize
(
kDartBackgroundCompilationArgs
));
}
}
else
{
args
.
append
(
kDartPrecompilationArgs
,
arraysize
(
kDartPrecompilationArgs
));
}
...
...
@@ -420,11 +430,13 @@ void InitDartVM() {
}
CHECK
(
Dart_SetVMFlags
(
args
.
size
(),
args
.
data
()));
#ifdef FLUTTER_DEVELOP_MODE
{
TRACE_EVENT0
(
"flutter"
,
"DartDebugger::InitDebugger"
);
// This should be called before calling Dart_Initialize.
DartDebugger
::
InitDebugger
();
}
#endif
DartUI
::
InitForGlobal
();
#ifdef OS_ANDROID
...
...
sky/tools/gn
浏览文件 @
57043227
...
...
@@ -27,6 +27,10 @@ def get_out_dir(args):
else
:
target_dir
+=
'Release'
# Currently --develop does not change the out-dir.
if
not
args
.
develop
:
target_dir
+=
'_Deploy'
if
args
.
ios_force_armv7
:
target_dir
+=
'_armv7'
...
...
@@ -44,6 +48,7 @@ def to_gn_args(args):
gn_args
[
'is_debug'
]
=
args
.
debug
gn_args
[
'is_clang'
]
=
args
.
clang
and
args
.
target_os
not
in
[
'android'
,
'fnl'
]
gn_args
[
'flutter_develop_mode'
]
=
args
.
develop
ios_target_cpu
=
'arm64'
if
args
.
ios_force_armv7
:
...
...
@@ -102,6 +107,7 @@ def to_gn_args(args):
gn_args
[
'enable_gcm'
]
=
args
.
enable_gcm
gn_args
[
'enable_google_sign_in'
]
=
args
.
enable_google_sign_in
gn_args
[
'use_glfw'
]
=
args
.
use_glfw
gn_args
[
'dart_product'
]
=
not
args
.
develop
return
gn_args
...
...
@@ -112,6 +118,11 @@ def parse_args(args):
parser
.
add_argument
(
'--debug'
,
default
=
True
,
action
=
'store_true'
)
parser
.
add_argument
(
'--release'
,
default
=
False
,
dest
=
'debug'
,
action
=
'store_false'
)
# Deploy is a placeholder for https://github.com/flutter/flutter/issues/3263
# Adding it now unblocks bot/tool work.
parser
.
add_argument
(
'--develop'
,
default
=
True
,
action
=
'store_true'
)
parser
.
add_argument
(
'--deploy'
,
default
=
False
,
dest
=
'develop'
,
action
=
'store_false'
)
parser
.
add_argument
(
'--target-os'
,
type
=
str
,
choices
=
[
'android'
,
'ios'
])
parser
.
add_argument
(
'--android'
,
dest
=
'target_os'
,
action
=
'store_const'
,
const
=
'android'
)
parser
.
add_argument
(
'--fnl'
,
dest
=
'target_os'
,
action
=
'store_const'
,
const
=
'fnl'
)
...
...
sky/tools/sky_snapshot/BUILD.gn
浏览文件 @
57043227
...
...
@@ -34,4 +34,8 @@ executable("sky_snapshot") {
"-lgcc_s",
]
}
if (flutter_develop_mode) {
defines = [ "FLUTTER_DEVELOP_MODE=1" ]
}
}
sky/tools/sky_snapshot/vm.cc
浏览文件 @
57043227
...
...
@@ -14,8 +14,10 @@ extern void* kDartIsolateSnapshotBuffer;
}
static
const
char
*
kDartArgs
[]
=
{
#ifdef FLUTTER_DEVELOP_MODE
"--enable_mirrors=false"
,
"--load_deferred_eagerly=true"
,
#endif
"--conditional_directives"
,
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录