diff --git a/impeller/renderer/backend/metal/context_mtl.mm b/impeller/renderer/backend/metal/context_mtl.mm index faedec8e5bf2b..b4effef0a3a2e 100644 --- a/impeller/renderer/backend/metal/context_mtl.mm +++ b/impeller/renderer/backend/metal/context_mtl.mm @@ -149,6 +149,9 @@ << shader_library_error.localizedDescription.UTF8String; return nil; } + if (!label.empty()) { + library.label = @(label.c_str()); + } [found_libraries addObject:library]; } return found_libraries; diff --git a/impeller/tools/build_metal_library.py b/impeller/tools/build_metal_library.py index 8556042e5c186..90d5fbf78451d 100644 --- a/impeller/tools/build_metal_library.py +++ b/impeller/tools/build_metal_library.py @@ -81,6 +81,8 @@ def main(): '-Oz', # Allow aggressive, lossy floating-point optimizations. '-ffast-math', + # Record symbols in a separate *.metallibsym file. + '-frecord-sources=flat', '-MF', args.depfile, '-o', @@ -97,7 +99,7 @@ def main(): elif args.platform == 'ios': command += [ '--std=ios-metal1.2', - '-mios-version-min=10.0', + '-mios-version-min=11.0', ] elif args.platform == 'ios-simulator': command += [ diff --git a/impeller/tools/impeller.gni b/impeller/tools/impeller.gni index 793d9f10dc814..2db7cb37877c4 100644 --- a/impeller/tools/impeller.gni +++ b/impeller/tools/impeller.gni @@ -130,8 +130,13 @@ template("metal_library") { inputs = invoker.sources metal_library_path = "$root_out_dir/shaders/$metal_library_name.metallib" + metal_library_symbols_path = + "$root_out_dir/shaders/$metal_library_name.metallibsym" - outputs = [ metal_library_path ] + outputs = [ + metal_library_path, + metal_library_symbols_path, + ] script = "//flutter/impeller/tools/build_metal_library.py"