1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00

Don't hardcode g++ into build

This commit is contained in:
Charles Lowell 2015-07-12 14:12:50 -05:00
parent e1fbdb4162
commit d18f479967
2 changed files with 6 additions and 3 deletions

View file

@ -20,7 +20,7 @@ notifications:
before_install:
- gem update --system 2.1.11
script:
- CXX=g++-4.8 bundle exec rake compile
- bundle exec rake compile
- bundle exec rspec spec/c
sudo: false
addons:

View file

@ -1,5 +1,5 @@
require 'mkmf'
RbConfig::MAKEFILE_CONFIG['CXX'] = ENV['CXX'] if ENV['CXX']
cxx = RbConfig::MAKEFILE_CONFIG['CXX'] = ENV['CXX'] if ENV['CXX']
have_library('pthread')
have_library('objc') if RUBY_PLATFORM =~ /darwin/
@ -10,7 +10,10 @@ $CPPFLAGS += " -rdynamic" unless $CPPFLAGS.split.include? "-rdynamic" unless RUB
$CPPFLAGS += " -fPIC" unless $CPPFLAGS.split.include? "-rdynamic" or RUBY_PLATFORM =~ /darwin/
$CPPFLAGS += " -std=c++11"
$LDFLAGS += " -stdlib=libstdc++"
if cxx =~ /clang/
$LDFLAGS += " -stdlib=libstdc++"
end
CONFIG['LDSHARED'] = '$(CXX) -shared' unless RUBY_PLATFORM =~ /darwin/
if CONFIG['warnflags']