From dadf8c49e3a2deb3c79c3e95e1702cab95eeaab7 Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" Date: Thu, 16 Jan 2014 18:49:41 +0000 Subject: Revert of Convert the re2 GYP targets to be generated by GN. (https://codereview.chromium.org/68853015/) Reason for revert: Broke Blink compile Original issue's description: > Convert the re2 GYP targets to be generated by GN. > > BUG=288991 > R=bradnelson@google.com > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=245254 TBR=bradnelson@chromium.org,bradnelson@google.com NOTREECHECKS=true NOTRY=true BUG=288991 Review URL: https://codereview.chromium.org/141063002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245271 0039d316-1c4b-4281-b951-d872f2087c98 --- build/all.gyp | 2 +- chrome/chrome_browser.gypi | 2 +- chrome/chrome_browser_chromeos.gypi | 2 +- chrome/chrome_browser_extensions.gypi | 2 +- chrome/chrome_browser_ui.gypi | 2 +- chrome/chrome_common.gypi | 2 +- chrome/chrome_renderer.gypi | 2 +- chrome/tools/profile_reset/jtl_compiler.gyp | 2 +- components/plugins.gypi | 2 +- components/url_matcher.gypi | 2 +- content/content_browser.gypi | 2 +- extensions/extensions.gyp | 2 +- gpu/command_buffer_service.gypi | 2 +- gpu/gpu_config.gypi | 2 +- third_party/leveldatabase/leveldatabase.gyp | 2 +- third_party/libaddressinput/libaddressinput.gyp | 2 +- third_party/re2/BUILD.gn | 75 ---------------------- third_party/re2/re2.gyp | 84 +++++++++++++++++++++++++ tools/gn/secondary/third_party/re2/BUILD.gn | 77 +++++++++++++++++++++++ 19 files changed, 177 insertions(+), 91 deletions(-) delete mode 100644 third_party/re2/BUILD.gn create mode 100644 third_party/re2/re2.gyp create mode 100644 tools/gn/secondary/third_party/re2/BUILD.gn diff --git a/build/all.gyp b/build/all.gyp index 84fb690..721d04f 100644 --- a/build/all.gyp +++ b/build/all.gyp @@ -47,7 +47,6 @@ '../media/cast/cast.gyp:*', '../media/media.gyp:*', '../mojo/mojo.gyp:*', - '../out/gn_gyp/third_party/re2/re2.gyp:re2', '../ppapi/ppapi.gyp:*', '../ppapi/ppapi_internal.gyp:*', '../printing/printing.gyp:*', @@ -66,6 +65,7 @@ '../third_party/npapi/npapi.gyp:*', '../third_party/ots/ots.gyp:*', '../third_party/qcms/qcms.gyp:*', + '../third_party/re2/re2.gyp:re2', '../third_party/WebKit/public/all.gyp:*', '../tools/gn/gn.gyp:*', '../tools/perf/clear_system_cache/clear_system_cache.gyp:*', diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 0c0077b..8ec29e1 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -2635,7 +2635,7 @@ '../third_party/libusb/libusb.gyp:libusb', '../third_party/libyuv/libyuv.gyp:libyuv', '../third_party/npapi/npapi.gyp:npapi', - '../out/gn_gyp/third_party/re2/re2.gyp:re2', + '../third_party/re2/re2.gyp:re2', '../third_party/webrtc/modules/modules.gyp:desktop_capture', '../ui/gl/gl.gyp:gl', '../ui/surface/surface.gyp:surface', diff --git a/chrome/chrome_browser_chromeos.gypi b/chrome/chrome_browser_chromeos.gypi index 34c8cfa..31e8aaf 100644 --- a/chrome/chrome_browser_chromeos.gypi +++ b/chrome/chrome_browser_chromeos.gypi @@ -82,7 +82,7 @@ '../third_party/npapi/npapi.gyp:npapi', '../third_party/protobuf/protobuf.gyp:protobuf_lite', '../third_party/protobuf/protobuf.gyp:protoc#host', - '../out/gn_gyp/third_party/re2/re2.gyp:re2', + '../third_party/re2/re2.gyp:re2', '../third_party/zlib/zlib.gyp:zlib', '../ui/base/strings/ui_strings.gyp:ui_strings', '../ui/events/events.gyp:dom4_keycode_converter', diff --git a/chrome/chrome_browser_extensions.gypi b/chrome/chrome_browser_extensions.gypi index 23c61ce..6185ddf 100644 --- a/chrome/chrome_browser_extensions.gypi +++ b/chrome/chrome_browser_extensions.gypi @@ -44,7 +44,7 @@ '../third_party/icu/icu.gyp:icuuc', '../third_party/leveldatabase/leveldatabase.gyp:leveldatabase', '../third_party/libusb/libusb.gyp:libusb', - '../out/gn_gyp/third_party/re2/re2.gyp:re2', + '../third_party/re2/re2.gyp:re2', '../third_party/webrtc/modules/modules.gyp:desktop_capture', '../ui/base/strings/ui_strings.gyp:ui_strings', '../ui/gfx/gfx.gyp:gfx', diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi index 7ab40f0..e8acd1e 100644 --- a/chrome/chrome_browser_ui.gypi +++ b/chrome/chrome_browser_ui.gypi @@ -2635,7 +2635,7 @@ '../third_party/leveldatabase/leveldatabase.gyp:leveldatabase', '../third_party/libjingle/libjingle.gyp:libjingle', '../third_party/npapi/npapi.gyp:npapi', - '../out/gn_gyp/third_party/re2/re2.gyp:re2', + '../third_party/re2/re2.gyp:re2', '../ui/compositor/compositor.gyp:compositor', '../ui/surface/surface.gyp:surface', '../ui/web_dialogs/web_dialogs.gyp:web_dialogs', diff --git a/chrome/chrome_common.gypi b/chrome/chrome_common.gypi index f915ee1..198010d 100644 --- a/chrome/chrome_common.gypi +++ b/chrome/chrome_common.gypi @@ -422,7 +422,7 @@ '<(DEPTH)/extensions/extensions.gyp:extensions_common', '<(DEPTH)/ipc/ipc.gyp:ipc', '<(DEPTH)/third_party/adobe/flash/flash_player.gyp:flapper_version_h', - '<(DEPTH)/out/gn_gyp/third_party/re2/re2.gyp:re2', + '<(DEPTH)/third_party/re2/re2.gyp:re2', '<(DEPTH)/third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h', ], }, { # OS == ios diff --git a/chrome/chrome_renderer.gypi b/chrome/chrome_renderer.gypi index 1dc50ae..d2c134b 100644 --- a/chrome/chrome_renderer.gypi +++ b/chrome/chrome_renderer.gypi @@ -29,7 +29,7 @@ '../third_party/icu/icu.gyp:icui18n', '../third_party/icu/icu.gyp:icuuc', '../third_party/npapi/npapi.gyp:npapi', - '../out/gn_gyp/third_party/re2/re2.gyp:re2', + '../third_party/re2/re2.gyp:re2', '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h', '../ui/surface/surface.gyp:surface', '../webkit/child/webkit_child.gyp:webkit_child', diff --git a/chrome/tools/profile_reset/jtl_compiler.gyp b/chrome/tools/profile_reset/jtl_compiler.gyp index cd445c5..57cf07d 100644 --- a/chrome/tools/profile_reset/jtl_compiler.gyp +++ b/chrome/tools/profile_reset/jtl_compiler.gyp @@ -23,7 +23,7 @@ 'product_name': 'jtl_compiler', 'dependencies': [ '../../../base/base.gyp:base', - '../../../out/gn_gyp/third_party/re2/re2.gyp:re2', + '../../../third_party/re2/re2.gyp:re2', ], 'sources': [ '../../browser/profile_resetter/jtl_foundation.h', diff --git a/components/plugins.gypi b/components/plugins.gypi index 8679f06..e7b00ec 100644 --- a/components/plugins.gypi +++ b/components/plugins.gypi @@ -13,7 +13,7 @@ 'dependencies': [ '../gin/gin.gyp:gin', '../skia/skia.gyp:skia', - '../out/gn_gyp/third_party/re2/re2.gyp:re2', + '../third_party/re2/re2.gyp:re2', '../third_party/WebKit/public/blink.gyp:blink', '../v8/tools/gyp/v8.gyp:v8', ], diff --git a/components/url_matcher.gypi b/components/url_matcher.gypi index da057de..3476552 100644 --- a/components/url_matcher.gypi +++ b/components/url_matcher.gypi @@ -10,7 +10,7 @@ 'dependencies': [ '../base/base.gyp:base', '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', - '../out/gn_gyp/third_party/re2/re2.gyp:re2', + '../third_party/re2/re2.gyp:re2', '../url/url.gyp:url_lib', ], 'include_dirs': [ diff --git a/content/content_browser.gypi b/content/content_browser.gypi index 5508dae..612470c 100644 --- a/content/content_browser.gypi +++ b/content/content_browser.gypi @@ -8,9 +8,9 @@ '../crypto/crypto.gyp:crypto', '../google_apis/google_apis.gyp:google_apis', '../net/net.gyp:net', - '../out/gn_gyp/third_party/re2/re2.gyp:re2', '../skia/skia.gyp:skia', '../sql/sql.gyp:sql', + '../third_party/re2/re2.gyp:re2', '../third_party/zlib/google/zip.gyp:zip', '../third_party/zlib/zlib.gyp:zlib', '../ui/accessibility/accessibility.gyp:accessibility', diff --git a/extensions/extensions.gyp b/extensions/extensions.gyp index f6d245d..dfc66c10 100644 --- a/extensions/extensions.gyp +++ b/extensions/extensions.gyp @@ -20,7 +20,7 @@ '../chrome/common/extensions/api/api.gyp:api', '../components/components.gyp:url_matcher', '../content/content.gyp:content_common', - '../out/gn_gyp/third_party/re2/re2.gyp:re2', + '../third_party/re2/re2.gyp:re2', ], 'include_dirs': [ '..', diff --git a/gpu/command_buffer_service.gypi b/gpu/command_buffer_service.gypi index 60f8fb0..a216090 100644 --- a/gpu/command_buffer_service.gypi +++ b/gpu/command_buffer_service.gypi @@ -23,7 +23,7 @@ '../third_party/khronos/khronos.gyp:khronos_headers', '../third_party/protobuf/protobuf.gyp:protobuf_lite', '../third_party/smhasher/smhasher.gyp:cityhash', - '../out/gn_gyp/third_party/re2/re2.gyp:re2', + '../third_party/re2/re2.gyp:re2', ], 'sources': [ 'command_buffer/service/async_pixel_transfer_delegate.cc', diff --git a/gpu/gpu_config.gypi b/gpu/gpu_config.gypi index 8d35a96..9c1d581 100644 --- a/gpu/gpu_config.gypi +++ b/gpu/gpu_config.gypi @@ -5,7 +5,7 @@ { 'dependencies': [ '../base/base.gyp:base', - '../out/gn_gyp/third_party/re2/re2.gyp:re2', + '../third_party/re2/re2.gyp:re2', '../ui/gl/gl.gyp:gl', ], 'include_dirs': [ diff --git a/third_party/leveldatabase/leveldatabase.gyp b/third_party/leveldatabase/leveldatabase.gyp index f3510f6..531f9f6 100644 --- a/third_party/leveldatabase/leveldatabase.gyp +++ b/third_party/leveldatabase/leveldatabase.gyp @@ -41,7 +41,7 @@ # base::LazyInstance is a template that pulls in dynamic_annotations so # we need to explictly link in the code for dynamic_annotations. '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', - '../../out/gn_gyp/third_party/re2/re2.gyp:re2', + '../re2/re2.gyp:re2', ], 'conditions': [ ['use_snappy', { diff --git a/third_party/libaddressinput/libaddressinput.gyp b/third_party/libaddressinput/libaddressinput.gyp index 3ab75c5..1ed4c231 100644 --- a/third_party/libaddressinput/libaddressinput.gyp +++ b/third_party/libaddressinput/libaddressinput.gyp @@ -100,7 +100,7 @@ 'dependencies': [ 'generated_messages', '<(DEPTH)/base/base.gyp:base', - '<(DEPTH)/out/gn_gyp/third_party/re2/re2.gyp:re2', + '<(DEPTH)/third_party/re2/re2.gyp:re2', ], 'direct_dependent_settings': { 'include_dirs': [ diff --git a/third_party/re2/BUILD.gn b/third_party/re2/BUILD.gn deleted file mode 100644 index 8ae94a2..0000000 --- a/third_party/re2/BUILD.gn +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright (c) 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. - -gyp_file = "//out/gn_gyp/third_party/re2/re2.gyp" - -config("re2_config") { - include_dirs = [ "." ] -} - -static_library("re2") { - sources = [ - "mswin/stdint.h", - "re2/bitstate.cc", - "re2/compile.cc", - "re2/dfa.cc", - "re2/filtered_re2.cc", - "re2/filtered_re2.h", - "re2/mimics_pcre.cc", - "re2/nfa.cc", - "re2/onepass.cc", - "re2/parse.cc", - "re2/perl_groups.cc", - "re2/prefilter.cc", - "re2/prefilter.h", - "re2/prefilter_tree.cc", - "re2/prefilter_tree.h", - "re2/prog.cc", - "re2/prog.h", - "re2/re2.cc", - "re2/re2.h", - "re2/regexp.cc", - "re2/regexp.h", - "re2/set.cc", - "re2/set.h", - "re2/simplify.cc", - "re2/stringpiece.h", - "re2/tostring.cc", - "re2/unicode_casefold.cc", - "re2/unicode_casefold.h", - "re2/unicode_groups.cc", - "re2/unicode_groups.h", - "re2/variadic_function.h", - "re2/walker-inl.h", - "util/arena.cc", - "util/arena.h", - "util/atomicops.h", - "util/flags.h", - "util/hash.cc", - "util/logging.h", - "util/mutex.h", - "util/rune.cc", - "util/sparse_array.h", - "util/sparse_set.h", - "util/stringpiece.cc", - "util/stringprintf.cc", - "util/strutil.cc", - "util/utf.h", - "util/util.h", - ] - - configs -= "//build/config/compiler:chromium_code" - configs += "//build/config/compiler:no_chromium_code" - direct_dependent_configs = [ ":re2_config" ] - - deps = [ - "//base/third_party/dynamic_annotations", - ] - - if (is_win) { - include_dirs = [ "mswin" ] - } else { - sources -= "mswin/stdint.h" - } -} diff --git a/third_party/re2/re2.gyp b/third_party/re2/re2.gyp new file mode 100644 index 0000000..3f7539a --- /dev/null +++ b/third_party/re2/re2.gyp @@ -0,0 +1,84 @@ +# Copyright 2014 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. + +{ + 'targets': [ + { + 'target_name': 're2', + 'type': 'static_library', + 'include_dirs': [ + '.', + '<(DEPTH)', + ], + 'direct_dependent_settings': { + 'include_dirs': [ + '.', + '<(DEPTH)', + ], + }, + 'dependencies': [ + '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', + ], + 'sources': [ + 're2/bitstate.cc', + 're2/compile.cc', + 're2/dfa.cc', + 're2/filtered_re2.cc', + 're2/filtered_re2.h', + 're2/mimics_pcre.cc', + 're2/nfa.cc', + 're2/onepass.cc', + 're2/parse.cc', + 're2/perl_groups.cc', + 're2/prefilter.cc', + 're2/prefilter.h', + 're2/prefilter_tree.cc', + 're2/prefilter_tree.h', + 're2/prog.cc', + 're2/prog.h', + 're2/re2.cc', + 're2/re2.h', + 're2/regexp.cc', + 're2/regexp.h', + 're2/set.cc', + 're2/set.h', + 're2/simplify.cc', + 're2/stringpiece.h', + 're2/tostring.cc', + 're2/unicode_casefold.cc', + 're2/unicode_casefold.h', + 're2/unicode_groups.cc', + 're2/unicode_groups.h', + 're2/variadic_function.h', + 're2/walker-inl.h', + 'util/arena.cc', + 'util/arena.h', + 'util/atomicops.h', + 'util/flags.h', + 'util/hash.cc', + 'util/logging.h', + 'util/mutex.h', + 'util/rune.cc', + 'util/sparse_array.h', + 'util/sparse_set.h', + 'util/stringpiece.cc', + 'util/stringprintf.cc', + 'util/strutil.cc', + 'util/utf.h', + 'util/util.h', + ], + 'conditions': [ + ['OS=="win"', { + 'sources': [ + 'mswin/stdint.h' + ], + 'include_dirs': [ + 'mswin' + ], + 'msvs_disabled_warnings': [ 4018, 4722, 4267 ], + }] + ] + }, + ], +} diff --git a/tools/gn/secondary/third_party/re2/BUILD.gn b/tools/gn/secondary/third_party/re2/BUILD.gn new file mode 100644 index 0000000..6be6f56 --- /dev/null +++ b/tools/gn/secondary/third_party/re2/BUILD.gn @@ -0,0 +1,77 @@ +# Copyright 2014 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. + +config("re2_config") { + include_dirs = [ "." ] +} + +gyp_file = "re2.gyp" +external = true + +static_library("re2") { + sources = [ + "mswin/stdint.h", + "re2/bitstate.cc", + "re2/compile.cc", + "re2/dfa.cc", + "re2/filtered_re2.cc", + "re2/filtered_re2.h", + "re2/mimics_pcre.cc", + "re2/nfa.cc", + "re2/onepass.cc", + "re2/parse.cc", + "re2/perl_groups.cc", + "re2/prefilter.cc", + "re2/prefilter.h", + "re2/prefilter_tree.cc", + "re2/prefilter_tree.h", + "re2/prog.cc", + "re2/prog.h", + "re2/re2.cc", + "re2/re2.h", + "re2/regexp.cc", + "re2/regexp.h", + "re2/set.cc", + "re2/set.h", + "re2/simplify.cc", + "re2/stringpiece.h", + "re2/tostring.cc", + "re2/unicode_casefold.cc", + "re2/unicode_casefold.h", + "re2/unicode_groups.cc", + "re2/unicode_groups.h", + "re2/variadic_function.h", + "re2/walker-inl.h", + "util/arena.cc", + "util/arena.h", + "util/atomicops.h", + "util/flags.h", + "util/hash.cc", + "util/logging.h", + "util/mutex.h", + "util/rune.cc", + "util/sparse_array.h", + "util/sparse_set.h", + "util/stringpiece.cc", + "util/stringprintf.cc", + "util/strutil.cc", + "util/utf.h", + "util/util.h", + ] + + configs -= "//build/config/compiler:chromium_code" + configs += "//build/config/compiler:no_chromium_code" + direct_dependent_configs = [ ":re2_config" ] + + deps = [ + "//base/third_party/dynamic_annotations", + ] + + if (is_win) { + include_dirs = [ "mswin" ] + # TODO(brettw) 'msvs_disabled_warnings': [ 4018, 4722, 4267 ], + } else { + sources -= "mswin/stdint.h" + } +} -- cgit v1.1