RESOLVED FIXED 172553
[CMake] Wrap CODE_GENERATOR_PREPROCESSOR_EXECUTABLE on Windows hosts
https://bugs.webkit.org/show_bug.cgi?id=172553
Summary [CMake] Wrap CODE_GENERATOR_PREPROCESSOR_EXECUTABLE on Windows hosts
Don Olmstead
Reported 2017-05-24 13:00:48 PDT
CODE_GENERATOR_PREPROCESSOR_EXECUTABLE should use an absolute path that is wrapped in quotes when cross compiling on Windows.
Attachments
Patch (2.99 KB, patch)
2017-05-24 13:14 PDT, Don Olmstead
achristensen: review+
annulen: commit-queue-
Archive of layout-test-results from ews126 for ios-simulator-wk2 (1011.38 KB, application/zip)
2017-05-24 14:39 PDT, Build Bot
no flags
Patch (2.35 KB, patch)
2017-05-24 18:41 PDT, Don Olmstead
don.olmstead: review-
don.olmstead: commit-queue-
Patch with Shellwords (4.17 KB, patch)
2017-05-24 19:32 PDT, Don Olmstead
no flags
Patch (2.88 KB, patch)
2017-05-25 10:28 PDT, Don Olmstead
no flags
Patch (2.88 KB, patch)
2017-05-25 10:46 PDT, Don Olmstead
no flags
Patch (4.74 KB, patch)
2017-05-25 12:59 PDT, Konstantin Tokarev
no flags
Patch (4.29 KB, patch)
2017-05-25 15:42 PDT, Konstantin Tokarev
no flags
Don Olmstead
Comment 1 2017-05-24 13:14:20 PDT
Created attachment 311148 [details] Patch Uses CMAKE_HOST_WIN32 https://cmake.org/cmake/help/latest/variable/CMAKE_HOST_WIN32.html to identify a build happening on a Windows machine. This detects cygwin as well. From there the command is wrapped in quotes just in case there are spaces. This is useful for anyone cross compiling WebKit on Windows such as what we're doing on the PlayStation. Also removed a stale comment. Going to wait on the apple win bots before reviewing.
Don Olmstead
Comment 2 2017-05-24 14:14:58 PDT
Comment on attachment 311148 [details] Patch Windows bots are good to go.
Konstantin Tokarev
Comment 3 2017-05-24 14:29:57 PDT
Comment on attachment 311148 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=311148&action=review > Source/cmake/OptionsCommon.cmake:5 > +if (CMAKE_HOST_WIN32) I think this is a wrong logic. I don't see any reason why should we take absolute path only on Windows, and not use it on other platforms
Build Bot
Comment 4 2017-05-24 14:39:23 PDT
Comment on attachment 311148 [details] Patch Attachment 311148 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/3808717 New failing tests: fast/events/before-unload-returnValue.html webrtc/peer-connection-audio-mute.html
Build Bot
Comment 5 2017-05-24 14:39:24 PDT
Created attachment 311155 [details] Archive of layout-test-results from ews126 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
Don Olmstead
Comment 6 2017-05-24 18:41:14 PDT
Created attachment 311177 [details] Patch Quotes the preprocessor path for everyone. CMAKE_CXX_COMPILER is the full path so there's no reason to get its absolute path, https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER.html.
Don Olmstead
Comment 7 2017-05-24 19:08:57 PDT
The GTK bot doesn't like this change annulen. Maybe it needs to be combined with your shellwords patch at https://bugs.webkit.org/show_bug.cgi?id=164484 ?
Don Olmstead
Comment 8 2017-05-24 19:32:39 PDT
Created attachment 311182 [details] Patch with Shellwords Lets see what happens when shellwords is used. If this doesn't work then I think we should just go back to the windows host check.
Don Olmstead
Comment 9 2017-05-25 10:28:59 PDT
Created attachment 311241 [details] Patch GTK fails without shellwords and AppleWin fails with shellwords. This is going back to roughly the original patch submitted but with the knowledge that ${CMAKE_CXX_COMPILER} already has the absolute path.
Don Olmstead
Comment 10 2017-05-25 10:46:25 PDT
Konstantin Tokarev
Comment 11 2017-05-25 12:59:45 PDT
Don Olmstead
Comment 12 2017-05-25 15:32:24 PDT
(In reply to Konstantin Tokarev from comment #11) > Created attachment 311270 [details] > Patch The failures on Win are indicating that the call to the preprocessor isn't actually generating anything. You're correct that its possible that another system has spaces in the path but the shellwords stuff isn't working out. My only other idea is that rather than splitting on " " the arguments become a CMake list rather than a string and then split on ";". Unless you want to spend some more time with this I think we should just land my last patch.
Konstantin Tokarev
Comment 13 2017-05-25 15:42:13 PDT
Don Olmstead
Comment 14 2017-05-26 12:26:01 PDT
Your patch is fine by me. Still kinda bizarre you can't use shellwords on the whole.
Konstantin Tokarev
Comment 15 2017-05-26 12:58:57 PDT
Path with spaces work on Linux too with my version of patch
Don Olmstead
Comment 16 2017-05-26 13:03:53 PDT
Comment on attachment 311305 [details] Patch LGTM
Brent Fulgham
Comment 17 2017-05-26 13:59:35 PDT
Comment on attachment 311305 [details] Patch Looks good. r=me.
WebKit Commit Bot
Comment 18 2017-05-26 14:28:38 PDT
Comment on attachment 311305 [details] Patch Clearing flags on attachment: 311305 Committed r217506: <http://trac.webkit.org/changeset/217506>
WebKit Commit Bot
Comment 19 2017-05-26 14:28:40 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 20 2017-05-30 20:23:45 PDT
Note You need to log in before you can comment on or make changes to this bug.