lib/cocoapods-packager/symbols.rb in ty-cocoapods-packager-1.5.2 vs lib/cocoapods-packager/symbols.rb in ty-cocoapods-packager-1.5.3
- old
+ new
@@ -1,10 +1,11 @@
module Symbols
def symbols_from_library(library)
syms = `nm -gU #{library}`.split("\n")
result = classes_from_symbols(syms)
result += constants_from_symbols(syms)
+ result += variables_from_symbols(syms)
result.reject { |e| e == 'llvm.cmdline' || e == 'llvm.embedded.module' }
end
module_function :symbols_from_library
@@ -28,8 +29,16 @@
other_consts = other_consts.map! { |const| const.gsub(/^.* _/, '') }
consts + other_consts
end
+ def variables_from_symbols(syms)
+ variables = syms.select { |variable| variable[/ D /] }
+ variables = variables.select { |variable| variable !~ /l_OBJC|\.eh/ }
+ variables = variables.uniq
+ variables.map! { |variable| variable.gsub(/^.* _/, '') }
+ end
+
module_function :classes_from_symbols
module_function :constants_from_symbols
+ module_function :variables_from_symbols
end