Module: Teapot::Build::Linker
- Defined in:
- lib/teapot/build/linker.rb
Defined Under Namespace
Classes: UnsupportedPlatform
Class Method Summary collapse
Class Method Details
.link_static(environment, library_file, objects) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/teapot/build/linker.rb', line 29 def self.link_static(environment, library_file, objects) if RUBY_PLATFORM =~ /darwin/ Commands.run( environment[:libtool] || "libtool", "-static", "-o", library_file, objects, ) elsif RUBY_PLATFORM =~ /linux/ FileUtils.rm_rf library_file Commands.run( environment[:ar] || 'ar', environment[:arflags] || "-cru", library_file, objects ) else raise UnsupportedPlatform.new("Cannot determine linker for #{RUBY_PLATFORM}!") end end |