RESOLVED FIXED 201751
[WinCairo][Clang][ANGLE] global_state.cpp(39,1): error: static_assert failed due to requirement 'std::is_trivially_constructible<std::atomic<std::mutex *>>::value' "global mutex is not trivially constructible"
https://bugs.webkit.org/show_bug.cgi?id=201751
Summary [WinCairo][Clang][ANGLE] global_state.cpp(39,1): error: static_assert failed ...
Fujii Hironori
Reported 2019-09-12 20:28:09 PDT
[WinCairo][Clang][ANGLE] global_state.cpp(39,1): error: static_assert failed due to requirement 'std::is_trivially_constructible<std::atomic<std::mutex *>>::value' "global mutex is not trivially constructible" Since r249823, clang-cl can't compile WinCairo while MSVC can do. > [1811/5064] Building CXX object Source\ThirdParty\ANGLE\CMakeFiles\GLESv2.dir\src\libGLESv2\global_state.cpp.obj > FAILED: Source/ThirdParty/ANGLE/CMakeFiles/GLESv2.dir/src/libGLESv2/global_state.cpp.obj > C:\PROGRA~1\LLVM\bin\clang-cl.exe /nologo -TP -DANGLE_ENABLE_D3D11 -DANGLE_ENABLE_D3D9 -DANGLE_ENABLE_ESSL -DANGLE_ENABLE_HLSL -DBUILDING_WITH_CMAKE=1 -DGLESv2_EXPORTS -DGL_API="" -DGL_APICALL="" -DHAVE_CONFIG_H=1 -DLIBGLESV2_IMPLEMENTATION -DNOMINMAX -DUNICODE -DWTF_PLATFORM_WIN_CAIRO=1 -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_UNICODE -D_WINDOWS -D_WINSOCKAPI_="" -I..\..\WebKitLibraries\win\include -I..\..\Source\ThirdParty\ANGLE\include -I..\..\Source\ThirdParty\ANGLE\include\KHR -I..\..\Source\ThirdParty\ANGLE\src -I..\..\Source\ThirdParty\ANGLE\src\common\third_party\base -ISource\ThirdParty\ANGLE\include /W4 -fdiagnostics-color=always -fcolor-diagnostics -Wno-parentheses-equality -Wno-noexcept-type -Qunused-arguments -Wwrite-strings -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -Wno-unknown-argument -Wno-nonportable-include-path -Wno-unknown-pragmas -Wno-macro-redefined -Wno-undef /DWIN32 /D_WINDOWS /GR- /EHsc- -fno-strict-aliasing /MD /O2 /Ob2 /DNDEBUG /wd4018 /wd4068 /wd4099 /wd4100 /wd4127 /wd4138 /wd4146 /wd4180 /wd4189 /wd4201 /wd4206 /wd4244 /wd4251 /wd4267 /wd4275 /wd4288 /wd4291 /wd4305 /wd4309 /wd4344 /wd4355 /wd4389 /wd4396 /wd4456 /wd4457 /wd4458 /wd4459 /wd4481 /wd4503 /wd4505 /wd4510 /wd4512 /wd4530 /wd4610 /wd4611 /wd4646 /wd4702 /wd4706 /wd4722 /wd4800 /wd4819 /wd4951 /wd4952 /wd4996 /wd6011 /wd6031 /wd6211 /wd6246 /wd6255 /wd6387 /Zi /GS /EHa- /EHc- /EHs- /fp:except- /analyze- /bigobj /utf-8 /validate-charset /Oy- -fmsc-version=1911 -std:c++17 /showIncludes /FoSource\ThirdParty\ANGLE\CMakeFiles\GLESv2.dir\src\libGLESv2\global_state.cpp.obj /FdSource\ThirdParty\ANGLE\CMakeFiles\GLESv2.dir\ -c ..\..\Source\ThirdParty\ANGLE\src\libGLESv2\global_state.cpp > ..\..\Source\ThirdParty\ANGLE\src\libGLESv2\global_state.cpp(39,1): error: static_assert failed due to requirement 'std::is_trivially_constructible<std::atomic<std::mutex *>>::value' "global mutex is not trivially constructible" > static_assert(std::is_trivially_constructible<decltype(g_Mutex)>::value, > ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 1 error generated.
Attachments
Patch (3.04 KB, patch)
2019-10-01 19:51 PDT, Fujii Hironori
no flags
Fujii Hironori
Comment 1 2019-09-12 20:39:29 PDT
Mozilla's bug report. 1579743 - Build fails after 13282d7a47a5 error: static_assert failed due to requirement 'std::is_trivially_constructible<std::atomic<std::mutex *>>::value' at gfx/angle/checkout/src/libGLESv2/global_state.cpp(39,1) https://bugzilla.mozilla.org/show_bug.cgi?id=1579743
Fujii Hironori
Comment 2 2019-09-13 03:10:32 PDT
It seems that Chromium is using libc++'s atomic instead of MSVC's one. It compiles global_state.cpp with -I../../buildtools/third_party/libc++/trunk/include switch.
Fujii Hironori
Comment 3 2019-09-24 23:42:10 PDT
Fujii Hironori
Comment 4 2019-10-01 19:51:22 PDT
EWS Watchlist
Comment 5 2019-10-01 19:52:00 PDT
Note that there are important steps to take when updating ANGLE. See http://trac.webkit.org/wiki/UpdatingANGLE
WebKit Commit Bot
Comment 6 2019-10-01 20:40:34 PDT
Comment on attachment 379985 [details] Patch Clearing flags on attachment: 379985 Committed r250592: <https://trac.webkit.org/changeset/250592>
WebKit Commit Bot
Comment 7 2019-10-01 20:40:35 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8 2019-10-01 20:41:16 PDT
Note You need to log in before you can comment on or make changes to this bug.