Skip to content

Commit

Permalink
Remove changes from rpoject.pbxproj, add -Wl flag
Browse files Browse the repository at this point in the history
  • Loading branch information
tboba committed Sep 21, 2023
1 parent dfa063c commit 1942fc3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 21 deletions.
6 changes: 3 additions & 3 deletions Example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ target 'ScreensExample' do
projects = installer.aggregate_targets
.map{ |t| t.user_project }
.uniq{ |p| p.path }
should_use_classic_linker = File.exists?(File.join(`xcode-select -p`.strip, 'Toolchains/XcodeDefault.xctoolchain/usr/bin/ld-classic'))
should_use_classic_linker = File.exist?(File.join(`xcode-select -p`.strip, 'Toolchains/XcodeDefault.xctoolchain/usr/bin/ld-classic'))
projects.each do |project|
if should_use_classic_linker
Pod::UI.puts("Applying -ld_classic for Xcode 15 on #{ project.path }")
Pod::UI.puts("Applying flags '-Wl -ld_classic' for Xcode 15 on #{ project.path }")
project.build_configurations.each do |config|
config.build_settings['OTHER_LDFLAGS'] = '$(inherited) -ld_classic'
config.build_settings['OTHER_LDFLAGS'] = '$(inherited) -Wl -ld_classic'
end
project.save()
end
Expand Down
8 changes: 0 additions & 8 deletions Example/ios/ScreensExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -941,10 +941,6 @@
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
"-ld_classic",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
};
Expand Down Expand Up @@ -1001,10 +997,6 @@
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
"-ld_classic",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
Expand Down
7 changes: 3 additions & 4 deletions FabricExample/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,15 @@ target 'FabricExample' do
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)


projects = installer.aggregate_targets
.map{ |t| t.user_project }
.uniq{ |p| p.path }
should_use_classic_linker = File.exists?(File.join(`xcode-select -p`.strip, 'Toolchains/XcodeDefault.xctoolchain/usr/bin/ld-classic'))
should_use_classic_linker = File.exist?(File.join(`xcode-select -p`.strip, 'Toolchains/XcodeDefault.xctoolchain/usr/bin/ld-classic'))
projects.each do |project|
if should_use_classic_linker
Pod::UI.puts("Applying -ld_classic for Xcode 15 on #{ project.path }")
Pod::UI.puts("Applying flags '-Wl -ld_classic' for Xcode 15 on #{ project.path }")
project.build_configurations.each do |config|
config.build_settings['OTHER_LDFLAGS'] = '$(inherited) -ld_classic'
config.build_settings['OTHER_LDFLAGS'] = '$(inherited) -Wl -ld_classic'
end
project.save()
end
Expand Down
6 changes: 3 additions & 3 deletions FabricTestExample/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ target 'FabricTestExample' do
projects = installer.aggregate_targets
.map{ |t| t.user_project }
.uniq{ |p| p.path }
should_use_classic_linker = File.exists?(File.join(`xcode-select -p`.strip, 'Toolchains/XcodeDefault.xctoolchain/usr/bin/ld-classic'))
should_use_classic_linker = File.exist?(File.join(`xcode-select -p`.strip, 'Toolchains/XcodeDefault.xctoolchain/usr/bin/ld-classic'))
projects.each do |project|
if should_use_classic_linker
Pod::UI.puts("Applying -ld_classic for Xcode 15 on #{ project.path }")
Pod::UI.puts("Applying flags '-Wl -ld_classic' for Xcode 15 on #{ project.path }")
project.build_configurations.each do |config|
config.build_settings['OTHER_LDFLAGS'] = '$(inherited) -ld_classic'
config.build_settings['OTHER_LDFLAGS'] = '$(inherited) -Wl -ld_classic'
end
project.save()
end
Expand Down
6 changes: 3 additions & 3 deletions TestsExample/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ target 'TestsExample' do
projects = installer.aggregate_targets
.map{ |t| t.user_project }
.uniq{ |p| p.path }
should_use_classic_linker = File.exists?(File.join(`xcode-select -p`.strip, 'Toolchains/XcodeDefault.xctoolchain/usr/bin/ld-classic'))
should_use_classic_linker = File.exist?(File.join(`xcode-select -p`.strip, 'Toolchains/XcodeDefault.xctoolchain/usr/bin/ld-classic'))
projects.each do |project|
if should_use_classic_linker
Pod::UI.puts("Applying -ld_classic for Xcode 15 on #{ project.path }")
Pod::UI.puts("Applying flags '-Wl -ld_classic' for Xcode 15 on #{ project.path }")
project.build_configurations.each do |config|
config.build_settings['OTHER_LDFLAGS'] = '$(inherited) -ld_classic'
config.build_settings['OTHER_LDFLAGS'] = '$(inherited) -Wl -ld_classic'
end
project.save()
end
Expand Down

0 comments on commit 1942fc3

Please sign in to comment.