Linking against MultiThreadedDLL instead of MultiThreaded on Windows (wincairo)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Linking against MultiThreadedDLL instead of MultiThreaded on Windows (wincairo)

Isaac Devine
Hi,

I'm looking at linking against WebKit in my application, which is linked against the MultiThreadedDLL CRT (i.e. dynamically linked); however WebKit is linked against the MultiThreaded CRT (i.e. statically linked). I've linked against previous builds with this configuration "without problems".

I've found bug https://bugs.webkit.org/show_bug.cgi?id=157067 which describe removing the /nodefaultlib for the libcmt (the MultiThreaded static libary), but in the comments they mention an eventual transition to the MultiThreaded CRT.

Is that time now? :-)

I've been making local changes to do this and have noticed in the cmake files that a few of them will swap out the Debug versions of the CRT for the release ones, is there a specific reason for that?

Additionally, relating to the /nodefaultlib directives that are present in several build files; my understanding is that if all of the projects were compiled against the same CRT these can be removed? From my reading of bug 157067, I believe that the nodefaultlib directives have hidden bugs in the past, is that correct?

Cheers,
Isaac

_______________________________________________
webkit-dev mailing list
[hidden email]
https://lists.webkit.org/mailman/listinfo/webkit-dev
Reply | Threaded
Open this post in threaded view
|

Re: Linking against MultiThreadedDLL instead of MultiThreaded on Windows (wincairo)

Isaac Devine
On 19 May 2017 at 16:16, Fujii Hironori <[hidden email]> wrote:
On Fri, May 19, 2017 at 8:18 AM, Isaac Devine <[hidden email]> wrote:
> Hi,
>
> I'm looking at linking against WebKit in my application, which is linked
> against the MultiThreadedDLL CRT (i.e. dynamically linked); however WebKit
> is linked against the MultiThreaded CRT (i.e. statically linked). I've
> linked against previous builds with this configuration "without problems".

What problem do you have. It should not cause any problem by using any
type of CRT in WebKit.dll except this problem
<https://msdn.microsoft.com/en-us/library/ms235460.aspx>.

I have a linker warning because it was no longer linked to the MultiThreadedDLL, and was statically linked instead. The behavior described matched some issues I was having. I'm basically updating to the latest trunk of WebKit for the application and the /nodefaultlib changes have arrived after my previous snapshot.


> I've found bug https://bugs.webkit.org/show_bug.cgi?id=157067 which describe
> removing the /nodefaultlib for the libcmt (the MultiThreaded static libary),
> but in the comments they mention an eventual transition to the MultiThreaded
> CRT.
>
> Is that time now? :-)

  Bug 170594 – [CMake][Windows] Use DLL CRT instead of static CRT
  https://bugs.webkit.org/show_bug.cgi?id=170594

Thanks I've attached my WIP patch for comparison, notably I modify some props files as well, but from your patch I'm guessing they aren't used anymore?

> I've been making local changes to do this and have noticed in the cmake
> files that a few of them will swap out the Debug versions of the CRT for the
> release ones, is there a specific reason for that?

The debug CRT makes WebKit unbearably slow.

Makes sense. 

> Additionally, relating to the /nodefaultlib directives that are present in
> several build files; my understanding is that if all of the projects were
> compiled against the same CRT these can be removed?

I think so, too.

> From my reading of bug
> 157067, I believe that the nodefaultlib directives have hidden bugs in the
> past, is that correct?

---
Fujii Hironori
Sony Interactive Entertainment Inc.


_______________________________________________
webkit-dev mailing list
[hidden email]
https://lists.webkit.org/mailman/listinfo/webkit-dev
Reply | Threaded
Open this post in threaded view
|

Re: Linking against MultiThreadedDLL instead of MultiThreaded on Windows (wincairo)

Fujii Hironori
On Fri, May 19, 2017 at 5:24 PM, Isaac Devine <[hidden email]> wrote:
> On 19 May 2017 at 16:16, Fujii Hironori <[hidden email]> wrote:
>>
> I have a linker warning because it was no longer linked to the
> MultiThreadedDLL, and was statically linked instead. The behavior described
> matched some issues I was having. I'm basically updating to the latest trunk
> of WebKit for the application and the /nodefaultlib changes have arrived
> after my previous snapshot.

Ah, that problem. Why don't you use /NODEFAULTLIB:LIBCMT switch?


>> > I've found bug https://bugs.webkit.org/show_bug.cgi?id=157067 which
>> > describe
>> > removing the /nodefaultlib for the libcmt (the MultiThreaded static
>> > libary),
>> > but in the comments they mention an eventual transition to the
>> > MultiThreaded
>> > CRT.
>> >
>> > Is that time now? :-)
>>
>>   Bug 170594 – [CMake][Windows] Use DLL CRT instead of static CRT
>>   https://bugs.webkit.org/show_bug.cgi?id=170594
>>
> Thanks I've attached my WIP patch for comparison, notably I modify some
> props files as well, but from your patch I'm guessing they aren't used
> anymore?

I don't know. Does Apple Internal Build use the files?
I'm waiting for AppleWin port folks looking into the bug. If you can't
wait for that, you need to switch to use DLL CRT only for WinCairo
port
This was my WIP patch <https://bugs.webkit.org/show_bug.cgi?id=157067#c9>.
_______________________________________________
webkit-dev mailing list
[hidden email]
https://lists.webkit.org/mailman/listinfo/webkit-dev