Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sxychenjing
engine
提交
7a5ec8d7
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,发现更多精彩内容 >>
未验证
提交
7a5ec8d7
编写于
6月 20, 2019
作者:
J
Jason Simmons
提交者:
GitHub
6月 20, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove build flags for dynamic patching (#9394)
上级
3b529929
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
10 addition
and
30 deletion
+10
-30
common/config.gni
common/config.gni
+1
-7
runtime/BUILD.gn
runtime/BUILD.gn
+1
-2
runtime/dart_vm.cc
runtime/dart_vm.cc
+3
-11
shell/common/shell_unittests.cc
shell/common/shell_unittests.cc
+2
-4
shell/common/switches.cc
shell/common/switches.cc
+3
-6
未找到文件。
common/config.gni
浏览文件 @
7a5ec8d7
...
...
@@ -15,7 +15,7 @@ if (target_cpu == "arm" || target_cpu == "arm64") {
}
declare_args() {
# The runtime mode ("debug", "profile",
"release", "dynamic_profile", or "dynamic_
release")
# The runtime mode ("debug", "profile",
or "
release")
flutter_runtime_mode = "debug"
}
...
...
@@ -25,8 +25,6 @@ feature_defines_list = [
"FLUTTER_RUNTIME_MODE_DEBUG=1",
"FLUTTER_RUNTIME_MODE_PROFILE=2",
"FLUTTER_RUNTIME_MODE_RELEASE=3",
"FLUTTER_RUNTIME_MODE_DYNAMIC_PROFILE=4",
"FLUTTER_RUNTIME_MODE_DYNAMIC_RELEASE=5",
]
if (flutter_runtime_mode == "debug") {
...
...
@@ -35,10 +33,6 @@ if (flutter_runtime_mode == "debug") {
feature_defines_list += [ "FLUTTER_RUNTIME_MODE=2" ]
} else if (flutter_runtime_mode == "release") {
feature_defines_list += [ "FLUTTER_RUNTIME_MODE=3" ]
} else if (flutter_runtime_mode == "dynamic_profile") {
feature_defines_list += [ "FLUTTER_RUNTIME_MODE=4" ]
} else if (flutter_runtime_mode == "dynamic_release") {
feature_defines_list += [ "FLUTTER_RUNTIME_MODE=5" ]
} else {
feature_defines_list += [ "FLUTTER_RUNTIME_MODE=0" ]
}
...
...
runtime/BUILD.gn
浏览文件 @
7a5ec8d7
...
...
@@ -85,8 +85,7 @@ source_set("runtime") {
public_configs = [ "$flutter_root:config" ]
if (flutter_runtime_mode != "release" &&
flutter_runtime_mode != "dynamic_release" && !is_fuchsia) {
if (flutter_runtime_mode != "release" && !is_fuchsia) {
# Only link in Observatory in non-release modes on non-Fuchsia. Fuchsia
# instead puts Observatory into the runner's package.
deps += [
...
...
runtime/dart_vm.cc
浏览文件 @
7a5ec8d7
...
...
@@ -37,8 +37,7 @@
namespace
dart
{
namespace
observatory
{
#if !OS_FUCHSIA && (FLUTTER_RUNTIME_MODE != FLUTTER_RUNTIME_MODE_RELEASE) && \
(FLUTTER_RUNTIME_MODE != FLUTTER_RUNTIME_MODE_DYNAMIC_RELEASE)
#if !OS_FUCHSIA && (FLUTTER_RUNTIME_MODE != FLUTTER_RUNTIME_MODE_RELEASE)
// These two symbols are defined in |observatory_archive.cc| which is generated
// by the |//third_party/dart/runtime/observatory:archive_observatory| rule.
...
...
@@ -48,8 +47,7 @@ extern unsigned int observatory_assets_archive_len;
extern
const
uint8_t
*
observatory_assets_archive
;
#endif // !OS_FUCHSIA && (FLUTTER_RUNTIME_MODE !=
// FLUTTER_RUNTIME_MODE_RELEASE) && (FLUTTER_RUNTIME_MODE !=
// FLUTTER_RUNTIME_MODE_DYNAMIC_RELEASE)
// FLUTTER_RUNTIME_MODE_RELEASE)
}
// namespace observatory
}
// namespace dart
...
...
@@ -143,8 +141,7 @@ bool DartFileModifiedCallback(const char* source_url, int64_t since_ms) {
void
ThreadExitCallback
()
{}
Dart_Handle
GetVMServiceAssetsArchiveCallback
()
{
#if (FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_RELEASE) || \
(FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DYNAMIC_RELEASE)
#if (FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_RELEASE)
return
nullptr
;
#elif OS_FUCHSIA
fml
::
UniqueFD
fd
=
fml
::
OpenFile
(
"pkg/data/observatory.tar"
,
false
,
...
...
@@ -303,11 +300,6 @@ DartVM::DartVM(std::shared_ptr<const DartVMData> vm_data,
// precompiled code only in the debug product mode.
bool
enable_asserts
=
!
settings_
.
disable_dart_asserts
;
#if FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DYNAMIC_PROFILE || \
FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DYNAMIC_RELEASE
enable_asserts
=
false
;
#endif
#if !OS_FUCHSIA
if
(
IsRunningPrecompiledCode
())
{
enable_asserts
=
false
;
...
...
shell/common/shell_unittests.cc
浏览文件 @
7a5ec8d7
...
...
@@ -222,8 +222,7 @@ TEST_F(ShellTest, BlacklistedDartVMFlag) {
fml
::
CommandLine
::
Option
(
"dart-flags"
,
"--verify_after_gc"
)};
fml
::
CommandLine
command_line
(
""
,
options
,
std
::
vector
<
std
::
string
>
());
#if FLUTTER_RUNTIME_MODE != FLUTTER_RUNTIME_MODE_RELEASE && \
FLUTTER_RUNTIME_MODE != FLUTTER_RUNTIME_MODE_DYNAMIC_RELEASE
#if FLUTTER_RUNTIME_MODE != FLUTTER_RUNTIME_MODE_RELEASE
// Upon encountering a non-whitelisted Dart flag the process terminates.
const
char
*
expected
=
"Encountered blacklisted Dart VM flag: --verify_after_gc"
;
...
...
@@ -241,8 +240,7 @@ TEST_F(ShellTest, WhitelistedDartVMFlag) {
fml
::
CommandLine
command_line
(
""
,
options
,
std
::
vector
<
std
::
string
>
());
flutter
::
Settings
settings
=
flutter
::
SettingsFromCommandLine
(
command_line
);
#if FLUTTER_RUNTIME_MODE != FLUTTER_RUNTIME_MODE_RELEASE && \
FLUTTER_RUNTIME_MODE != FLUTTER_RUNTIME_MODE_DYNAMIC_RELEASE
#if FLUTTER_RUNTIME_MODE != FLUTTER_RUNTIME_MODE_RELEASE
EXPECT_EQ
(
settings
.
dart_flags
.
size
(),
2u
);
EXPECT_EQ
(
settings
.
dart_flags
[
0
],
"--max_profile_depth 1"
);
EXPECT_EQ
(
settings
.
dart_flags
[
1
],
"--random_seed 42"
);
...
...
shell/common/switches.cc
浏览文件 @
7a5ec8d7
...
...
@@ -37,8 +37,7 @@ struct SwitchDesc {
#define DEF_SWITCHES_END };
// clang-format on
#if FLUTTER_RUNTIME_MODE != FLUTTER_RUNTIME_MODE_RELEASE && \
FLUTTER_RUNTIME_MODE != FLUTTER_RUNTIME_MODE_DYNAMIC_RELEASE
#if FLUTTER_RUNTIME_MODE != FLUTTER_RUNTIME_MODE_RELEASE
// List of common and safe VM flags to allow to be passed directly to the VM.
// clang-format off
...
...
@@ -118,8 +117,7 @@ const fml::StringView FlagForSwitch(Switch swtch) {
return
fml
::
StringView
();
}
#if FLUTTER_RUNTIME_MODE != FLUTTER_RUNTIME_MODE_RELEASE && \
FLUTTER_RUNTIME_MODE != FLUTTER_RUNTIME_MODE_DYNAMIC_RELEASE
#if FLUTTER_RUNTIME_MODE != FLUTTER_RUNTIME_MODE_RELEASE
static
bool
IsWhitelistedDartVMFlag
(
const
std
::
string
&
flag
)
{
for
(
uint32_t
i
=
0
;
i
<
fml
::
size
(
gDartFlagsWhitelist
);
++
i
)
{
...
...
@@ -294,8 +292,7 @@ Settings SettingsFromCommandLine(const fml::CommandLine& command_line) {
settings
.
use_test_fonts
=
command_line
.
HasOption
(
FlagForSwitch
(
Switch
::
UseTestFonts
));
#if FLUTTER_RUNTIME_MODE != FLUTTER_RUNTIME_MODE_RELEASE && \
FLUTTER_RUNTIME_MODE != FLUTTER_RUNTIME_MODE_DYNAMIC_RELEASE
#if FLUTTER_RUNTIME_MODE != FLUTTER_RUNTIME_MODE_RELEASE
command_line
.
GetOptionValue
(
FlagForSwitch
(
Switch
::
LogTag
),
&
settings
.
log_tag
);
std
::
string
all_dart_flags
;
if
(
command_line
.
GetOptionValue
(
FlagForSwitch
(
Switch
::
DartFlags
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录