Class: Kompo::Packing::ForLinux
- Inherits:
-
Taski::Task
- Object
- Taski::Task
- Kompo::Packing::ForLinux
- Includes:
- CommonHelpers
- Defined in:
- lib/kompo/tasks/packing.rb
Overview
Linux implementation - compiles with gcc and pkg-config paths
Constant Summary collapse
- DYN_LINK_LIBS =
Libraries that must be dynamically linked
%w[pthread dl m c].freeze
Instance Method Summary collapse
Instance Method Details
#run ⇒ Object
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/kompo/tasks/packing.rb', line 159 def run work_dir = CollectDependencies.work_dir deps = CollectDependencies.deps ext_paths = CollectDependencies.ext_paths enc_files = CollectDependencies.enc_files @output_path = CollectDependencies.output_path command = build_command(work_dir, deps, ext_paths, enc_files) group('Compiling binary (Linux)') do system(*command) or raise 'Failed to compile final binary' puts "Binary size: #{File.size(@output_path) / 1024 / 1024} MB" end puts "Successfully created: #{@output_path}" end |