Skip to content

[qtwebengine] Fix stuff#35639

Merged
BillyONeal merged 2 commits intomicrosoft:masterfrom
Neumann-A:qtwebengine_bugfix
Dec 14, 2023
Merged

[qtwebengine] Fix stuff#35639
BillyONeal merged 2 commits intomicrosoft:masterfrom
Neumann-A:qtwebengine_bugfix

Conversation

@Neumann-A
Copy link
Contributor

Should fix #35260
Also fixes clang-cl builds

@jimwang118 jimwang118 added the category:port-bug The issue is with a library, which is something the port should already support label Dec 13, 2023
@Neumann-A Neumann-A marked this pull request as ready for review December 13, 2023 08:26
Comment on lines +90 to +93
+ //RTC_FORCE_INLINE auto operator<<(const std::string& arg) const {
+ // return LogStreamer<Val<CheckArgType::kStdString, const std::string*>>(MakeVal(arg), this);
+ //
+
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
+ //RTC_FORCE_INLINE auto operator<<(const std::string& arg) const {
+ // return LogStreamer<Val<CheckArgType::kStdString, const std::string*>>(MakeVal(arg), this);
+ //
+

Not worth resetting a build of qtwebengine over this

};

+
+// Base case: Before the first << argument.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beyond Compare screenshot

Observations:

  • Changing the return type to auto appears OK because the code before was always returning a prvalue and there's no intended SFINAE happening there
  • The previous code is doing decltype(MakeVal(an xvalue)) while the new code is doing decltype(MakeVal(an lvalue)). But the runtime code in both cases is calling with an lvalue.
  • You don't need C++20 remove_cvref_t; template argument deduction will never deduce a ref here, so C++14 remove_const_t should be sufficient. Probably not worth resetting the build over this..

I'm testing to see if just changing decltype(MakeVal(std::declval<U>())) to decltype(MakeVal(std::declval<U&>())) to match the runtime code fixes it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just remove remove_cvref_t I just used it for testing. Seems like I removed it from the enum test but forgot to remove it from the arithmetic check.

I'm testing to see if just changing decltype(MakeVal(std::declval())) to decltype(MakeVal(std::declval<U&>())) to match the runtime code fixes it

Shouldn't make a difference since the signature of MakeVal is in almost all cases RetType MakeVal(const argtype& x) and that doesn't care about U or U&. However cl is strange from time to time.

Copy link
Member

@BillyONeal BillyONeal Dec 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm testing to see if just changing decltype(MakeVal(std::declval())) to decltype(MakeVal(std::declval<U&>())) to match the runtime code fixes it

Test failed

};

+
+// Base case: Before the first << argument.
Copy link
Member

@BillyONeal BillyONeal Dec 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm testing to see if just changing decltype(MakeVal(std::declval())) to decltype(MakeVal(std::declval<U&>())) to match the runtime code fixes it

Test failed

@BillyONeal BillyONeal merged commit e1aeabf into microsoft:master Dec 14, 2023
@jimwang118 jimwang118 added the info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. label Dec 14, 2023
@Neumann-A Neumann-A deleted the qtwebengine_bugfix branch December 14, 2023 05:50
@BillyONeal
Copy link
Member

I don't think this fixed it. In the CI run of #35640 I'm still seeing:

