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

only run C spec compiled with Clang #355

Merged
merged 17 commits into from
Jul 13, 2015

Conversation

cowboyd
Copy link
Collaborator

@cowboyd cowboyd commented Jul 12, 2015

In order to make sure we have valid failures on this branch, and not
just a bunch of false negatives, we're only running the C specs, and
building with clang. Eventually, we'll merge in support for gcc and more
of the test suite.

For now, we want to only include the specs we things should be passing

In order to make sure we have valid failures on this branch, and not
just a bunch of false negatives, we're only running the C specs, and
building with clang. Eventually, we'll merge in support for gcc and more
of the test suite.

For now, we want to only include the specs we things should be passing
We can decide whether to backport later
@cowboyd
Copy link
Collaborator Author

cowboyd commented Jul 12, 2015

I am defeated.

@ignisf maybe you can show me where I'm being stupid here. I'm just tring to get it to use either g++-4.8 or a modern version of clang, but I can't seem to have the compile actually use either one of those.

@ignisf
Copy link
Collaborator

ignisf commented Jul 12, 2015

Will check it out

@ignisf
Copy link
Collaborator

ignisf commented Jul 12, 2015

I don't believe mkmf takes into account the C and CXX environment variables. I believe it uses the same compiler Ruby was compiled with. You can override by adding

RbConfig::MAKEFILE_CONFIG['CXX'] = ENV['CXX'] if ENV['CXX']

after requre 'mkmf' in extconf.rb.

Also there's a clang-compiled ruby version in Travis, I think.

@cowboyd
Copy link
Collaborator Author

cowboyd commented Jul 13, 2015

Looks like the libv8 binary I'm using is corrupted. It could be that it's using absolute paths for the objects in the archive. I seem to recall us running into this issue before. I can't remember the fix, but it's generating correctly in osx.

vagrant@vagrant:~/libv8/vendor/v8$ ar t out/x64.release/obj.target/tools/gyp/libv8_base.a
/home/vagrant/libv8/vendor/v8/out/x64.release/obj.target/v8_base/src/accessors.o
/home/vagrant/libv8/vendor/v8/out/x64.release/obj.target/v8_base/src/allocation.o
/home/vagrant/libv8/vendor/v8/out/x64.release/obj.target/v8_base/src/allocation-site-scopes.o
/home/vagrant/libv8/vendor/v8/out/x64.release/obj.target/v8_base/src/allocation-tracker.o
/home/vagrant/libv8/vendor/v8/out/x64.release/obj.target/v8_base/src/api.o
/home/vagrant/libv8/vendor/v8/out/x64.release/obj.target/v8_base/src/api-natives.o
/home/vagrant/libv8/vendor/v8/out/x64.release/obj.target/v8_base/src/arguments.o
/home/vagrant/libv8/vendor/v8/out/x64.release/obj.target/v8_base/src/assembler.o
/home/vagrant/libv8/vendor/v8/out/x64.release/obj.target/v8_base/src/assert-scope.o
/home/vagrant/libv8/vendor/v8/out/x64.release/obj.target/v8_base/src/ast-value-factory.o
/home/vagrant/libv8/vendor/v8/out/x64.release/obj.target/v8_base/src/ast-literal-reindexer.o
/home/vagrant/libv8/vendor/v8/out/x64.release/obj.target/v8_base/src/ast-numbering.o
/home/vagrant/libv8/vendor/v8/out/x64.release/obj.target/v8_base/src/ast.o
/home/vagrant/libv8/vendor/v8/out/x64.release/obj.target/v8_base/src/background-parsing-task.o
/home/vagrant/libv8/vendor/v8/out/x64.release/obj.target/v8_base/src/bailout-reason.o
/home/vagrant/libv8/vendor/v8/out/x64.release/obj.target/v8_base/src/basic-block-profiler.o
/home/vagrant/libv8/vendor/v8/out/x64.release/obj.target/v8_base/src/bignum-dtoa.o
/home/vagrant/libv8/vendor/v8/out/x64.release/obj.target/v8_base/src/bignum.o
/home/vagrant/libv8/vendor/v8/out/x64.release/obj.target/v8_base/src/bit-vector.o
......

@cowboyd
Copy link
Collaborator Author

cowboyd commented Jul 13, 2015

Ah, right, I remember now. It was generating thin archives on linux, but not mac for some reason.

@ignisf
Copy link
Collaborator

ignisf commented Jul 13, 2015

[ignisf@clarity therubyracer]$ bundle exec rspec spec/c
.........................................

Finished in 0.12006 seconds
41 examples, 0 failures
[ignisf@clarity therubyracer]$

@cowboyd
Copy link
Collaborator Author

cowboyd commented Jul 13, 2015

hallelujah!

cowboyd added a commit that referenced this pull request Jul 13, 2015
@cowboyd cowboyd merged commit d1dd01d into upgrade-to-v8-4.5 Jul 13, 2015
@cowboyd cowboyd deleted the limit-specs-to-c-and-clang branch July 17, 2015 03:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants