From 3e6c1ed8140f1033393104eb75eed08753d35e3c Mon Sep 17 00:00:00 2001 From: Kaushik Iska Date: Tue, 28 Jun 2022 13:30:19 -0400 Subject: [PATCH] [Impeller] Pass `--std=ios-metal1.2` only in opt mode (flutter/engine#34256) Passing this flag in unopt mode disables the debug symbols from being shown in xcode. fixes: https://github.com/flutter/flutter/issues/106066 --- .../flutter/impeller/tools/build_metal_library.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/engine/src/flutter/impeller/tools/build_metal_library.py b/engine/src/flutter/impeller/tools/build_metal_library.py index c23ac736f5..d78a2e5dcf 100644 --- a/engine/src/flutter/impeller/tools/build_metal_library.py +++ b/engine/src/flutter/impeller/tools/build_metal_library.py @@ -93,11 +93,6 @@ def main(): command += [ '--std=macos-metal1.2', ] - elif args.platform == 'ios': - command += [ - '--std=ios-metal1.2', - '-mios-version-min=10.0', - ] if args.optimize: command += [ @@ -106,6 +101,14 @@ def main(): # Allow aggressive, lossy floating-point optimizations. '-ffast-math', ] + if args.platform == 'ios': + # limiting to ios-metal1.2 disables shader debug symbols, only + # enabling these in optimize mode. + # see https://github.com/flutter/flutter/issues/106066 + command += [ + '--std=ios-metal1.2', + '-mios-version-min=10.0', + ] else: command += [ # Embeds both sources and driver options in the output. This aids in