Re: SpiderMonkey38 as static lib on Windows
Steve Fink <[email protected]> Fri, 26 Aug 2016 11:44:52 -0700
| Newsgroups | gmane.comp.mozilla.devel.jseng |
|---|---|
| Message-ID | <[email protected]> |
On 08/26/2016 04:17 AM, Mihai Dobrescu wrote: > On Friday, August 26, 2016 at 1:36:32 PM UTC+3, [email protected] wrote: >> On Friday, August 26, 2016 at 12:01:32 PM UTC+2, Mihai Dobrescu wrote: >>> + adding that def is not right, IMHO. >>> It should get it during compilation out of the included files after config. >>> Yet, it seems to need it for both, msvc and mingw. >> >> Anyway, thanks for your help! >> I am embedding SM38 on Linux statically, and now I need to port it to Win. Are you saying that you managed to statically link to the NSPR libs using mingw64, so that you did not have to deploy the DLLs, or you could NOT do that neither with mingw64 nor msvc? > > I couln'd link to static libs, I did not intend. For the moment I prefer dlls under Windows. I did not use under linux at all as I embed js in Adobe products, although I'd be so happy to see them under linux! BTW, you could cross compile under linux. Should be simpler than under Windows itself... > Bug 1176787 https://bugzilla.mozilla.org/show_bug.cgi?id=1176787 is related to this, though I'll freely admit that I don't understand most of what is being discussed there. I believe one issue is that if you're linking a static js lib that includs a static nspr, then things will break if you link against something else that uses nspr (because you'll be using two copies, and they'll fight over TLS, or something?) If everything links against a dynamic NSPR, you should be ok. I think? But I don't even really know what mingw64 is. Does that imply you're using gcc? Or are you using mingw64+cl.exe? (Is that even a meaningful question?) I would love to have all of these compiling and linking issues resolved for the JS lib, but realistically I'm not going to be spending much time on it any day soon. If you have identified specific fixes needed in the standalone source release tarball, file a bug and CC me (:sfink) and I'll make sure they get in (assuming I can convince myself they don't break other scenarios.) Thanks! Steve