mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
put the built v8 at the front of the linker path in case we have a system wide copy of libv8
This commit is contained in:
parent
a312182d47
commit
c81ea28856
1 changed files with 5 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
require 'mkmf'
|
||||
require 'set'
|
||||
|
||||
UPSTREAM = File.expand_path(File.dirname(__FILE__) + "/upstream")
|
||||
BUILD = "#{UPSTREAM}/build/v8"
|
||||
|
@ -8,8 +9,7 @@ puts "Compiling V8"
|
|||
|
||||
system("cd #{UPSTREAM} && make") or raise "Error compiling V8"
|
||||
|
||||
dir_config('v8', "#{BUILD}/include", "#{BUILD}")
|
||||
have_library('v8') or raise "Unable to find libv8 in #{BUILD}, was there an error compiling it?"
|
||||
find_header('v8.h', "#{BUILD}/include")
|
||||
have_library('pthread')
|
||||
have_library('objc') if RUBY_PLATFORM =~ /darwin/
|
||||
|
||||
|
@ -17,6 +17,9 @@ $CPPFLAGS += " -Wall" unless $CPPFLAGS.split.include? "-Wall"
|
|||
$CPPFLAGS += " -g" unless $CPPFLAGS.split.include? "-g"
|
||||
$CPPFLAGS += " -rdynamic" unless $CPPFLAGS.split.include? "-rdynamic"
|
||||
|
||||
$DEFLIBPATH.unshift(BUILD)
|
||||
$LIBS << '-lv8'
|
||||
|
||||
CONFIG['LDSHARED'] = '$(CXX) -shared' unless RUBY_PLATFORM =~ /darwin/
|
||||
|
||||
create_makefile('v8')
|
||||
|
|
Loading…
Reference in a new issue