-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add project that produces a static library version of ChakraCore #279
Comments
This is not the only time we've heard interest in this. |
One problem is that we have initialization/termination code attached to DLL_Process/Thread _Attach/Detach. To offer a static lib, we may need new explicit initialize/terminate hosting APIs. |
You can build ChakraCore with MSVC dependency statically linked with the msbuild build flag /p:RuntimeLib=static_library. As for ChakraCore as a static library, we can convert the attach/detach initialization into global object ctor initialization (or __declspec(thread) object with ctor/dtor for thread attach/detach) |
Ah I see. That's why using lib.exe to combine all the dependencies into single lib didn't work. I assume the static library could also leave out the test hooks. |
Is there any way to use runtests.cmd with static built ch.exe? I build ch.exe by command 'msbuild /p:Platform=x64 /p:Configuration=Test /p:BuildJIT=False /p:RuntimeLib=static_library /p:AdditionalPreprocessorDefinitions=CHAKRA_STATIC_LIBRARY=1 .\Build\Chakra.Core.sln' and have no idea how to run the regression test. It seems that command line handling mechanism is commented under static build. |
When creating projects that target PaaS offerings in Azure such as Service Fabric or Classic Worker Roles, it is more desirable to have a version of ChakraCore that can be statically linked.
In addition it would be nice if the static library also statically linked its dependencies such as the MSVC runtime. This prevents users from having to create VM Extensions that deploy these dependencies.
The text was updated successfully, but these errors were encountered: