From def7fce451d9f70ffa602d6e38524cb8ecc8adfa Mon Sep 17 00:00:00 2001 From: "pinkerton@google.com" Date: Wed, 17 Sep 2008 14:18:41 +0000 Subject: add a new xcconfig to build c++ files as obj-c++ to ensure correct linkage. Be more specific when using an overloaded operator since objective-c++ finds conflicts. Enable objective-C GC in our common config file for all projects. Review URL: http://codereview.chromium.org/2912 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2305 0039d316-1c4b-4281-b951-d872f2087c98 --- build/common.xcconfig | 1 + webkit/build/webkit_staticlib.xcconfig | 12 ++++++++++++ webkit/glue/editor_client_impl.cc | 2 +- webkit/webkit.xcodeproj/project.pbxproj | 6 ++++-- 4 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 webkit/build/webkit_staticlib.xcconfig diff --git a/build/common.xcconfig b/build/common.xcconfig index 4f4cab7..9bda6d4 100644 --- a/build/common.xcconfig +++ b/build/common.xcconfig @@ -6,6 +6,7 @@ ALWAYS_SEARCH_USER_PATHS = NO GCC_C_LANGUAGE_STANDARD = c99 GCC_CW_ASM_SYNTAX = NO GCC_DYNAMIC_NO_PIC = YES +GCC_ENABLE_OBJC_GC = YES GCC_ENABLE_PASCAL_STRINGS = NO GCC_INLINES_ARE_PRIVATE_EXTERN = YES GCC_PRECOMPILE_PREFIX_HEADER = YES diff --git a/webkit/build/webkit_staticlib.xcconfig b/webkit/build/webkit_staticlib.xcconfig new file mode 100644 index 0000000..e74a6a4 --- /dev/null +++ b/webkit/build/webkit_staticlib.xcconfig @@ -0,0 +1,12 @@ +// Copyright (c) 2008 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. + +#include "../build/staticlib.xcconfig" + +// We need to compile everything in this target as objective-C++ in order to +// avoid linker issues with parameters declared sometimes as |void*| (from C++) +// and other times as |id| (from Objective-C). However, we can't set this +// globally because some things (such as icu or other 3rd-party libraries) can't +// build this way. +GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp diff --git a/webkit/glue/editor_client_impl.cc b/webkit/glue/editor_client_impl.cc index c81921d..7aebe06 100644 --- a/webkit/glue/editor_client_impl.cc +++ b/webkit/glue/editor_client_impl.cc @@ -552,7 +552,7 @@ bool EditorClientImpl::handleEditingKeyboardEvent( } if (evt->keyEvent()->text().length() == 1) { - UChar ch = evt->keyEvent()->text()[0]; + UChar ch = evt->keyEvent()->text()[0U]; // Don't insert null or control characters as they can result in // unexpected behaviour diff --git a/webkit/webkit.xcodeproj/project.pbxproj b/webkit/webkit.xcodeproj/project.pbxproj index 53d59d9..f862155 100644 --- a/webkit/webkit.xcodeproj/project.pbxproj +++ b/webkit/webkit.xcodeproj/project.pbxproj @@ -3705,6 +3705,7 @@ E4E4C88E0E783E49009A687C /* SkGraphicsContextMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SkGraphicsContextMac.cpp; sourceTree = ""; }; E4E4CA190E80208A009A687C /* FontCacheMacPending.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FontCacheMacPending.cpp; path = mac/FontCacheMacPending.cpp; sourceTree = ""; }; E4E4CA900E803BB9009A687C /* AXObjectCacheMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AXObjectCacheMac.cpp; sourceTree = ""; }; + E4E4CAE60E805325009A687C /* webkit_staticlib.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = webkit_staticlib.xcconfig; path = build/webkit_staticlib.xcconfig; sourceTree = SOURCE_ROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -5943,6 +5944,7 @@ 7BF8842E0E71C120000BAF8A /* executable.xcconfig */, 7BF8842F0E71C120000BAF8A /* release.xcconfig */, 7BF884300E71C120000BAF8A /* staticlib.xcconfig */, + E4E4CAE60E805325009A687C /* webkit_staticlib.xcconfig */, ); name = Configuration; path = ../build; @@ -8616,7 +8618,7 @@ }; E45627130E268F03005E4685 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7BF884300E71C120000BAF8A /* staticlib.xcconfig */; + baseConfigurationReference = E4E4CAE60E805325009A687C /* webkit_staticlib.xcconfig */; buildSettings = { GCC_PREFIX_HEADER = ../third_party/WebKit/WebCore/WebCorePrefix.h; HEADER_SEARCH_PATHS = ( @@ -8633,7 +8635,7 @@ }; E45627140E268F03005E4685 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7BF884300E71C120000BAF8A /* staticlib.xcconfig */; + baseConfigurationReference = E4E4CAE60E805325009A687C /* webkit_staticlib.xcconfig */; buildSettings = { GCC_PREFIX_HEADER = ../third_party/WebKit/WebCore/WebCorePrefix.h; HEADER_SEARCH_PATHS = ( -- cgit v1.1