Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sxychenjing
engine
提交
fcbfd1c1
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,发现更多精彩内容 >>
提交
fcbfd1c1
编写于
5月 09, 2016
作者:
J
Jason Simmons
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Clean up gn flags for the develop/profile/release runtime modes (#2667)
上级
e72539e6
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
27 addition
and
36 deletion
+27
-36
sky/tools/gn
sky/tools/gn
+24
-33
travis/analyze.sh
travis/analyze.sh
+2
-2
travis/build.sh
travis/build.sh
+1
-1
未找到文件。
sky/tools/gn
浏览文件 @
fcbfd1c1
...
...
@@ -11,31 +11,25 @@ import os
SRC_ROOT
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))))
def
get_out_dir
(
args
):
target_dir
=
''
if
args
.
target_os
==
'android'
:
target_dir
+=
'android_'
elif
args
.
target_os
==
'ios'
:
target_dir
+=
'ios_'
if
args
.
target_os
is
not
None
:
target_dir
=
[
args
.
target_os
]
else
:
target_dir
=
[
'host'
]
target_dir
.
append
(
args
.
runtime_mode
)
if
args
.
simulator
:
target_dir
+=
'sim_'
target_dir
.
append
(
'sim'
)
if
args
.
debug
:
target_dir
+=
'Debug'
else
:
target_dir
+=
'Release'
# Currently --develop does not change the out-dir.
if
not
args
.
develop
:
target_dir
+=
'_Deploy'
target_dir
.
append
(
'debug'
)
if
args
.
android_cpu
!=
'arm'
:
target_dir
+=
'_'
+
args
.
android_cpu
target_dir
.
append
(
args
.
android_cpu
)
if
args
.
ios_force_armv7
:
target_dir
+=
'_armv7'
target_dir
.
append
(
'armv7'
)
return
os
.
path
.
join
(
'out'
,
target_dir
)
return
os
.
path
.
join
(
'out'
,
'_'
.
join
(
target_dir
)
)
def
to_command_line
(
gn_args
):
def
merge
(
key
,
value
):
...
...
@@ -45,34 +39,40 @@ def to_command_line(gn_args):
return
[
merge
(
x
,
y
)
for
x
,
y
in
gn_args
.
iteritems
()]
def
to_gn_args
(
args
):
if
args
.
simulator
:
if
args
.
target_os
==
'android'
:
raise
Exception
(
'--simulator is not supported on Android'
)
elif
args
.
target_os
==
'ios'
:
if
args
.
runtime_mode
!=
'develop'
:
raise
Exception
(
'iOS simulator only supports develop mode'
)
gn_args
=
{}
gn_args
[
'is_debug'
]
=
args
.
debug
gn_args
[
'is_clang'
]
=
args
.
clang
and
args
.
target_os
not
in
[
'android'
]
ios_target_cpu
=
'arm64'
if
args
.
ios_force_armv7
:
ios_target_cpu
=
'arm'
aot
=
args
.
runtime_mode
!=
'develop'
if
args
.
target_os
==
'android'
:
gn_args
[
'target_os'
]
=
'android'
aot
=
not
args
.
develop
elif
args
.
target_os
==
'ios'
:
gn_args
[
'target_os'
]
=
'ios'
gn_args
[
'ios_deployment_target'
]
=
'7.0'
gn_args
[
'use_ios_simulator'
]
=
args
.
simulator
if
args
.
simulator
:
gn_args
[
'use_libjpeg_turbo'
]
=
False
aot
=
False
else
:
#
The iOS simulator snapshot is host targetted
#
Always use AOT on iOS devices until the interpreter stabilizes
aot
=
True
else
:
gn_args
[
'use_aura'
]
=
False
gn_args
[
'use_system_harfbuzz'
]
=
False
aot
=
False
gn_args
[
'dart_runtime_mode'
]
=
args
.
runtime_mode
if
args
.
target_os
==
'android'
:
gn_args
[
'target_cpu'
]
=
args
.
android_cpu
elif
args
.
target_os
==
'ios'
:
...
...
@@ -86,12 +86,6 @@ def to_gn_args(args):
gn_args
[
'flutter_aot'
]
=
aot
if
aot
:
gn_args
[
'dart_target_arch'
]
=
gn_args
[
'target_cpu'
]
if
args
.
debug
:
gn_args
[
'dart_runtime_mode'
]
=
'profile'
else
:
gn_args
[
'dart_runtime_mode'
]
=
'release'
else
:
gn_args
[
'dart_runtime_mode'
]
=
'develop'
gn_args
[
'dart_experimental_interpreter'
]
=
args
.
experimental_interpreter
...
...
@@ -126,13 +120,10 @@ def parse_args(args):
args
=
args
[
1
:]
parser
=
argparse
.
ArgumentParser
(
description
=
'A script run` gn gen`.'
)
parser
.
add_argument
(
'--debug'
,
default
=
True
,
action
=
'store_true'
)
parser
.
add_argument
(
'--release'
,
default
=
False
,
dest
=
'debug'
,
action
=
'store_false'
)
parser
.
add_argument
(
'--debug'
,
default
=
False
,
action
=
'store_true'
)
parser
.
add_argument
(
'--runtime-mode'
,
type
=
str
,
choices
=
[
'develop'
,
'profile'
,
'release'
],
default
=
'develop'
)
# 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
(
'--experimental-interpreter'
,
default
=
False
,
dest
=
'experimental_interpreter'
,
action
=
'store_true'
)
parser
.
add_argument
(
'--target-os'
,
type
=
str
,
choices
=
[
'android'
,
'ios'
])
...
...
travis/analyze.sh
浏览文件 @
fcbfd1c1
...
...
@@ -10,7 +10,7 @@ RESULTS=`dartanalyzer \
--strong-hints
\
--fatal-hints
\
--lints
\
out/
Debug/gen/sky/bindings/dart_ui.dart
\
out/
host_develop_debug/gen/sky/bindings/dart_ui.dart
\
2>&1
\
|
grep
-v
"
\[
error
\]
Target of URI does not exist: 'dart:mojo.internal'"
\
|
grep
-v
"
\[
error
\]
Native functions can only be declared in the SDK and code that is loaded through native extensions"
\
...
...
@@ -23,7 +23,7 @@ RESULTS=`dartanalyzer \
|
grep
-Ev
"Unused import .+dart_ui
\.
dart"
\
|
grep
-v
"
\[
info
\]
TODO"
\
|
grep
-Ev
"[0-9]+ errors.*found."
\
|
grep
-v
"Analyzing
\[
out/
D
ebug/gen/sky/bindings/dart_ui.dart
\]\.\.\.
"
`
|
grep
-v
"Analyzing
\[
out/
host_develop_d
ebug/gen/sky/bindings/dart_ui.dart
\]\.\.\.
"
`
echo
"
$RESULTS
"
if
[
-n
"
$RESULTS
"
]
;
...
...
travis/build.sh
浏览文件 @
fcbfd1c1
...
...
@@ -4,5 +4,5 @@ set -ex
PATH
=
"
$HOME
/depot_tools:
$PATH
"
sky/tools/gn
--debug
ninja
-C
out/
D
ebug generate_dart_ui
ninja
-C
out/
host_develop_d
ebug generate_dart_ui
travis/analyze.sh
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录