Sha256: 918ab5db464ae6efbab971a19caa2adbe9e75225c417d5e85993acdf61425851

Contents?: true

Size: 848 Bytes

Versions: 6

Compression:

Stored size: 848 Bytes

Contents

require 'rbconfig'
require 'shellwords'

module Libv8; end

module Libv8::Node
  module Paths
    module_function

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

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

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

    def config
      RbConfig::MAKEFILE_CONFIG
    end

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
libv8-node-17.9.1.0-aarch64-linux-musl ext/libv8-node/paths.rb
libv8-node-17.9.1.0-aarch64-linux ext/libv8-node/paths.rb
libv8-node-17.9.1.0-arm64-darwin ext/libv8-node/paths.rb
libv8-node-17.9.1.0-x86_64-linux-musl ext/libv8-node/paths.rb
libv8-node-17.9.1.0-x86_64-linux ext/libv8-node/paths.rb
libv8-node-17.9.1.0-x86_64-darwin ext/libv8-node/paths.rb