diff options
author | Zeno Albisser <zeno.albisser@digia.com> | 2013-06-27 15:51:43 +0200 |
---|---|---|
committer | Andras Becsi <andras.becsi@digia.com> | 2014-06-04 18:04:26 +0200 |
commit | 8cb68c4fbd51eaf9ea6700d2e9da71755132c8b1 (patch) | |
tree | 64754611b29f018f5fc5b92aa381f0d13b61b997 | |
parent | f986d5511a358a2699f494c3e83c7abb2d592948 (diff) | |
download | qtwebengine-chromium-8cb68c4fbd51eaf9ea6700d2e9da71755132c8b1.tar.gz |
<chromium> Mac: Use libc++ instead of stdlibc++.
- Add a missing include file to process_iterator_mac.cc.
- Disable Chromium clang plugins.
- Add a use_libcpp variable to common.gypi that can be used
to build with libc++ instead of libstdc++.
In this case several warnings also must be disabled.
- ext/hash_map and ext/hash_set are deprecated.
Use unordered containers as a replacement.
Change-Id: Ief9e8901d0463f2bb62a5960cde03543b3999be1
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
-rw-r--r-- | chromium/base/process/process_iterator_mac.cc | 1 | ||||
-rw-r--r-- | chromium/build/common.gypi | 31 | ||||
-rw-r--r-- | chromium/third_party/protobuf/config.h | 27 |
3 files changed, 44 insertions, 15 deletions
diff --git a/chromium/base/process/process_iterator_mac.cc b/chromium/base/process/process_iterator_mac.cc index 29daa2d489f..e35c2ae19ba 100644 --- a/chromium/base/process/process_iterator_mac.cc +++ b/chromium/base/process/process_iterator_mac.cc @@ -7,6 +7,7 @@ #include <errno.h> #include <sys/sysctl.h> #include <sys/types.h> +#include <unistd.h> #include "base/logging.h" #include "base/strings/string_util.h" diff --git a/chromium/build/common.gypi b/chromium/build/common.gypi index d7b385cc0ee..e995bd644eb 100644 --- a/chromium/build/common.gypi +++ b/chromium/build/common.gypi @@ -1232,6 +1232,9 @@ # rlz codes for searches but do not use the library. 'enable_rlz%': 0, + # Compile with libc++ instead of libstdc++. + 'use_libcpp%' : 0, + # Turns on the i18n support in V8. 'v8_enable_i18n_support': 1, @@ -2134,6 +2137,18 @@ ['use_clipboard_aurax11==1', { 'defines': ['USE_CLIPBOARD_AURAX11=1'], }], + ['use_libcpp==1', { + 'defines': ['USE_UNORDERED_CONTAINERS=1'], + 'cflags_cc': [ + '-Wno-deprecated-declarations', + '-Wno-newline-eof', + '-Wno-unused-value', + '-Wno-unused-variable', + '-Wno-unused-function', + '-Wno-header-hygiene', + '-stdlib=libc++' + ], + }], ['enable_one_click_signin==1', { 'defines': ['ENABLE_ONE_CLICK_SIGNIN'], }], @@ -3335,7 +3350,7 @@ # Clang considers the `register` keyword as deprecated, but e.g. # code generated by flex (used in angle) contains that keyword. # http://crbug.com/255186 - '-Wno-deprecated-register', + '-Wno-deprecated', ], 'cflags!': [ # Clang doesn't seem to know know this flag. @@ -4043,7 +4058,19 @@ # Clang considers the `register` keyword as deprecated, but e.g. # code generated by flex (used in angle) contains that keyword. # http://crbug.com/255186 - '-Wno-deprecated-register', + '-Wno-deprecated', + ], + }], + ['use_libcpp==1', { + 'OTHER_CPLUSPLUSFLAGS': ['-stdlib=libc++'], + 'USE_LIBCPP': 'YES', + 'WARNING_CFLAGS': [ + '-Wno-deprecated-declarations', + '-Wno-newline-eof', + '-Wno-unused-value', + '-Wno-unused-variable', + '-Wno-unused-function', + '-Wno-header-hygiene', ], }], ['clang==1 and clang_use_chrome_plugins==1', { diff --git a/chromium/third_party/protobuf/config.h b/chromium/third_party/protobuf/config.h index dcc0041c2fe..affcf55be5f 100644 --- a/chromium/third_party/protobuf/config.h +++ b/chromium/third_party/protobuf/config.h @@ -1,31 +1,32 @@ /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ -/* the name of <hash_set> */ -#define HASH_MAP_CLASS hash_map +#if defined(USE_UNORDERED_CONTAINERS) + +#define HASH_MAP_H <unordered_map> +#define HASH_SET_H <unordered_set> +#define HASH_NAMESPACE std +#define HASH_MAP_CLASS unordered_map +#define HASH_SET_CLASS unordered_set -/* the location of <hash_map> */ -#if defined(USE_STLPORT) -#define HASH_MAP_H <hash_map> #else -#define HASH_MAP_H <ext/hash_map> -#endif -/* the namespace of hash_map/hash_set */ #if defined(USE_STLPORT) +#define HASH_MAP_H <hash_map> +#define HASH_SET_H <hash_set> #define HASH_NAMESPACE std #else +#define HASH_MAP_H <ext/hash_map> +#define HASH_SET_H <ext/hash_set> #define HASH_NAMESPACE __gnu_cxx #endif /* the name of <hash_set> */ +#define HASH_MAP_CLASS hash_map + +/* the name of <hash_set> */ #define HASH_SET_CLASS hash_set -/* the location of <hash_set> */ -#if defined(USE_STLPORT) -#define HASH_SET_H <hash_set> -#else -#define HASH_SET_H <ext/hash_set> #endif /* Define to 1 if you have the <dlfcn.h> header file. */ |