-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[v8] Add v8 Javascript engine port (#372). #12687
Conversation
Is there a way to pick a dependency based on platform at the CONTROL file level? |
@Kwizatz See documentation. |
@JackBoosY Thanks for the heads up. I am looking at the error on x86_windows now. For some reason the flag /Ob3 on 32 bit cl does not force inlines the way it does for 64 bits, so I am looking for a workaround. I have no way to do x64_osx builds 😢, so I am going to disable that one on the CONTROL file, however I don't think it would require too many more changes. |
The pbc:x64-osx failures doesn't relate to this changes, it's baseline issue which has been fixed, I have rerun the osx CI testing. |
|
Was this check really passing before? The only change from the last commit that could have affected it was the sysroot flag being set exclusively for Linux. |
@vejmartin can you please review this PR? Thanks. |
The soil regression will be fixed in another PR. |
Do you mean the changes on pkgconfig fixup and icu? |
There seems to be something wrong with the release version of the icu libraries, the build for x64-windows-dbg completes properly, but the one for x64-windows-rel fails due to undefined external symbols in icuuc.lib. My guess is that for some reason some symbols are not being exported on icu release build, or something is slightly different between icuucd.lib and icuuc.lib somehow, we need to have what the d version has in the non d version. It was working before, so maybe a recent change in icu introduced the problem. I have not tried to go back to a previous icu port. |
@Kwizatz I think so. |
I think I found the problem with ICU release, trying to solve it. |
If you need my help, please ping me. |
Thanks @JackBoosY, I think I got it, it seems that the portfile is adding the optimization option /Oi to generate intrinsics on release mode, the autoconf script then looks for the wcscpy function by linking a program that calls wcscpy(), no arguments, wcscpy is one of the intrinsics, cl.exe doesn't like the call to the intrinsic without arguments and errors out. This error is taken by autoconf to mean the function is not found, and somehow does a workaround that causes ICU to build, but not have the proper signatures for the functions being used by v8. Since I like the intrinsics optimization, I added a patch and a call to autoconf to not run the check if both CXX and CC are cl.exe. Edit: Hmm no, it seems that this problem is there and may be part of the problem, but I am still seeing missing symbol errors. |
Hi, @JackBoosY, I'll try to find a workaround. Edit: There is the wcscpy issue which I don't know in what level is causing the CI tests to fail. |
6ac1056
to
dc54482
Compare
@Kwizatz I'll look into it tomorrow, sorry. |
Hi, @JackBoosY no worries, there is a pkgconfig wrapper, I just added an argument to it so it outputs full paths to the libraries rather than just the name. I am having another issue though, this one is not as troublesome, but I need some clarification. ICU static libraries have a "s" prefix by default, for example sicuuc.lib, but the portfile renames them to remove the "s", So, is there a reason this was done this way? Edit: nevermind I found out why. |
1a17f79
to
43e2b1b
Compare
Tested triplets: x64-windows,x64-windows-static,x64-linux
Adding v8 to vcpkg is a big step for vcpkg's progress. This means that vcpkg can accommodate more complex ports. |
You're welcome 😁, |
Thanks for your contribution! |
While its been a nightmare to get it right, its been a pleasure working with you all. 😁... |
Tested triplets: x64-windows,x64-windows-static,x64-linux
Describe the pull request
This PR adds the v8 Javascript engine port,
The SHARED library version provides cmake configuration files with the following targets and variables:
The STATIC library version provides cmake configuration files with the following target and variable:
In addition the following variables are set:
The port also installs the following executables into the tools directory:
This Port makes no use of depot tools, uses msvc or gcc (no clang) accordingly for Windows or Linux and links against VCPKG provided dependency ports ICU and zlib instead of building a custom version as upstream does.
Example project to build the v8_shell example:
cmake_minimum_required(VERSION 3.0)
project(v8-shell)
find_package(v8 CONFIG REQUIRED)
add_executable(v8-shell shell.cc)
if(V8_MONOLITH_LIBRARY)
set_property(TARGET v8-shell PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$CONFIG:Debug:Debug>")
endif()
target_include_directories(v8-shell PRIVATE ${V8_INCLUDE_DIR})
target_link_libraries(v8-shell ${V8_LIBRARIES})
What does your PR fix? Fixes #
Fixes issue Add Chrome V8 port #372
Which triplets are supported/not supported? Have you updated the CI baseline?
x64-windows,x64-windows-static and x64-linux.
It should also support 32 bit versions of those triplets, but this was not tested.
Any other triplet should be considered not supported.
To the best of my knowledge, yes.