Summary: | [Win] Build JSCOnly on Windows with clang-cl | ||
---|---|---|---|
Product: | WebKit | Reporter: | Stephan Szabo <stephan.szabo> |
Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | annulen, commit-queue, don.olmstead, lforschler |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | 174221 | ||
Bug Blocks: | 171618 | ||
Attachments: |
Description
Stephan Szabo
2017-06-27 14:26:28 PDT
Created attachment 313946 [details]
Patch to build jsc-only with clang-cl toolset
Created attachment 313952 [details]
Patch to build jsc-only with clang-cl toolset
Created attachment 313956 [details]
Patch to build jsc-only with clang-cl toolset - combined clang-cl/gcc/clang4 option
Comment on attachment 313956 [details] Patch to build jsc-only with clang-cl toolset - combined clang-cl/gcc/clang4 option View in context: https://bugs.webkit.org/attachment.cgi?id=313956&action=review > Source/cmake/OptionsCommon.cmake:57 > + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-strict-aliasing -fno-rtti") Don't duplicate these lines > Source/cmake/OptionsCommon.cmake:58 > + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y") Can clang-cl accept -std=c++1y? If yes, it should just add a few flags to those set in the common COMPILER_IS_GCC_OR_CLANG block Comment on attachment 313956 [details] Patch to build jsc-only with clang-cl toolset - combined clang-cl/gcc/clang4 option View in context: https://bugs.webkit.org/attachment.cgi?id=313956&action=review >> Source/cmake/OptionsCommon.cmake:57 >> + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-strict-aliasing -fno-rtti") > > Don't duplicate these lines These were duplicated from above. I'm guessing because those options are never going to change. >> Source/cmake/OptionsCommon.cmake:58 >> + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y") > > Can clang-cl accept -std=c++1y? If yes, it should just add a few flags to those set in the common COMPILER_IS_GCC_OR_CLANG block With clang-cl it attempts to use the cl options where applicable such as https://blogs.msdn.microsoft.com/vcblog/2016/06/07/standards-version-switches-in-the-compiler/ (In reply to Konstantin Tokarev from comment #4) > Comment on attachment 313956 [details] > Patch to build jsc-only with clang-cl toolset - combined clang-cl/gcc/clang4 > option > > View in context: > https://bugs.webkit.org/attachment.cgi?id=313956&action=review > > > Source/cmake/OptionsCommon.cmake:57 > > + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-strict-aliasing -fno-rtti") > > Don't duplicate these lines > > Source/cmake/OptionsCommon.cmake:58 > > + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y") > > Can clang-cl accept -std=c++1y? If yes, it should just add a few flags to > those set in the common COMPILER_IS_GCC_OR_CLANG block Unfortunately, no, -std is considered an unknown argument. (In reply to Konstantin Tokarev from comment #4) > Comment on attachment 313956 [details] > Patch to build jsc-only with clang-cl toolset - combined clang-cl/gcc/clang4 > option > > View in context: > https://bugs.webkit.org/attachment.cgi?id=313956&action=review > > > Source/cmake/OptionsCommon.cmake:57 > > + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-strict-aliasing -fno-rtti") > > Don't duplicate these lines I'm sorry, I'm not sure what you mean here. Is it because we're doing -fno-strict-aliasing in both branches? We aren't passing -fno-exceptions or -fno-rtti in the clang-cl case, but it'd be easy to separate the common one out if that seems better. > > Source/cmake/OptionsCommon.cmake:58 > > + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y") > > Can clang-cl accept -std=c++1y? If yes, it should just add a few flags to > those set in the common COMPILER_IS_GCC_OR_CLANG block Unfortunately, no, -std is an unknown argument for clang-cl. Sorry, I accidentally ended up with two copies of the last post in the post. Comment on attachment 313956 [details] Patch to build jsc-only with clang-cl toolset - combined clang-cl/gcc/clang4 option View in context: https://bugs.webkit.org/attachment.cgi?id=313956&action=review >>>>> Source/cmake/OptionsCommon.cmake:57 >>>>> + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-strict-aliasing -fno-rtti") >>>> >>>> Don't duplicate these lines >>> >>> These were duplicated from above. I'm guessing because those options are never going to change. >> >> > > I'm sorry, I'm not sure what you mean here. Is it because we're doing -fno-strict-aliasing in both branches? We aren't passing -fno-exceptions or -fno-rtti in the clang-cl case, but it'd be easy to separate the common one out if that seems better. Yes, it would be better Created attachment 314059 [details]
Patch to build jsc-only with clang-cl toolset - restructured gcc_or_clang block
Created attachment 314060 [details]
Patch to build jsc-only with clang-cl toolset - restructured gcc_or_clang block
Comment on attachment 314060 [details] Patch to build jsc-only with clang-cl toolset - restructured gcc_or_clang block Clearing flags on attachment: 314060 Committed r218900: <http://trac.webkit.org/changeset/218900> All reviewed patches have been landed. Closing bug. |