Skip to content

Commit

Permalink
Add flags to make App.framework work in app extension (#123618)
Browse files Browse the repository at this point in the history
Add flags to make App.framework work in app extension
  • Loading branch information
jmagman authored Mar 28, 2023
1 parent f2fb1b5 commit 6e5a530
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/flutter_tools/lib/src/base/build.dart
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ class AOTSnapshotter {
'-dynamiclib',
'-Xlinker', '-rpath', '-Xlinker', '@executable_path/Frameworks',
'-Xlinker', '-rpath', '-Xlinker', '@loader_path/Frameworks',
'-fapplication-extension',
'-install_name', '@rpath/App.framework/App',
'-o', appLib,
assemblyO,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,7 @@ Future<void> _createStubAppFramework(File outputFile, Environment environment,
'-miphonesimulator-version-min=11.0',
'-Xlinker', '-rpath', '-Xlinker', '@executable_path/Frameworks',
'-Xlinker', '-rpath', '-Xlinker', '@loader_path/Frameworks',
'-fapplication-extension',
'-install_name', '@rpath/App.framework/App',
'-isysroot', sdkRoot,
'-o', outputFile.path,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ static const int Moo = 88;
'-dynamiclib',
'-Xlinker', '-rpath', '-Xlinker', '@executable_path/Frameworks',
'-Xlinker', '-rpath', '-Xlinker', '@loader_path/Frameworks',
'-fapplication-extension',
'-install_name', '@rpath/App.framework/App',
'-o', outputFile.path,
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const List<String> kDefaultClang = <String>[
'-rpath',
'-Xlinker',
'@loader_path/Frameworks',
'-fapplication-extension',
'-install_name',
'@rpath/App.framework/App',
'-o',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,7 @@ void main() {
'-rpath',
'-Xlinker',
'@loader_path/Frameworks',
'-fapplication-extension',
'-install_name',
'@rpath/App.framework/App',
'-o',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const List<String> _kSharedConfig = <String>[
'-rpath',
'-Xlinker',
'@loader_path/Frameworks',
'-fapplication-extension',
'-install_name',
'@rpath/App.framework/App',
'-isysroot',
Expand Down Expand Up @@ -95,6 +96,7 @@ void main() {
'-rpath',
'-Xlinker',
'@loader_path/Frameworks',
'-fapplication-extension',
'-install_name',
'@rpath/App.framework/App',
'-isysroot',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ void main() {
'-dynamiclib',
'-Xlinker', '-rpath', '-Xlinker', '@executable_path/Frameworks',
'-Xlinker', '-rpath', '-Xlinker', '@loader_path/Frameworks',
'-fapplication-extension',
'-install_name', '@rpath/App.framework/App',
'-o',
environment.buildDir
Expand Down Expand Up @@ -417,6 +418,7 @@ void main() {
'-dynamiclib',
'-Xlinker', '-rpath', '-Xlinker', '@executable_path/Frameworks',
'-Xlinker', '-rpath', '-Xlinker', '@loader_path/Frameworks',
'-fapplication-extension',
'-install_name', '@rpath/App.framework/App',
'-o',
environment.buildDir
Expand Down Expand Up @@ -474,6 +476,7 @@ void main() {
'xcrun', 'clang', '-arch', 'arm64', '-dynamiclib', '-Xlinker', '-rpath',
'-Xlinker', '@executable_path/Frameworks', '-Xlinker', '-rpath',
'-Xlinker', '@loader_path/Frameworks',
'-fapplication-extension',
'-install_name', '@rpath/App.framework/App',
'-o', environment.buildDir.childFile('arm64/App.framework/App').path,
environment.buildDir.childFile('arm64/snapshot_assembly.o').path,
Expand All @@ -482,6 +485,7 @@ void main() {
'xcrun', 'clang', '-arch', 'x86_64', '-dynamiclib', '-Xlinker', '-rpath',
'-Xlinker', '@executable_path/Frameworks', '-Xlinker', '-rpath',
'-Xlinker', '@loader_path/Frameworks',
'-fapplication-extension',
'-install_name', '@rpath/App.framework/App',
'-o', environment.buildDir.childFile('x86_64/App.framework/App').path,
environment.buildDir.childFile('x86_64/snapshot_assembly.o').path,
Expand Down

0 comments on commit 6e5a530

Please sign in to comment.