From c0cecd53b78a6292b5125c0c19e257415100214d Mon Sep 17 00:00:00 2001 From: "wtc@chromium.org" Date: Tue, 27 Jul 2010 22:56:57 +0000 Subject: Revert the changes to libxml.gyp in r52725. Both libxml and its direct dependencies need to define LIBXML_STATIC when libxml is a static library. Right now it is necessary to define this macro only on Windows, but the macro is intended to be cross-platform. R=evan BUG=50048 TEST=Windows build log should not contain "locally defined symbol XXX imported" linker warings such as: libxslt.lib(numbers.obj) : warning LNK4049: locally defined symbol _xmlFree imported Review URL: http://codereview.chromium.org/3063009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53861 0039d316-1c4b-4281-b951-d872f2087c98 --- third_party/libxml/libxml.gyp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'third_party/libxml/libxml.gyp') diff --git a/third_party/libxml/libxml.gyp b/third_party/libxml/libxml.gyp index 0311df1..63304de 100644 --- a/third_party/libxml/libxml.gyp +++ b/third_party/libxml/libxml.gyp @@ -148,6 +148,13 @@ 'xpath.c', 'xpointer.c', ], + 'defines': [ + # Define LIBXML_STATIC as nothing to match how libxml.h + # (an internal header) defines LIBXML_STATIC, otherwise + # we get the macro redefined warning from GCC. (-DFOO + # defines the macro FOO as 1.) + 'LIBXML_STATIC=', + ], 'include_dirs': [ '<(os_include)', '<(os_include)/include', @@ -161,6 +168,9 @@ '../icu/icu.gyp:icuuc', ], 'direct_dependent_settings': { + 'defines': [ + 'LIBXML_STATIC', + ], 'include_dirs': [ '<(os_include)/include', 'include', @@ -178,11 +188,6 @@ ['OS=="mac"', {'defines': ['_REENTRANT']}], ['OS=="win"', { 'product_name': 'libxml2', - 'defines': [ - # This symbol prevents libxml from marking its functions with - # __declspec(dllexport). - 'LIBXML_STATIC', - ], }, { # else: OS!="win" 'product_name': 'xml2', }], -- cgit v1.1