RESOLVED FIXED 172230
[Win][CMake] Move MSVC compiler options to a common location
https://bugs.webkit.org/show_bug.cgi?id=172230
Summary [Win][CMake] Move MSVC compiler options to a common location
Don Olmstead
Reported 2017-05-17 11:39:11 PDT
Currently all the MSVC definitions are in OptionsWin.cmake. This means they aren't available for different ports such as JSCOnly.
Attachments
Patch (8.09 KB, patch)
2017-05-17 13:53 PDT, Don Olmstead
achristensen: review-
Patch (7.35 KB, patch)
2017-05-18 17:45 PDT, Don Olmstead
no flags
Patch (11.15 KB, patch)
2017-05-19 12:25 PDT, Don Olmstead
no flags
Don Olmstead
Comment 1 2017-05-17 13:53:11 PDT
Created attachment 310439 [details] Patch This moves the MSVC options from OptionsWin over to OptionsCommon. This is work towards enabling JSCOnly builds on windows.
Alex Christensen
Comment 2 2017-05-17 14:02:54 PDT
Comment on attachment 310439 [details] Patch There is no way to use MSVC on a non-Windows platform. I see no reason to move this from a Windows-specific file to a file that's used on Linux and Mac.
Don Olmstead
Comment 3 2017-05-17 14:15:44 PDT
(In reply to Alex Christensen from comment #2) > Comment on attachment 310439 [details] > Patch > > There is no way to use MSVC on a non-Windows platform. I see no reason to > move this from a Windows-specific file to a file that's used on Linux and > Mac. Would you prefer compiler options in their own files? Like a OptionsMSVC.cmake? I'm trying to consolidate the options so they can be used to build JSCOnly on Windows. As it is JSCOnly does not build on Windows at all.
Alex Christensen
Comment 4 2017-05-17 16:12:40 PDT
OptionsMSVC.cmake would be better than OptionsCommon.cmake
Don Olmstead
Comment 5 2017-05-18 17:45:21 PDT
Created attachment 310581 [details] Patch Moving MSVC options to a new file as requested.
Konstantin Tokarev
Comment 6 2017-05-19 11:07:21 PDT
I would prefer if the following options were not moved to OptionsMSVC.cmake: /Zi for release builds, disabling RTTI (GR-), using MT runtime instead of MD or MDd. Rationale is that this options are not universally suitable, and it's not possible to revert their effect for downstream port, without duplicating or patching OptionsMSVC.cmake (I'm speaking for Qt port now). Also, there was a proposal in the mailing list to make WinCairo using MD runtime, I think it would be wise thing to do. I also don't think that JSCOnly should use this options. OTOH, I would suggest moving "INCREMENTAL:NO" code from Source/WebKit/PlatformWin.cmake to OptionsMSVC.cmake, because large linking times affects pretty much any WebKit port if MSVC is used, and these options should affect binaries built in Tools too.
Don Olmstead
Comment 7 2017-05-19 11:09:14 PDT
(In reply to Konstantin Tokarev from comment #6) > I would prefer if the following options were not moved to OptionsMSVC.cmake: > /Zi for release builds, disabling RTTI (GR-), using MT runtime instead of MD > or MDd. > > Rationale is that this options are not universally suitable, and it's not > possible to revert their effect for downstream port, without duplicating or > patching OptionsMSVC.cmake (I'm speaking for Qt port now). Also, there was a > proposal in the mailing list to make WinCairo using MD runtime, I think it > would be wise thing to do. > > I also don't think that JSCOnly should use this options. > > OTOH, I would suggest moving "INCREMENTAL:NO" code from > Source/WebKit/PlatformWin.cmake to OptionsMSVC.cmake, because large linking > times affects pretty much any WebKit port if MSVC is used, and these options > should affect binaries built in Tools too. I agree. This was just a blind copy and I was going to clean up this file in a later patch.
Don Olmstead
Comment 8 2017-05-19 12:25:37 PDT
Created attachment 310682 [details] Patch Moving linking options into the file as requested.
Alex Christensen
Comment 9 2017-05-19 12:27:57 PDT
Comment on attachment 310682 [details] Patch Looks good. Let's let EWS succeed first
Don Olmstead
Comment 10 2017-05-19 13:23:52 PDT
(In reply to Alex Christensen from comment #9) > Comment on attachment 310682 [details] > Patch > > Looks good. Let's let EWS succeed first Success!
Yusuke Suzuki
Comment 11 2017-05-21 23:47:09 PDT
Comment on attachment 310682 [details] Patch r=me
WebKit Commit Bot
Comment 12 2017-05-22 00:15:24 PDT
Comment on attachment 310682 [details] Patch Clearing flags on attachment: 310682 Committed r217207: <http://trac.webkit.org/changeset/217207>
WebKit Commit Bot
Comment 13 2017-05-22 00:15:26 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.