mirror of
https://github.com/rubyjs/libv8
synced 2023-03-27 23:21:48 -04:00
account for different library locations
Apparently, GYP places the statically linked libs in different locations.
This commit is contained in:
parent
02bd61d7fa
commit
a0fe63d68d
3 changed files with 15 additions and 4 deletions
9
Rakefile
9
Rakefile
|
@ -7,6 +7,7 @@ RSpec::Core::RakeTask.new(:spec)
|
|||
V8_Version = Libv8::VERSION.gsub(/\.\d$/,'')
|
||||
V8_Source = File.expand_path '../vendor/v8', __FILE__
|
||||
|
||||
desc "setup the vendored v8 source to correspond to the libv8 gem version and prepare deps"
|
||||
task :checkout do
|
||||
sh "git submodule update --init"
|
||||
Dir.chdir(V8_Source) do
|
||||
|
@ -16,7 +17,14 @@ task :checkout do
|
|||
end
|
||||
end
|
||||
|
||||
desc "compile v8 via the ruby extension mechanism"
|
||||
task :compile do
|
||||
sh "ruby ext/libv8/extconf.rb"
|
||||
end
|
||||
|
||||
|
||||
desc "manually invoke the GYP compile. Useful for seeing debug output"
|
||||
task :manual_compile do
|
||||
Dir.chdir(V8_Source) do
|
||||
puts "compiling libv8"
|
||||
sh "make native GYP_GENERATORS=make"
|
||||
|
@ -41,6 +49,7 @@ end
|
|||
desc "clean up artifacts of the build"
|
||||
task :clean do
|
||||
sh "rm -rf pkg"
|
||||
sh "git clean -df"
|
||||
sh "cd #{V8_Source} && git clean -dxf"
|
||||
end
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
require 'mkmf'
|
||||
require 'pathname'
|
||||
create_makefile('libv8')
|
||||
|
||||
Dir.chdir(File.expand_path '../../../vendor/v8', __FILE__) do
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
require 'pathname'
|
||||
|
||||
require 'libv8/version'
|
||||
|
||||
module Libv8
|
||||
|
@ -7,7 +5,12 @@ module Libv8
|
|||
module_function
|
||||
|
||||
def libv8(name)
|
||||
File.expand_path "../../vendor/v8/out/native/libv8_#{name}.a", __FILE__
|
||||
path = File.expand_path "../../vendor/v8/out/native/libv8_#{name}.a", __FILE__
|
||||
if File.exists? path
|
||||
path
|
||||
else
|
||||
File.expand_path "../../vendor/v8/out/native/obj.target/tools/gyp/libv8_#{name}.a", __FILE__
|
||||
end
|
||||
end
|
||||
|
||||
def libv8_base
|
||||
|
|
Loading…
Add table
Reference in a new issue