Skip to content

Commit d7cb202

Browse files
committed
fix: libtool error due to missing arch
1 parent 8d05500 commit d7cb202

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/cocoapods-packager/builder.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ def build_static_library_for_ios(output)
144144
static_libs = static_libs_in_sandbox('build') + static_libs_in_sandbox('build-sim') + vendored_libraries
145145
libs = ios_architectures.map do |arch|
146146
library = "#{@static_sandbox_root}/build/package-#{arch}.a"
147-
`libtool -arch_only #{arch} -static -o #{library} #{static_libs.join(' ')}`
148-
library
149-
end
150-
147+
`libtool -arch_only #{arch} -static -o #{library} #{static_libs.join(' ')} 2> /dev/null`
148+
library if File.exist?(library)
149+
end.compact
150+
151151
`lipo -create -output #{output} #{libs.join(' ')}`
152152
end
153153

@@ -290,7 +290,7 @@ def vendored_libraries
290290
libs = file_accessors.flat_map(&:vendored_static_frameworks).map { |f| f + f.basename('.*') } || []
291291
libs += file_accessors.flat_map(&:vendored_static_libraries)
292292
@vendored_libraries = libs.compact.map(&:to_s)
293-
puts "Final vendored libraries: #{@vendored_libraries}"
293+
puts "Vendored libraries: #{@vendored_libraries}"
294294

295295
@vendored_libraries
296296
end

0 commit comments

Comments
 (0)