From 63d6be048011a189c1dd1480ded031fa1813ec3b Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Tue, 2 Apr 2019 14:42:16 -0700 Subject: [PATCH] chore: add patch to fix MSVC++ incompatibilty on Windows --- patches/common/chromium/.patches | 1 + .../fix_retain_compatibility_with_msvc.patch | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 patches/common/chromium/fix_retain_compatibility_with_msvc.patch diff --git a/patches/common/chromium/.patches b/patches/common/chromium/.patches index 3ad2a20b084e..6b5523fb052d 100644 --- a/patches/common/chromium/.patches +++ b/patches/common/chromium/.patches @@ -71,3 +71,4 @@ fix_disable_usage_of_abort_report_np_in_mas_builds.patch fix_disable_usage_of_pthread_fchdir_np_and_pthread_chdir_np_in_mas.patch fix_disable_usage_of_setapplicationisdaemon_and.patch disable_custom_libcxx_on_windows.patch +fix_retain_compatibility_with_msvc.patch diff --git a/patches/common/chromium/fix_retain_compatibility_with_msvc.patch b/patches/common/chromium/fix_retain_compatibility_with_msvc.patch new file mode 100644 index 000000000000..0c18b7acccb2 --- /dev/null +++ b/patches/common/chromium/fix_retain_compatibility_with_msvc.patch @@ -0,0 +1,25 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Samuel Attard +Date: Tue, 2 Apr 2019 14:38:43 -0700 +Subject: fix: retain compatibility with MSVC++ + +The C++ standard has always forbidden containers of const elements such +as std::set. In order to retain compability with MSVC++ this +code can not exist in Chromium. + +This should probably also be fixed in libc++ to prevent this occurring +again but this fixes the build for now. + +diff --git a/components/language/core/browser/language_prefs.cc b/components/language/core/browser/language_prefs.cc +index 317aa1d8298cd697c5388ddeb9680b39e562e9ab..df258ca62acfa8a198bcb7c4be31746a491d938b 100644 +--- a/components/language/core/browser/language_prefs.cc ++++ b/components/language/core/browser/language_prefs.cc +@@ -85,7 +85,7 @@ void LanguagePrefs::ResetEmptyFluentLanguagesToDefault() { + } + + base::Value LanguagePrefs::GetDefaultFluentLanguages() { +- std::set languages; ++ std::set languages; + #if defined(OS_CHROMEOS) + // Preferred languages. + std::string language = language::kFallbackInputMethodLocale;