mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 08:28:59 +08:00
[qtwebengine] Fix clang-cl and msvc in VS 17.8.3 (#35639)
This commit is contained in:
parent
ff68673745
commit
e1aeabf283
24
ports/qtwebengine/clang-cl.patch
Normal file
24
ports/qtwebengine/clang-cl.patch
Normal file
@ -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()
|
124
ports/qtwebengine/msvc-template.patch
Normal file
124
ports/qtwebengine/msvc-template.patch
Normal file
@ -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:
|
@ -1,7 +1,10 @@
|
||||
set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase")
|
||||
include("${SCRIPT_PATH}/qt_install_submodule.cmake")
|
||||
|
||||
set(${PORT}_PATCHES "")
|
||||
set(${PORT}_PATCHES
|
||||
"clang-cl.patch"
|
||||
"msvc-template.patch"
|
||||
)
|
||||
|
||||
set(TOOL_NAMES gn QtWebEngineProcess qwebengine_convert_dict)
|
||||
|
||||
@ -29,7 +32,7 @@ set(deactivated_features webengine_webrtc_pipewire)
|
||||
foreach(_feat IN LISTS deactivated_features)
|
||||
list(APPEND FEATURE_OPTIONS "-DFEATURE_${_feat}=OFF")
|
||||
endforeach()
|
||||
set(enabled_features webengine_webrtc webengine_v8_snapshot_support)
|
||||
set(enabled_features webengine_webrtc)
|
||||
foreach(_feat IN LISTS enabled_features)
|
||||
list(APPEND FEATURE_OPTIONS "-DFEATURE_${_feat}=ON")
|
||||
endforeach()
|
||||
|
@ -2,7 +2,7 @@
|
||||
"$comment": "x86-windows is not within the upstream support matrix of Qt6",
|
||||
"name": "qtwebengine",
|
||||
"version": "6.6.1",
|
||||
"port-version": 1,
|
||||
"port-version": 2,
|
||||
"description": "Qt WebEngine",
|
||||
"homepage": "https://www.qt.io/",
|
||||
"license": null,
|
||||
@ -152,7 +152,10 @@
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "qtwebchannel",
|
||||
"default-features": false
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"qml"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -7266,7 +7266,7 @@
|
||||
},
|
||||
"qtwebengine": {
|
||||
"baseline": "6.6.1",
|
||||
"port-version": 1
|
||||
"port-version": 2
|
||||
},
|
||||
"qtwebsockets": {
|
||||
"baseline": "6.6.1",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "0da0e5d03340ccc05f77e90cb898e62237746107",
|
||||
"version": "6.6.1",
|
||||
"port-version": 2
|
||||
},
|
||||
{
|
||||
"git-tree": "f84af713f1090d7294c2707dc722373c06857114",
|
||||
"version": "6.6.1",
|
||||
|
Loading…
Reference in New Issue
Block a user