-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[qtwebengine] Fix stuff #35639
Merged
Merged
[qtwebengine] Fix stuff #35639
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
diff --git a/src/3rdparty/gn/build/build_win.ninja.template b/src/3rdparty/gn/build/build_win.ninja.template | ||
index 7d2704c..b14186b 100644 | ||
--- a/src/3rdparty/gn/build/build_win.ninja.template | ||
+++ b/src/3rdparty/gn/build/build_win.ninja.template | ||
@@ -8,5 +8,5 @@ rule alink_thin | ||
description = LIB $out | ||
|
||
rule link | ||
- command = $ld /nologo $in /link $ldflags /PDB:$out.pdb /OUT:$out $solibs $libs | ||
+ command = $ld /nologo $in $ldflags /PDB:$out.pdb /OUT:$out $solibs $libs | ||
description = LINK $out | ||
diff --git a/src/gn/CMakeLists.txt b/src/gn/CMakeLists.txt | ||
index 0fe3e4e..1e2556f 100644 | ||
--- a/src/gn/CMakeLists.txt | ||
+++ b/src/gn/CMakeLists.txt | ||
@@ -31,7 +31,7 @@ find_package(Ninja 1.7.2 REQUIRED) | ||
|
||
if(WIN32) | ||
set(GN_EXECUTABLE gn.exe) | ||
- if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT MINGW) | ||
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT MINGW OR MSVC) | ||
# Use lld-link instead of clang-cl. | ||
set(GN_LINKER ${CMAKE_LINKER}) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,124 @@ | ||||||||||
diff --git a/src/3rdparty/chromium/third_party/webrtc/rtc_base/checks.h b/src/3rdparty/chromium/third_party/webrtc/rtc_base/checks.h | ||||||||||
index 459c6a5..687a364 100644 | ||||||||||
--- a/src/3rdparty/chromium/third_party/webrtc/rtc_base/checks.h | ||||||||||
+++ b/src/3rdparty/chromium/third_party/webrtc/rtc_base/checks.h | ||||||||||
@@ -224,60 +224,13 @@ ToStringVal MakeVal(const T& x) { | ||||||||||
template <typename... Ts> | ||||||||||
class LogStreamer; | ||||||||||
|
||||||||||
-// Base case: Before the first << argument. | ||||||||||
-template <> | ||||||||||
-class LogStreamer<> final { | ||||||||||
- public: | ||||||||||
- template <typename U, | ||||||||||
- typename V = decltype(MakeVal(std::declval<U>())), | ||||||||||
- absl::enable_if_t<std::is_arithmetic<U>::value || | ||||||||||
- std::is_enum<U>::value>* = nullptr> | ||||||||||
- RTC_FORCE_INLINE LogStreamer<V> operator<<(U arg) const { | ||||||||||
- return LogStreamer<V>(MakeVal(arg), this); | ||||||||||
- } | ||||||||||
- | ||||||||||
- template <typename U, | ||||||||||
- typename V = decltype(MakeVal(std::declval<U>())), | ||||||||||
- absl::enable_if_t<!std::is_arithmetic<U>::value && | ||||||||||
- !std::is_enum<U>::value>* = nullptr> | ||||||||||
- RTC_FORCE_INLINE LogStreamer<V> operator<<(const U& arg) const { | ||||||||||
- return LogStreamer<V>(MakeVal(arg), this); | ||||||||||
- } | ||||||||||
- | ||||||||||
-#if RTC_CHECK_MSG_ENABLED | ||||||||||
- template <typename... Us> | ||||||||||
- RTC_NORETURN RTC_FORCE_INLINE static void Call(const char* file, | ||||||||||
- const int line, | ||||||||||
- const char* message, | ||||||||||
- const Us&... args) { | ||||||||||
- static constexpr CheckArgType t[] = {Us::Type()..., CheckArgType::kEnd}; | ||||||||||
- FatalLog(file, line, message, t, args.GetVal()...); | ||||||||||
- } | ||||||||||
- | ||||||||||
- template <typename... Us> | ||||||||||
- RTC_NORETURN RTC_FORCE_INLINE static void CallCheckOp(const char* file, | ||||||||||
- const int line, | ||||||||||
- const char* message, | ||||||||||
- const Us&... args) { | ||||||||||
- static constexpr CheckArgType t[] = {CheckArgType::kCheckOp, Us::Type()..., | ||||||||||
- CheckArgType::kEnd}; | ||||||||||
- FatalLog(file, line, message, t, args.GetVal()...); | ||||||||||
- } | ||||||||||
-#else | ||||||||||
- template <typename... Us> | ||||||||||
- RTC_NORETURN RTC_FORCE_INLINE static void Call(const char* file, | ||||||||||
- const int line) { | ||||||||||
- FatalLog(file, line); | ||||||||||
- } | ||||||||||
-#endif | ||||||||||
-}; | ||||||||||
|
||||||||||
// Inductive case: We've already seen at least one << argument. The most recent | ||||||||||
// one had type `T`, and the earlier ones had types `Ts`. | ||||||||||
template <typename T, typename... Ts> | ||||||||||
class LogStreamer<T, Ts...> final { | ||||||||||
public: | ||||||||||
- RTC_FORCE_INLINE LogStreamer(T arg, const LogStreamer<Ts...>* prior) | ||||||||||
+ RTC_FORCE_INLINE LogStreamer(T arg, const LogStreamer<Ts...> * const prior) | ||||||||||
: arg_(arg), prior_(prior) {} | ||||||||||
|
||||||||||
template <typename U, | ||||||||||
@@ -328,6 +281,57 @@ class LogStreamer<T, Ts...> final { | ||||||||||
const LogStreamer<Ts...>* prior_; | ||||||||||
}; | ||||||||||
|
||||||||||
+ | ||||||||||
+// Base case: Before the first << argument. | ||||||||||
+template <> | ||||||||||
+class LogStreamer<> final { | ||||||||||
+ public: | ||||||||||
+ template <typename U, | ||||||||||
+ absl::enable_if_t<std::is_arithmetic<std::remove_cvref_t<U>>::value || | ||||||||||
+ std::is_enum<U>::value>* = nullptr> | ||||||||||
+ RTC_FORCE_INLINE auto operator<<(U arg) const { | ||||||||||
+ return LogStreamer<decltype(MakeVal(arg))>(MakeVal(arg), this); | ||||||||||
+ } | ||||||||||
+ | ||||||||||
+ template <typename U, | ||||||||||
+ absl::enable_if_t<!std::is_arithmetic<std::remove_cvref_t<U>>::value && | ||||||||||
+ !std::is_enum<U>::value>* = nullptr> | ||||||||||
+ RTC_FORCE_INLINE auto operator<<(const U& arg) const { | ||||||||||
+ return LogStreamer<decltype(MakeVal(arg))>(MakeVal(arg), this); | ||||||||||
+ } | ||||||||||
+ | ||||||||||
+ //RTC_FORCE_INLINE auto operator<<(const std::string& arg) const { | ||||||||||
+ // return LogStreamer<Val<CheckArgType::kStdString, const std::string*>>(MakeVal(arg), this); | ||||||||||
+ // | ||||||||||
+ | ||||||||||
Comment on lines
+90
to
+93
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Not worth resetting a build of qtwebengine over this |
||||||||||
+#if RTC_CHECK_MSG_ENABLED | ||||||||||
+ template <typename... Us> | ||||||||||
+ RTC_NORETURN RTC_FORCE_INLINE static void Call(const char* file, | ||||||||||
+ const int line, | ||||||||||
+ const char* message, | ||||||||||
+ const Us&... args) { | ||||||||||
+ static constexpr CheckArgType t[] = {Us::Type()..., CheckArgType::kEnd}; | ||||||||||
+ FatalLog(file, line, message, t, args.GetVal()...); | ||||||||||
+ } | ||||||||||
+ | ||||||||||
+ template <typename... Us> | ||||||||||
+ RTC_NORETURN RTC_FORCE_INLINE static void CallCheckOp(const char* file, | ||||||||||
+ const int line, | ||||||||||
+ const char* message, | ||||||||||
+ const Us&... args) { | ||||||||||
+ static constexpr CheckArgType t[] = {CheckArgType::kCheckOp, Us::Type()..., | ||||||||||
+ CheckArgType::kEnd}; | ||||||||||
+ FatalLog(file, line, message, t, args.GetVal()...); | ||||||||||
+ } | ||||||||||
+#else | ||||||||||
+ template <typename... Us> | ||||||||||
+ RTC_NORETURN RTC_FORCE_INLINE static void Call(const char* file, | ||||||||||
+ const int line) { | ||||||||||
+ FatalLog(file, line); | ||||||||||
+ } | ||||||||||
+#endif | ||||||||||
+}; | ||||||||||
+ | ||||||||||
template <bool isCheckOp> | ||||||||||
class FatalLogCall final { | ||||||||||
public: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Observations:
auto
appears OK because the code before was always returning a prvalue and there's no intended SFINAE happening theredecltype(MakeVal(an xvalue))
while the new code is doingdecltype(MakeVal(an lvalue))
. But the runtime code in both cases is calling with an lvalue.remove_cvref_t
; template argument deduction will never deduce a ref here, so C++14remove_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>()))
todecltype(MakeVal(std::declval<U&>()))
to match the runtime code fixes itThere was a problem hiding this comment.
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.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 aboutU
orU&
. However cl is strange from time to time.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test failed