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:
parent
e1fbdb4162
commit
d18f479967
2 changed files with 6 additions and 3 deletions
|
@ -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:
|
||||
|
|
|
@ -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']
|
||||
|
|
Loading…
Add table
Reference in a new issue