Sha256: d141cc4795ee6785a6a99907b7003a40d52581187b99476cfbe3b67d660cb5a6
Contents?: true
Size: 1.82 KB
Versions: 1
Compression:
Stored size: 1.82 KB
Contents
require 'mkmf' require 'libv8' IS_DARWIN = RUBY_PLATFORM =~ /darwin/ have_library('pthread') have_library('objc') if IS_DARWIN $CPPFLAGS += " -Wall" unless $CPPFLAGS.split.include? "-Wall" $CPPFLAGS += " -g" unless $CPPFLAGS.split.include? "-g" $CPPFLAGS += " -rdynamic" unless $CPPFLAGS.split.include? "-rdynamic" $CPPFLAGS += " -fPIC" unless $CPPFLAGS.split.include? "-rdynamic" or IS_DARWIN $CPPFLAGS += " -std=c++0x" $CPPFLAGS += " -fpermissive" $CPPFLAGS += " -Wno-reserved-user-defined-literal" if IS_DARWIN MAC_OS_VERSION = begin if IS_DARWIN # note, RUBY_PLATFORM is hardcoded on compile, it can not be trusted # sw_vers can be trusted so use it `sw_vers -productVersion`.to_f rescue 0.0 else 0.0 end end $LDFLAGS.insert 0, MAC_OS_VERSION < 10.14 ? " -stdlib=libstdc++ " : " -stdlib=libc++ " if IS_DARWIN if ENV['CXX'] puts "SETTING CXX" CONFIG['CXX'] = ENV['CXX'] end CXX11_TEST = <<EOS #if __cplusplus <= 199711L # error A compiler that supports at least C++11 is required in order to compile this project. #endif EOS `echo "#{CXX11_TEST}" | #{CONFIG['CXX']} -std=c++0x -x c++ -E -` unless $?.success? warn <<EOS WARNING: C++11 support is required for compiling mini_racer. Please make sure you are using a compiler that supports at least C++11. Examples of such compilers are GCC 4.7+ and Clang 3.2+. If you are using Travis, consider either migrating your build to Ubuntu Trusty or installing GCC 4.8. See mini_racer's README.md for more information. EOS end CONFIG['LDSHARED'] = '$(CXX) -shared' unless IS_DARWIN if CONFIG['warnflags'] CONFIG['warnflags'].gsub!('-Wdeclaration-after-statement', '') CONFIG['warnflags'].gsub!('-Wimplicit-function-declaration', '') end if enable_config('debug') CONFIG['debugflags'] << ' -ggdb3 -O0' end Libv8.configure_makefile create_makefile 'mini_racer_extension'
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mini_racer-0.2.2 | ext/mini_racer_extension/extconf.rb |