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

Added support for windows and mingw. #337

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ext/v8/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

have_library('pthread')
have_library('objc') if RUBY_PLATFORM =~ /darwin/
have_library('winmm') if RUBY_PLATFORM =~ /mingw/
$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 RUBY_PLATFORM =~ /darwin/
$CPPFLAGS += " -rdynamic" unless $CPPFLAGS.split.include? "-rdynamic" or RUBY_PLATFORM =~ /mingw/
$CPPFLAGS += " -fPIC" unless $CPPFLAGS.split.include? "-rdynamic" or RUBY_PLATFORM =~ /darwin|mingw/

CONFIG['LDSHARED'] = '$(CXX) -shared' unless RUBY_PLATFORM =~ /darwin/
if CONFIG['warnflags']
Expand Down
8 changes: 4 additions & 4 deletions ext/v8/object.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ VALUE Object::ForceDelete(VALUE self, VALUE key) {
VALUE Object::SetAccessor(int argc, VALUE* argv, VALUE self) {
VALUE name; VALUE get; VALUE set; VALUE data; VALUE settings; VALUE attribs;
rb_scan_args(argc, argv, "24", &name, &get, &set, &data, &settings, &attribs);
Accessor access(get, set, data);
Accessor accessor(get, set, data);
return Bool(Object(self)->SetAccessor(
String(name),
access.accessorGetter(),
access.accessorSetter(),
access,
accessor.accessorGetter(),
accessor.accessorSetter(),
accessor,
AccessControl(settings),
PropertyAttribute(attribs))
);
Expand Down