Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added compatibility with MSVC on Windows #2

Merged
merged 2 commits into from
Oct 4, 2016

Conversation

tcosprojects
Copy link
Contributor

Added translations for some new API types from V8 5.5+
Changed v8-glue.cc to avoid C99 features that MSVC does not support

Added translations for some new API types from V8 5.5+
Changed v8-glue.cc to avoid C99 features that MSVC does not support
@codecov-io
Copy link

codecov-io commented Oct 4, 2016

Current coverage is 89.41% (diff: 100%)

Merging #2 into master will not change coverage

@@             master         #2   diff @@
==========================================
  Files            10         10          
  Lines           652        652          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits            583        583          
  Misses           69         69          
  Partials          0          0          

Powered by Codecov. Last update 7e2b220...5f640de

Copy link
Owner

@dflemstr dflemstr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just remove the v8_platform line and we're good

if cfg!(all(windows, target_env="msvc")) {
println!("cargo:rustc-link-lib=dylib=v8.dll");
println!("cargo:rustc-link-lib=static=v8_base");
println!("cargo:rustc-link-lib=static=v8_platform");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I don't think v8_platform is needed. We don't link it in the Linux static build.

Copy link
Contributor Author

@tcosprojects tcosprojects Oct 4, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it may be from using GN to build v8 on windows, but it built both. I can link them together though so I'll go ahead and remove this.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So v8_platform is needed if you don't implement your own, which we do through the PlatformFunctions API towards Rust.

@@ -899,11 +900,11 @@ ValueRef v8_Object_CallAsFunction(RustContext c, ObjectRef self, ContextRef cont
v8::HandleScope scope(c.isolate);
v8::TryCatch try_catch(c.isolate);
v8::Context::Scope context_scope(wrap(c.isolate, context));
v8::Local<v8::Value> argv_wrapped[argc];
std::vector<v8::Local<v8::Value>> argv_wrapped(argc);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be so nice to not heap allocate here but I guess we have no choice with portable C++ so 👍

Removed build step linking v8_platform.lib on windows to match linking on linux
@dflemstr dflemstr merged commit 270bacb into dflemstr:master Oct 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants