mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-06-16 21:21:56 +08:00
switch to gnustl++, make sure to link it at the very end (after custom libs)
This commit is contained in:
committed by
Watson
parent
96a248a52c
commit
3d4efc754e
@@ -234,7 +234,7 @@ EOS
|
||||
App.info 'Create', libpayload_path
|
||||
FileUtils.mkdir_p(File.dirname(libpayload_path))
|
||||
sh "#{App.config.cc} #{App.config.cflags} -c \"#{payload_c}\" -o \"#{payload_o}\""
|
||||
sh "#{App.config.cxx} #{App.config.ldflags} \"#{payload_o}\" #{ruby_objs.map { |o, _| "\"" + o + "\"" }.join(' ')} -o \"#{libpayload_path}\" #{App.config.ldlibs} #{App.config.libs.join(' ')}"
|
||||
sh "#{App.config.cxx} #{App.config.ldflags} \"#{payload_o}\" #{ruby_objs.map { |o, _| "\"" + o + "\"" }.join(' ')} -o \"#{libpayload_path}\" #{App.config.ldlibs_pre} #{App.config.libs.join(' ')} #{App.config.ldlibs_post}"
|
||||
end
|
||||
|
||||
# Install native shared libraries.
|
||||
|
||||
@@ -325,9 +325,13 @@ module Motion; module Project;
|
||||
"#{versioned_datadir}/#{arch}"
|
||||
end
|
||||
|
||||
def ldlibs
|
||||
def ldlibs_pre
|
||||
# The order of the libraries matters here.
|
||||
"-L\"#{ndk_path}/platforms/android-#{api_version}/arch-arm/usr/lib\" -lstdc++ -lc -lm -llog -L\"#{versioned_arch_datadir}\" -lrubymotion-static -L#{ndk_path}/sources/cxx-stl/stlport/libs/armeabi -lstlport_static"
|
||||
"-L\"#{ndk_path}/platforms/android-#{api_version}/arch-arm/usr/lib\" -lstdc++ -lc -lm -llog -L\"#{versioned_arch_datadir}\" -lrubymotion-static"
|
||||
end
|
||||
|
||||
def ldlibs_post
|
||||
"-L#{ndk_path}/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi -lgnustl_static"
|
||||
end
|
||||
|
||||
def armeabi_directory_name
|
||||
|
||||
Reference in New Issue
Block a user