Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Commit d1dd01d

Browse files
committed
Merge pull request #355 from cowboyd/limit-specs-to-c-and-clang
only run C spec compiled with Clang
2 parents ed089f2 + 3f1bde0 commit d1dd01d

2 files changed

Lines changed: 26 additions & 3 deletions

File tree

.travis.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,34 @@
1-
cache: bundler
1+
#cache: bundler
22
rvm:
33
- 2.1.0
44
- 2.0.0
55
- 1.9.3
66
- 1.9.2
77
- 1.8.7
88
- rbx-2.2.3
9+
matrix:
10+
allow_failures:
11+
- rvm: 1.9.3
12+
- rvm: 1.9.2
13+
- rvm: 1.8.7
14+
- rvm: rbx-2.2.3
15+
env:
16+
- CXX=g++-4.8
17+
- CXX=clang++
918
notifications:
1019
recipients:
1120
- cowboyd@thefrontside.net
1221
before_install:
1322
- gem update --system 2.1.11
14-
script: bundle exec rake compile spec
23+
script:
24+
- bundle exec rake compile
25+
- bundle exec rspec spec/c
26+
sudo: false
27+
addons:
28+
apt:
29+
sources:
30+
- ubuntu-toolchain-r-test
31+
packages:
32+
- gcc-4.8
33+
- g++-4.8
34+
- clang

ext/v8/extconf.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
require 'mkmf'
2+
cxx = RbConfig::MAKEFILE_CONFIG['CXX'] = ENV['CXX'] if ENV['CXX']
23

34
have_library('pthread')
45
have_library('objc') if RUBY_PLATFORM =~ /darwin/
@@ -9,7 +10,9 @@
910
$CPPFLAGS += " -fPIC" unless $CPPFLAGS.split.include? "-rdynamic" or RUBY_PLATFORM =~ /darwin/
1011
$CPPFLAGS += " -std=c++11"
1112

12-
$LDFLAGS += " -stdlib=libstdc++"
13+
if cxx =~ /clang/
14+
$LDFLAGS += " -stdlib=libstdc++"
15+
end
1316

1417
CONFIG['LDSHARED'] = '$(CXX) -shared' unless RUBY_PLATFORM =~ /darwin/
1518
if CONFIG['warnflags']

0 commit comments

Comments
 (0)