Add flags to make App.framework work in app extension (#123618)

Add flags to make App.framework work in app extension
This commit is contained in:
Jenn Magder 2023-03-28 16:10:06 -07:00 committed by GitHub
parent f2fb1b598f
commit 6e5a530737
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 0 deletions

View file

@ -300,6 +300,7 @@ class AOTSnapshotter {
'-dynamiclib', '-dynamiclib',
'-Xlinker', '-rpath', '-Xlinker', '@executable_path/Frameworks', '-Xlinker', '-rpath', '-Xlinker', '@executable_path/Frameworks',
'-Xlinker', '-rpath', '-Xlinker', '@loader_path/Frameworks', '-Xlinker', '-rpath', '-Xlinker', '@loader_path/Frameworks',
'-fapplication-extension',
'-install_name', '@rpath/App.framework/App', '-install_name', '@rpath/App.framework/App',
'-o', appLib, '-o', appLib,
assemblyO, assemblyO,

View file

@ -677,6 +677,7 @@ Future<void> _createStubAppFramework(File outputFile, Environment environment,
'-miphonesimulator-version-min=11.0', '-miphonesimulator-version-min=11.0',
'-Xlinker', '-rpath', '-Xlinker', '@executable_path/Frameworks', '-Xlinker', '-rpath', '-Xlinker', '@executable_path/Frameworks',
'-Xlinker', '-rpath', '-Xlinker', '@loader_path/Frameworks', '-Xlinker', '-rpath', '-Xlinker', '@loader_path/Frameworks',
'-fapplication-extension',
'-install_name', '@rpath/App.framework/App', '-install_name', '@rpath/App.framework/App',
'-isysroot', sdkRoot, '-isysroot', sdkRoot,
'-o', outputFile.path, '-o', outputFile.path,

View file

@ -206,6 +206,7 @@ static const int Moo = 88;
'-dynamiclib', '-dynamiclib',
'-Xlinker', '-rpath', '-Xlinker', '@executable_path/Frameworks', '-Xlinker', '-rpath', '-Xlinker', '@executable_path/Frameworks',
'-Xlinker', '-rpath', '-Xlinker', '@loader_path/Frameworks', '-Xlinker', '-rpath', '-Xlinker', '@loader_path/Frameworks',
'-fapplication-extension',
'-install_name', '@rpath/App.framework/App', '-install_name', '@rpath/App.framework/App',
'-o', outputFile.path, '-o', outputFile.path,
]); ]);

View file

@ -40,6 +40,7 @@ const List<String> kDefaultClang = <String>[
'-rpath', '-rpath',
'-Xlinker', '-Xlinker',
'@loader_path/Frameworks', '@loader_path/Frameworks',
'-fapplication-extension',
'-install_name', '-install_name',
'@rpath/App.framework/App', '@rpath/App.framework/App',
'-o', '-o',

View file

@ -511,6 +511,7 @@ void main() {
'-rpath', '-rpath',
'-Xlinker', '-Xlinker',
'@loader_path/Frameworks', '@loader_path/Frameworks',
'-fapplication-extension',
'-install_name', '-install_name',
'@rpath/App.framework/App', '@rpath/App.framework/App',
'-o', '-o',

View file

@ -31,6 +31,7 @@ const List<String> _kSharedConfig = <String>[
'-rpath', '-rpath',
'-Xlinker', '-Xlinker',
'@loader_path/Frameworks', '@loader_path/Frameworks',
'-fapplication-extension',
'-install_name', '-install_name',
'@rpath/App.framework/App', '@rpath/App.framework/App',
'-isysroot', '-isysroot',
@ -95,6 +96,7 @@ void main() {
'-rpath', '-rpath',
'-Xlinker', '-Xlinker',
'@loader_path/Frameworks', '@loader_path/Frameworks',
'-fapplication-extension',
'-install_name', '-install_name',
'@rpath/App.framework/App', '@rpath/App.framework/App',
'-isysroot', '-isysroot',

View file

@ -385,6 +385,7 @@ void main() {
'-dynamiclib', '-dynamiclib',
'-Xlinker', '-rpath', '-Xlinker', '@executable_path/Frameworks', '-Xlinker', '-rpath', '-Xlinker', '@executable_path/Frameworks',
'-Xlinker', '-rpath', '-Xlinker', '@loader_path/Frameworks', '-Xlinker', '-rpath', '-Xlinker', '@loader_path/Frameworks',
'-fapplication-extension',
'-install_name', '@rpath/App.framework/App', '-install_name', '@rpath/App.framework/App',
'-o', '-o',
environment.buildDir environment.buildDir
@ -417,6 +418,7 @@ void main() {
'-dynamiclib', '-dynamiclib',
'-Xlinker', '-rpath', '-Xlinker', '@executable_path/Frameworks', '-Xlinker', '-rpath', '-Xlinker', '@executable_path/Frameworks',
'-Xlinker', '-rpath', '-Xlinker', '@loader_path/Frameworks', '-Xlinker', '-rpath', '-Xlinker', '@loader_path/Frameworks',
'-fapplication-extension',
'-install_name', '@rpath/App.framework/App', '-install_name', '@rpath/App.framework/App',
'-o', '-o',
environment.buildDir environment.buildDir
@ -474,6 +476,7 @@ void main() {
'xcrun', 'clang', '-arch', 'arm64', '-dynamiclib', '-Xlinker', '-rpath', 'xcrun', 'clang', '-arch', 'arm64', '-dynamiclib', '-Xlinker', '-rpath',
'-Xlinker', '@executable_path/Frameworks', '-Xlinker', '-rpath', '-Xlinker', '@executable_path/Frameworks', '-Xlinker', '-rpath',
'-Xlinker', '@loader_path/Frameworks', '-Xlinker', '@loader_path/Frameworks',
'-fapplication-extension',
'-install_name', '@rpath/App.framework/App', '-install_name', '@rpath/App.framework/App',
'-o', environment.buildDir.childFile('arm64/App.framework/App').path, '-o', environment.buildDir.childFile('arm64/App.framework/App').path,
environment.buildDir.childFile('arm64/snapshot_assembly.o').path, environment.buildDir.childFile('arm64/snapshot_assembly.o').path,
@ -482,6 +485,7 @@ void main() {
'xcrun', 'clang', '-arch', 'x86_64', '-dynamiclib', '-Xlinker', '-rpath', 'xcrun', 'clang', '-arch', 'x86_64', '-dynamiclib', '-Xlinker', '-rpath',
'-Xlinker', '@executable_path/Frameworks', '-Xlinker', '-rpath', '-Xlinker', '@executable_path/Frameworks', '-Xlinker', '-rpath',
'-Xlinker', '@loader_path/Frameworks', '-Xlinker', '@loader_path/Frameworks',
'-fapplication-extension',
'-install_name', '@rpath/App.framework/App', '-install_name', '@rpath/App.framework/App',
'-o', environment.buildDir.childFile('x86_64/App.framework/App').path, '-o', environment.buildDir.childFile('x86_64/App.framework/App').path,
environment.buildDir.childFile('x86_64/snapshot_assembly.o').path, environment.buildDir.childFile('x86_64/snapshot_assembly.o').path,