make it possible to disable debug symbols stripping (flutter/engine#11265)

This commit is contained in:
xster 2019-08-26 16:53:00 -07:00 committed by GitHub
parent 3bd58ad50d
commit 6ef2c2bc87
3 changed files with 15 additions and 2 deletions

View File

@ -5,4 +5,5 @@
declare_args() {
shell_enable_vulkan = false
shell_enable_metal = false
stripped_symbols = true
}

View File

@ -306,9 +306,15 @@ action("icudtl_object") {
action("android") {
script = "//build/android/gyp/create_flutter_jar.py"
if (stripped_symbols) {
engine_library = "lib.stripped/libflutter.so"
} else {
engine_library = "libflutter.so"
}
inputs = [
"$root_build_dir/$embedding_jar_filename",
"$root_build_dir/lib.stripped/libflutter.so",
"$root_build_dir/$engine_library",
]
engine_artifact_id =
@ -329,7 +335,7 @@ action("android") {
"--dist_jar",
rebase_path(embedding_jar_filename, root_build_dir, root_build_dir),
"--native_lib",
rebase_path("lib.stripped/libflutter.so", root_build_dir, root_build_dir),
rebase_path("$engine_library", root_build_dir, root_build_dir),
"--android_abi",
"$android_app_abi",
]

View File

@ -264,6 +264,8 @@ def to_gn_args(args):
if args.build_glfw_shell:
gn_args['build_glfw_shell'] = True
gn_args['stripped_symbols'] = args.stripped
return gn_args
def parse_args(args):
@ -335,6 +337,10 @@ def parse_args(args):
parser.add_argument('--bitcode', default=False, action='store_true',
help='Enable bitcode for iOS targets. On debug runtime modes, this will be a marker only.')
parser.add_argument('--stripped', default=True, action='store_true',
help='Strip debug symbols from the output. This defaults to true and has no effect on iOS.')
parser.add_argument('--no-stripped', dest='stripped', action='store_false')
return parser.parse_args(args)
def main(argv):