@@ -56,7 +56,6 @@ abstract class AotAssemblyBase extends Target {
5656    }
5757
5858    final  List <String > extraGenSnapshotOptions =  decodeCommaSeparated (environment.defines, kExtraGenSnapshotOptions);
59-     final  bool  bitcode =  environment.defines[kBitcodeFlag] ==  'true' ;
6059    final  BuildMode  buildMode =  getBuildModeForName (environmentBuildMode);
6160    final  TargetPlatform  targetPlatform =  getTargetPlatformForName (environmentTargetPlatform);
6261    final  String ?  splitDebugInfo =  environment.defines[kSplitDebugInfo];
@@ -101,7 +100,6 @@ abstract class AotAssemblyBase extends Target {
101100        outputPath:  environment.fileSystem.path.join (buildOutputPath, getNameForDarwinArch (darwinArch)),
102101        darwinArch:  darwinArch,
103102        sdkRoot:  sdkRoot,
104-         bitcode:  bitcode,
105103        quiet:  true ,
106104        splitDebugInfo:  splitDebugInfo,
107105        dartObfuscation:  dartObfuscation,
@@ -287,9 +285,6 @@ abstract class UnpackIOS extends Target {
287285    if  (archs ==  null ) {
288286      throw  MissingDefineException (kIosArchs, name);
289287    }
290-     if  (environment.defines[kBitcodeFlag] ==  null ) {
291-       throw  MissingDefineException (kBitcodeFlag, name);
292-     }
293288    _copyFramework (environment, sdkRoot);
294289
295290    final  File  frameworkBinary =  environment.outputDir.childDirectory ('Flutter.framework' ).childFile ('Flutter' );
@@ -298,7 +293,9 @@ abstract class UnpackIOS extends Target {
298293      throw  Exception ('Binary $frameworkBinaryPath  does not exist, cannot thin' );
299294    }
300295    _thinFramework (environment, frameworkBinaryPath, archs);
301-     _bitcodeStripFramework (environment, frameworkBinaryPath);
296+     if  (buildMode ==  BuildMode .release) {
297+       _bitcodeStripFramework (environment, frameworkBinaryPath);
298+     }
302299    _signFramework (environment, frameworkBinaryPath, buildMode);
303300  }
304301
@@ -373,16 +370,14 @@ abstract class UnpackIOS extends Target {
373370    }
374371  }
375372
376-   /// Destructively strip bitcode from the framework, if needed. 
373+   /// Destructively strip bitcode from the framework. This can be removed 
374+   /// when the framework is no longer built with bitcode. 
377375   void  _bitcodeStripFramework (Environment  environment, String  frameworkBinaryPath) {
378-     if  (environment.defines[kBitcodeFlag] ==  'true' ) {
379-       return ;
380-     }
381376    final  ProcessResult  stripResult =  environment.processManager.runSync (< String > [
382377      'xcrun' ,
383378      'bitcode_strip' ,
384379      frameworkBinaryPath,
385-       '-m ' , // leave  the bitcode marker . 
380+       '-r ' , // Delete  the bitcode segment . 
386381      '-o' ,
387382      frameworkBinaryPath,
388383    ]);
@@ -669,7 +664,6 @@ Future<void> _createStubAppFramework(File outputFile, Environment environment,
669664      for  (String  arch in  iosArchNames ??  < String > {}) ...< String > ['-arch' , arch],
670665      stubSource.path,
671666      '-dynamiclib' ,
672-       '-fembed-bitcode-marker' ,
673667      // Keep version in sync with AOTSnapshotter flag 
674668      if  (environmentType ==  EnvironmentType .physical)
675669        '-miphoneos-version-min=11.0' 
0 commit comments