diff options
author | Andras Becsi <andras.becsi@digia.com> | 2014-03-18 13:16:26 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-03-20 15:55:39 +0100 |
commit | 3f0f86b0caed75241fa71c95a5d73bc0164348c5 (patch) | |
tree | 92b9fb00f2e9e90b0be2262093876d4f43b6cd13 /chromium/sdch | |
parent | e90d7c4b152c56919d963987e2503f9909a666d2 (diff) | |
download | qtwebengine-chromium-3f0f86b0caed75241fa71c95a5d73bc0164348c5.tar.gz |
Update to new stable branch 1750
This also includes an updated ninja and chromium dependencies
needed on Windows.
Change-Id: Icd597d80ed3fa4425933c9f1334c3c2e31291c42
Reviewed-by: Zoltan Arvai <zarvai@inf.u-szeged.hu>
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'chromium/sdch')
-rw-r--r-- | chromium/sdch/logging_forward.h | 22 | ||||
-rw-r--r-- | chromium/sdch/sdch.gyp | 34 |
2 files changed, 54 insertions, 2 deletions
diff --git a/chromium/sdch/logging_forward.h b/chromium/sdch/logging_forward.h new file mode 100644 index 00000000000..fc0d3278c18 --- /dev/null +++ b/chromium/sdch/logging_forward.h @@ -0,0 +1,22 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef SDCH_LOGGING_FORWARD_H_ +#define SDCH_LOGGING_FORWARD_H_ + +// Define open-vcdiff's logging.h header guard, so that it doesn't get used. +#define OPEN_VCDIFF_LOGGING_H_ + +#include "base/logging.h" + +// open-vcdiff's logging.h includes iostream, which adds static initializers +// to several compilation units. To prevent this, provide this replacement +// header which forwards open-vcdiffs logging macros to chromium's base logging +// mechanism. +#define VCD_WARNING LOG(WARNING) +#define VCD_ERROR LOG(ERROR) +#define VCD_DFATAL LOG(DFATAL) +#define VCD_ENDL "\n" + +#endif // SDCH_LOGGING_FORWARD_H_ diff --git a/chromium/sdch/sdch.gyp b/chromium/sdch/sdch.gyp index d84be582ed7..8d609d5d4a2 100644 --- a/chromium/sdch/sdch.gyp +++ b/chromium/sdch/sdch.gyp @@ -11,9 +11,11 @@ 'target_name': 'sdch', 'type': 'static_library', 'dependencies': [ + '../base/base.gyp:base', '../third_party/zlib/zlib.gyp:zlib', ], 'sources': [ + 'logging_forward.h', 'open-vcdiff/src/addrcache.cc', 'open-vcdiff/src/blockhash.cc', 'open-vcdiff/src/blockhash.h', @@ -31,8 +33,6 @@ 'open-vcdiff/src/headerparser.h', 'open-vcdiff/src/instruction_map.cc', 'open-vcdiff/src/instruction_map.h', - 'open-vcdiff/src/logging.cc', - 'open-vcdiff/src/logging.h', 'open-vcdiff/src/rolling_hash.h', 'open-vcdiff/src/testing.h', 'open-vcdiff/src/varint_bigendian.cc', @@ -58,7 +58,37 @@ [ 'OS == "ios"', { 'include_dirs': [ 'ios' ] } ], [ 'OS == "mac"', { 'include_dirs': [ 'mac' ] } ], [ 'OS == "win"', { 'include_dirs': [ 'open-vcdiff/vsprojects' ] } ], + # TODO(mark): Remove usage of the deprecated auto_ptr. + [ 'clang == 1', { 'cflags': [ '-Wno-deprecated-declarations' ] } ], ], + # open-vcdiff's logging.h introduces static initializers. This was + # reported upstream years ago ( + # https://code.google.com/p/open-vcdiff/issues/detail?id=33 ). Since + # upstream won't fix this, work around it on the chromium side: + # Inject a header that forwards to base/logging.h instead (which doesn't + # introduce static initializers, and which prevents open-vcdiff's + # logging.h from being used). + 'variables': { + 'logging_path': 'logging_forward.h', + 'conditions': [ + # gyp leaves unspecified what the cwd is when running the compiler, + # and gyp/linux doesn't have a built-in way for forcing an include. + # So hardcode the base directory. If this spreads, provide native + # support in gyp, like we have for gyp/mac and gyp/windows. + # path. + ['"<(GENERATOR)"=="ninja"', { 'logging_dir': '../..' }, + { 'logging_dir': '.' } + ], + ], + }, + # GCC_PREFIX_HEADER is relative to the current directory, + # ForcedIncludeFiles is relative to include_dirs, cflags relative to the + # build directory. + 'xcode_settings': { 'GCC_PREFIX_HEADER': '<(logging_path)' }, + 'msvs_settings': { + 'VCCLCompilerTool': { 'ForcedIncludeFiles': [ 'sdch/<(logging_path)' ] } + }, + 'cflags': [ '-include', '<(logging_dir)/sdch/<(logging_path)' ], }, ], } |