Module: Libv8::Node::Paths

Defined in:
ext/libv8-node/paths.rb

Class Method Summary collapse

Class Method Details

.configObject



26
27
28
# File 'ext/libv8-node/paths.rb', line 26

def config
  RbConfig::MAKEFILE_CONFIG
end

.include_pathsObject



10
11
12
# File 'ext/libv8-node/paths.rb', line 10

def include_paths
  [Shellwords.escape(File.join(vendored_source_path, 'include'))]
end

.object_pathsObject



14
15
16
17
18
19
20
# File 'ext/libv8-node/paths.rb', line 14

def object_paths
  [Shellwords.escape(File.join(vendored_source_path,
                               platform,
                               'libv8',
                               'obj',
                               "libv8_monolith.#{config['LIBEXT']}"))]
end

.platformObject



22
23
24
# File 'ext/libv8-node/paths.rb', line 22

def platform
  Gem::Platform.local.tap { |p| RUBY_PLATFORM =~ /musl/ && p.version.nil? && p.instance_eval { @version = 'musl' } }.to_s.gsub(/-darwin-?\d+/, '-darwin')
end

.vendored_source_pathObject



30
31
32
# File 'ext/libv8-node/paths.rb', line 30

def vendored_source_path
  File.expand_path('../../vendor/v8', __dir__)
end