forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[qtwebengine] Fix clang-cl and msvc in VS 17.8.3 (microsoft#35639)
- Loading branch information
Showing
6 changed files
with
164 additions
and
5 deletions.
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); | ||
+ // | ||
+ | ||
+#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