FAILED: obj/third_party/webrtc/api/audio_options_api/audio_options.obj 
ninja -t msvc -e environment.x64 -- "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.38.33130\bin\Hostx64\x64\cl.exe" /c ../../../../../src/here-src-6-28218a77b9.clean/src/3rdparty/chromium/third_party/webrtc/api/audio_options.cc /Foobj/third_party/webrtc/api/audio_options_api/audio_options.obj /nologo /showIncludes -DUSE_AURA=1 -DTOOLKIT_QT -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D__STD_C -D_CRT_RAND_S -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -D_ATL_NO_OPENGL -D_WINDOWS -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DPSAPI_VERSION=2 -DWIN32 -D_SECURE_ATL -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -DWIN32_LEAN_AND_MEAN -DNOMINMAX -D_UNICODE -DUNICODE -DNTDDI_VERSION=NTDDI_WIN10_NI -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWEBRTC_ENABLE_PROTOBUF=1 -DWEBRTC_STRICT_FIELD_TRIALS=0 -DRTC_ENABLE_VP9 -DRTC_DAV1D_IN_INTERNAL_DECODER_FACTORY -DWEBRTC_HAVE_SCTP -DENABLE_EXTERNAL_AUTH -DHAVE_WEBRTC_VIDEO -DLOGGING_INSIDE_WEBRTC -DWEBRTC_LIBRARY_IMPL -DRTC_ENABLE_WIN_WGC -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_WIN -DABSL_ALLOCATOR_NOTHROW=1 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -Igen -I../../../../../src/here-src-6-28218a77b9.clean/src/3rdparty/chromium -I../../../../../src/here-src-6-28218a77b9.clean/src/3rdparty/chromium/third_party/webrtc_overrides -I../../../../../src/here-src-6-28218a77b9.clean/src/3rdparty/chromium/third_party/webrtc -Igen/third_party/webrtc -I../../../../../src/here-src-6-28218a77b9.clean/src/3rdparty/chromium/third_party/abseil-cpp -I../../../../../src/here-src-6-28218a77b9.clean/src/3rdparty/chromium/third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto /wd4091 /wd4127 /wd4251 /wd4275 /wd4312 /wd4324 /wd4351 /wd4355 /wd4503 /wd4589 /wd4611 /wd4100 /wd4121 /wd4244 /wd4505 /wd4510 /wd4512 /wd4610 /wd4838 /wd4995 /wd4996 /wd4456 /wd4457 /wd4458 /wd4459 /wd4200 /wd4201 /wd4204 /wd4221 /wd4245 /wd4267 /wd4305 /wd4389 /wd4702 /wd4701 /wd4703 /wd4661 /wd4706 /wd4715 /wd4003 /wd4068 /wd5051 /wd4244 /Gy /FS /bigobj /utf-8 /Zc:sizedDealloc- /wd4117 /D__DATE__= /D__TIME__= /D__TIMESTAMP__= /Od /Ob0 /GF /Zi /MDd /wd4577 /std:c++20 /TP /GR- /Fd"obj/third_party/webrtc/api/audio_options_api_cc.pdb"
D:\b\qtwebengine\src\here-src-6-28218a77b9.clean\src\3rdparty\chromium\third_party\webrtc\api/array_view.h(158): error C2676: binary '<<': 'rtc::webrtc_checks_impl::LogStreamer<rtc::webrtc_checks_impl::Val<rtc::webrtc_checks_impl::CheckArgType::kCharP,const char *>>' does not define this operator or a conversion to a type acceptable to the predefined operator
D:\b\qtwebengine\src\here-src-6-28218a77b9.clean\src\3rdparty\chromium\third_party\webrtc\rtc_base/checks.h(248): note: could be 'rtc::webrtc_checks_impl::LogStreamer<V,T> rtc::webrtc_checks_impl::LogStreamer<rtc::webrtc_checks_impl::Val<rtc::webrtc_checks_impl::CheckArgType::kCharP,const char *>>::operator <<(const U &) const'
        with
        [
            T=rtc::webrtc_checks_impl::Val<rtc::webrtc_checks_impl::CheckArgType::kCharP,const char *>
        ]
D:\b\qtwebengine\src\here-src-6-28218a77b9.clean\src\3rdparty\chromium\third_party\webrtc\api/array_view.h(158): note: 'rtc::webrtc_checks_impl::LogStreamer<V,T> rtc::webrtc_checks_impl::LogStreamer<rtc::webrtc_checks_impl::Val<rtc::webrtc_checks_impl::CheckArgType::kCharP,const char *>>::operator <<(const U &) const': could not deduce template argument for 'V'
        with
        [
            T=rtc::webrtc_checks_impl::Val<rtc::webrtc_checks_impl::CheckArgType::kCharP,const char *>
        ]
D:\b\qtwebengine\src\here-src-6-28218a77b9.clean\src\3rdparty\chromium\third_party\webrtc\rtc_base/checks.h(240): note: or       'rtc::webrtc_checks_impl::LogStreamer<V,T> rtc::webrtc_checks_impl::LogStreamer<rtc::webrtc_checks_impl::Val<rtc::webrtc_checks_impl::CheckArgType::kCharP,const char *>>::operator <<(U) const'
        with
        [
            T=rtc::webrtc_checks_impl::Val<rtc::webrtc_checks_impl::CheckArgType::kCharP,const char *>
        ]
D:\b\qtwebengine\src\here-src-6-28218a77b9.clean\src\3rdparty\chromium\third_party\webrtc\api/array_view.h(158): note: 'rtc::webrtc_checks_impl::LogStreamer<V,T> rtc::webrtc_checks_impl::LogStreamer<rtc::webrtc_checks_impl::Val<rtc::webrtc_checks_impl::CheckArgType::kCharP,const char *>>::operator <<(U) const': could not deduce template argument for 'V'
        with
        [
            T=rtc::webrtc_checks_impl::Val<rtc::webrtc_checks_impl::CheckArgType::kCharP,const char *>
        ]
D:\b\qtwebengine\src\here-src-6-28218a77b9.clean\src\3rdparty\chromium\third_party\webrtc\api/array_view.h(158): note: the template instantiation context (the oldest one first) is
../../../../../src/here-src-6-28218a77b9.clean/src/3rdparty/chromium/third_party/webrtc/api/audio_options.cc(83): note: see reference to function template instantiation 'rtc::ArrayView<char,-4711>::ArrayView<char,1024>(U (&)[1024])' being compiled
        with
        [
            U=char
        ]
../../../../../src/here-src-6-28218a77b9.clean/src/3rdparty/chromium/third_party/webrtc/api/audio_options.cc(83): note: see the first reference to 'rtc::ArrayView<char,-4711>::ArrayView' in 'cricket::AudioOptions::ToString'
D:\b\qtwebengine\src\here-src-6-28218a77b9.clean\src\3rdparty\chromium\third_party\webrtc\api/array_view.h(179): note: see reference to function template instantiation 'rtc::ArrayView<char,-4711>::ArrayView<U>(U *,size_t)' being compiled
        with
        [
            U=char
        ]

Osyotr pushed a commit to Osyotr/vcpkg that referenced this pull request Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:port-bug The issue is with a library, which is something the port should already support info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[qtwebengine] Build error on x64-windows

3 participants