summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-30 00:40:03 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-30 00:40:03 +0000
commit6b5d2f943a91bf8a33642692cdf34d832ad3adea (patch)
tree0999856e609d547f9539268b9b211b1e844f883e
parentd6cb41986a729ed1a42f4460145d42c199ec608b (diff)
downloadchromium_src-6b5d2f943a91bf8a33642692cdf34d832ad3adea.zip
chromium_src-6b5d2f943a91bf8a33642692cdf34d832ad3adea.tar.gz
chromium_src-6b5d2f943a91bf8a33642692cdf34d832ad3adea.tar.bz2
GN: Make chrome/{browser,common,renderer} compile on mac
This adds GN rules for google_toolbox_for_mac and generate_localize as well as fixing up various source issues that show up on the mac build. With this chrome/{browser,common,renderer} compile on mac (but probably don't fully link). R=brettw@chromium.org Review URL: https://codereview.chromium.org/407093015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286364 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--breakpad/BUILD.gn29
-rw-r--r--build/secondary/third_party/google_toolbox_for_mac/BUILD.gn203
-rw-r--r--chrome/browser/BUILD.gn2
-rw-r--r--chrome/browser/extensions/BUILD.gn6
-rw-r--r--chrome/browser/ui/BUILD.gn51
-rw-r--r--chrome/chrome_browser.gypi12
-rw-r--r--chrome/common/BUILD.gn3
-rw-r--r--components/breakpad/browser/BUILD.gn3
-rw-r--r--content/common/BUILD.gn4
-rw-r--r--media/media_options.gni2
10 files changed, 271 insertions, 44 deletions
diff --git a/breakpad/BUILD.gn b/breakpad/BUILD.gn
index 6fef7b0..bfec412 100644
--- a/breakpad/BUILD.gn
+++ b/breakpad/BUILD.gn
@@ -24,6 +24,14 @@ config("internal_config") {
}
}
+config("client_config") {
+ include_dirs = [ "src" ]
+ if (is_android) {
+ include_dirs += [ "src/common/android/include" ]
+ }
+}
+
+
# minidump_stackwalk and minidump_dump are tool-type executables that do
# not build on iOS.
if (current_toolchain == host_toolchain && !is_win) {
@@ -241,6 +249,7 @@ if (is_mac) {
include_dirs = [
"src/client/apple/Framework",
"src/common/mac",
+ "src",
]
libs = [
"CoreServices.framework",
@@ -281,9 +290,14 @@ if (is_mac) {
deps = [
":utilities",
":crash_inspector",
- ":crash_report_sender",
+ # TODO(GYP): Make this link
+ #":crash_report_sender",
]
}
+
+ group("client") {
+ direct_dependent_configs = [ ":client_config" ]
+ }
}
if (is_linux || is_android) {
@@ -362,13 +376,6 @@ if (is_linux && current_toolchain == host_toolchain) {
include_dirs = [ "src" ]
}
- config("client_config") {
- include_dirs = [ "src" ]
- if (is_android) {
- include_dirs += [ "src/common/android/include" ]
- }
- }
-
static_library("client") {
sources = [
"src/client/linux/crash_generation/crash_generation_client.cc",
@@ -645,3 +652,9 @@ if (is_ios) {
# TODO(GYP) There is some XCode-only targets like ninja-breakpad.
}
+
+if (is_win) {
+ group("client") {
+ direct_dependent_configs = [ ":client_config" ]
+ }
+}
diff --git a/build/secondary/third_party/google_toolbox_for_mac/BUILD.gn b/build/secondary/third_party/google_toolbox_for_mac/BUILD.gn
new file mode 100644
index 0000000..66c2404
--- /dev/null
+++ b/build/secondary/third_party/google_toolbox_for_mac/BUILD.gn
@@ -0,0 +1,203 @@
+# 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("google_toolbox_for_mac_config") {
+ include_dirs = [
+ ".",
+ "src",
+ "src/AppKit",
+ "src/DebugUtils",
+ "src/Foundation",
+ ]
+}
+
+component("google_toolbox_for_mac") {
+ sources = [
+ "src/DebugUtils/GTMMethodCheck.h",
+ "src/DebugUtils/GTMMethodCheck.m",
+ "src/Foundation/GTMLightweightProxy.h",
+ "src/Foundation/GTMLightweightProxy.m",
+ "src/Foundation/GTMNSDictionary+URLArguments.h",
+ "src/Foundation/GTMNSDictionary+URLArguments.m",
+ "src/Foundation/GTMNSObject+KeyValueObserving.h",
+ "src/Foundation/GTMNSObject+KeyValueObserving.m",
+ "src/Foundation/GTMNSString+HTML.h",
+ "src/Foundation/GTMNSString+HTML.m",
+ "src/Foundation/GTMNSString+URLArguments.h",
+ "src/Foundation/GTMNSString+URLArguments.m",
+ "src/Foundation/GTMRegex.h",
+ "src/Foundation/GTMRegex.m",
+ "src/Foundation/GTMStringEncoding.h",
+ "src/Foundation/GTMStringEncoding.m",
+ ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ ":google_toolbox_for_mac_config",
+ "//build/config/compiler:no_chromium_code",
+ ]
+ direct_dependent_configs = [ ":google_toolbox_for_mac_config" ]
+
+ if (!is_ios) {
+ sources += [
+ "src/AddressBook/GTMABAddressBook.h",
+ "src/AddressBook/GTMABAddressBook.m",
+ "src/AppKit/GTMCarbonEvent.h",
+ "src/AppKit/GTMCarbonEvent.m",
+ "src/AppKit/GTMDelegatingTableColumn.h",
+ "src/AppKit/GTMDelegatingTableColumn.m",
+ "src/AppKit/GTMFadeTruncatingTextFieldCell.h",
+ "src/AppKit/GTMFadeTruncatingTextFieldCell.m",
+ "src/AppKit/GTMGetURLHandler.m",
+ "src/AppKit/GTMGoogleSearch.h",
+ "src/AppKit/GTMGoogleSearch.m",
+ "src/AppKit/GTMHotKeyTextField.h",
+ "src/AppKit/GTMHotKeyTextField.m",
+ "src/AppKit/GTMIBArray.h",
+ "src/AppKit/GTMIBArray.m",
+ "src/AppKit/GTMKeyValueAnimation.h",
+ "src/AppKit/GTMKeyValueAnimation.m",
+ "src/AppKit/GTMLargeTypeWindow.h",
+ "src/AppKit/GTMLargeTypeWindow.m",
+ "src/AppKit/GTMLinearRGBShading.h",
+ "src/AppKit/GTMLinearRGBShading.m",
+ "src/AppKit/GTMLoginItems.h",
+ "src/AppKit/GTMLoginItems.m",
+ "src/AppKit/GTMNSAnimatablePropertyContainer.h",
+ "src/AppKit/GTMNSAnimatablePropertyContainer.m",
+ "src/AppKit/GTMNSAnimation+Duration.h",
+ "src/AppKit/GTMNSAnimation+Duration.m",
+ "src/AppKit/GTMNSBezierPath+CGPath.h",
+ "src/AppKit/GTMNSBezierPath+CGPath.m",
+ "src/AppKit/GTMNSBezierPath+RoundRect.h",
+ "src/AppKit/GTMNSBezierPath+RoundRect.m",
+ "src/AppKit/GTMNSBezierPath+Shading.h",
+ "src/AppKit/GTMNSBezierPath+Shading.m",
+ "src/AppKit/GTMNSColor+Luminance.h",
+ "src/AppKit/GTMNSColor+Luminance.m",
+ "src/AppKit/GTMNSImage+Scaling.h",
+ "src/AppKit/GTMNSImage+Scaling.m",
+ "src/AppKit/GTMNSImage+SearchCache.h",
+ "src/AppKit/GTMNSImage+SearchCache.m",
+ "src/AppKit/GTMNSWorkspace+Running.h",
+ "src/AppKit/GTMNSWorkspace+Running.m",
+ "src/AppKit/GTMShading.h",
+ "src/AppKit/GTMUILocalizer.h",
+ "src/AppKit/GTMUILocalizer.m",
+ "src/AppKit/GTMUILocalizerAndLayoutTweaker.h",
+ "src/AppKit/GTMUILocalizerAndLayoutTweaker.m",
+ "src/AppKit/GTMWindowSheetController.h",
+ "src/AppKit/GTMWindowSheetController.m",
+ "src/DebugUtils/GTMDebugSelectorValidation.h",
+ "src/DebugUtils/GTMDebugThreadValidation.h",
+ "src/DebugUtils/GTMDebugThreadValidation.m",
+ "src/DebugUtils/GTMTypeCasting.h",
+ "src/Foundation/GTMAbstractDOListener.h",
+ "src/Foundation/GTMAbstractDOListener.m",
+ "src/Foundation/GTMCalculatedRange.h",
+ "src/Foundation/GTMCalculatedRange.m",
+ "src/Foundation/GTMExceptionalInlines.h",
+ "src/Foundation/GTMExceptionalInlines.m",
+ "src/Foundation/GTMFileSystemKQueue.h",
+ "src/Foundation/GTMFileSystemKQueue.m",
+ "src/Foundation/GTMFourCharCode.h",
+ "src/Foundation/GTMFourCharCode.m",
+ "src/Foundation/GTMGarbageCollection.h",
+ "src/Foundation/GTMGeometryUtils.h",
+ "src/Foundation/GTMGeometryUtils.m",
+ "src/Foundation/GTMLocalizedString.h",
+ "src/Foundation/GTMLogger+ASL.h",
+ "src/Foundation/GTMLogger+ASL.m",
+ "src/Foundation/GTMLogger.h",
+ "src/Foundation/GTMLogger.m",
+ "src/Foundation/GTMLoggerRingBufferWriter.h",
+ "src/Foundation/GTMLoggerRingBufferWriter.m",
+ "src/Foundation/GTMNSAppleEventDescriptor+Foundation.h",
+ "src/Foundation/GTMNSAppleEventDescriptor+Foundation.m",
+ "src/Foundation/GTMNSAppleEventDescriptor+Handler.h",
+ "src/Foundation/GTMNSAppleEventDescriptor+Handler.m",
+ "src/Foundation/GTMNSAppleScript+Handler.h",
+ "src/Foundation/GTMNSAppleScript+Handler.m",
+ "src/Foundation/GTMNSArray+Merge.h",
+ "src/Foundation/GTMNSArray+Merge.m",
+ "src/Foundation/GTMNSDictionary+CaseInsensitive.h",
+ "src/Foundation/GTMNSDictionary+CaseInsensitive.m",
+ "src/Foundation/GTMNSEnumerator+Filter.h",
+ "src/Foundation/GTMNSEnumerator+Filter.m",
+ "src/Foundation/GTMNSFileHandle+UniqueName.h",
+ "src/Foundation/GTMNSFileHandle+UniqueName.m",
+ "src/Foundation/GTMNSFileManager+Carbon.h",
+ "src/Foundation/GTMNSFileManager+Carbon.m",
+ "src/Foundation/GTMNSFileManager+Path.h",
+ "src/Foundation/GTMNSFileManager+Path.m",
+ "src/Foundation/GTMNSNumber+64Bit.h",
+ "src/Foundation/GTMNSNumber+64Bit.m",
+ "src/Foundation/GTMNSScanner+JSON.h",
+ "src/Foundation/GTMNSScanner+JSON.m",
+ "src/Foundation/GTMNSScanner+Unsigned.h",
+ "src/Foundation/GTMNSScanner+Unsigned.m",
+ "src/Foundation/GTMNSString+FindFolder.h",
+ "src/Foundation/GTMNSString+FindFolder.m",
+ "src/Foundation/GTMNSString+Replace.h",
+ "src/Foundation/GTMNSString+Replace.m",
+ "src/Foundation/GTMNSString+XML.h",
+ "src/Foundation/GTMNSString+XML.m",
+ "src/Foundation/GTMNSThread+Blocks.h",
+ "src/Foundation/GTMNSThread+Blocks.m",
+ "src/Foundation/GTMObjC2Runtime.h",
+ "src/Foundation/GTMObjC2Runtime.m",
+ "src/Foundation/GTMObjectSingleton.h",
+ "src/Foundation/GTMPath.h",
+ "src/Foundation/GTMPath.m",
+ "src/Foundation/GTMScriptRunner.h",
+ "src/Foundation/GTMScriptRunner.m",
+ "src/Foundation/GTMServiceManagement.c",
+ "src/Foundation/GTMServiceManagement.h",
+ "src/Foundation/GTMSignalHandler.h",
+ "src/Foundation/GTMSignalHandler.m",
+ "src/Foundation/GTMStackTrace.h",
+ "src/Foundation/GTMStackTrace.m",
+ "src/Foundation/GTMSystemVersion.h",
+ "src/Foundation/GTMSystemVersion.m",
+ "src/Foundation/GTMTransientRootPortProxy.h",
+ "src/Foundation/GTMTransientRootPortProxy.m",
+ "src/Foundation/GTMTransientRootProxy.h",
+ "src/Foundation/GTMTransientRootProxy.m",
+ "src/Foundation/GTMURITemplate.h",
+ "src/Foundation/GTMURITemplate.m",
+ "src/Foundation/GTMValidatingContainers.h",
+ "src/Foundation/GTMValidatingContainers.m",
+ "src/GTMDefines.h",
+ ]
+
+ libs = [
+ "AddressBook",
+ "AppKit",
+ "Carbon",
+ "Cocoa",
+ "QuartzCore",
+ ]
+ } else { # is_ios
+ sources += [
+ "src/iPhone/GTMFadeTruncatingLabel.h",
+ "src/iPhone/GTMFadeTruncatingLabel.m",
+ "src/iPhone/GTMRoundedRectPath.h",
+ "src/iPhone/GTMRoundedRectPath.m",
+ "src/iPhone/GTMUIImage+Resize.h",
+ "src/iPhone/GTMUIImage+Resize.m",
+ "src/iPhone/GTMUILocalizer.h",
+ "src/iPhone/GTMUILocalizer.m",
+ ]
+ }
+
+ if (is_component_build) {
+ # GTM is third-party code, so we don't want to add _EXPORT
+ # annotations to it, so build it without -fvisibility=hidden
+ # (else the interface class symbols will be hidden in a 64bit
+ # build). Only do this in a component build, so that the shipping
+ # chrome binary doesn't end up with unnecessarily exported
+ # symbols.
+ config -= [ "//build/config/gcc:symbol_visibility_hidden" ]
+ }
+}
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index d2c1473..fda52cc 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -470,7 +470,7 @@ static_library("browser") {
if (is_mac) {
deps += [
- #"../third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp:google_toolbox_for_mac", TODO(GYP)
+ "//third_party/google_toolbox_for_mac",
#"../third_party/mozilla/mozilla.gyp:mozilla", TODO(GYP)
]
libs += [
diff --git a/chrome/browser/extensions/BUILD.gn b/chrome/browser/extensions/BUILD.gn
index a8a0cab..3caee32 100644
--- a/chrome/browser/extensions/BUILD.gn
+++ b/chrome/browser/extensions/BUILD.gn
@@ -169,6 +169,12 @@ static_library("extensions") {
]
}
}
+ if (!use_x11) {
+ sources -= [
+ "global_shortcut_listener_x11.cc",
+ "global_shortcut_listener_x11.h",
+ ]
+ }
if (safe_browsing_mode == 1) {
defines += [ "FULL_SAFE_BROWSING" ]
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
index 4162783..920bf8d 100644
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
@@ -298,37 +298,17 @@ static_library("ui") {
"tabs/tab_resources.h",
]
deps += [
+ "//third_party/google_toolbox_for_mac",
+ ":generate_localizer",
#'../third_party/apple_sample_code/apple_sample_code.gyp:apple_sample_code', TODO(GYP)
- #'../third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp:google_toolbox_for_mac', TODO(GYP)
#'../third_party/molokocacao/molokocacao.gyp:molokocacao', TODO(GYP)
#'../third_party/mozilla/mozilla.gyp:mozilla', TODO(GYP)
]
+ include_dirs = [ "$target_gen_dir" ]
libs += [ "Quartz.framework" ]
- # TODO(GYP)
- #'actions': [
- # {
- # # This action is used to extract the localization data from xib
- # # files and generate table for the ui localizer from it.
- # 'variables': {
- # 'xib_localizer_tool_path':
- # 'tools/build/mac/generate_localizer',
- # },
- # 'includes': [
- # 'chrome_nibs.gypi',
- # ],
- # 'action_name': 'Process xibs for localization',
- # 'inputs': [
- # '<(xib_localizer_tool_path)',
- # '<@(mac_translated_xibs)',
- # ],
- # 'outputs': [
- # '<(INTERMEDIATE_DIR)/ui_localizer_table.h',
- # ],
- # 'action': ['<(xib_localizer_tool_path)',
- # '<@(_outputs)',
- # '<@(mac_translated_xibs)'],
- # },
- #]
+ configs += [
+ "//third_party/google_toolbox_for_mac:google_toolbox_for_mac_config",
+ ]
} else { # non-Mac.
sources += rebase_path(gypi_values.chrome_browser_ui_non_mac_sources,
".", "//chrome")
@@ -423,3 +403,22 @@ static_library("ui") {
deps += [ "//third_party/hunspell" ]
}
}
+
+if (is_mac) {
+ nib_gypi_values = exec_script(
+ "//build/gypi_to_gn.py",
+ [ rebase_path("../../chrome_nibs.gypi") ],
+ "scope",
+ [ "../../chrome_nibs.gypi" ])
+
+ action("generate_localizer") {
+ script = "//chrome/tools/build/mac/generate_localizer"
+ sources = [ ]
+ table_path = "$target_gen_dir/ui_localizer_table.h"
+ outputs = [ table_path ]
+ args = [ rebase_path(table_path, root_build_dir) ] +
+ rebase_path(nib_gypi_values.mac_translated_xibs,
+ root_build_dir,
+ "//chrome")
+ }
+}
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 262ea68..14d9301 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -685,8 +685,6 @@
'browser/media/cast_transport_host_filter.cc',
'browser/media/cast_transport_host_filter.h',
'browser/media/desktop_media_list.h',
- 'browser/media/desktop_media_list_ash.cc',
- 'browser/media/desktop_media_list_ash.h',
'browser/media/desktop_media_picker.h',
'browser/media/desktop_streams_registry.cc',
'browser/media/desktop_streams_registry.h',
@@ -1223,10 +1221,6 @@
'browser/signin/profile_oauth2_token_service_factory.h',
'browser/signin/screenlock_bridge.cc',
'browser/signin/screenlock_bridge.h',
- 'browser/signin/signin_error_notifier_ash.cc',
- 'browser/signin/signin_error_notifier_ash.h',
- 'browser/signin/signin_error_notifier_factory_ash.cc',
- 'browser/signin/signin_error_notifier_factory_ash.h',
'browser/signin/signin_manager_factory.cc',
'browser/signin/signin_manager_factory.h',
'browser/signin/signin_names_io_thread.cc',
@@ -2266,6 +2260,12 @@
],
# Cross-platform Ash sources.
'chrome_browser_ash_sources': [
+ 'browser/media/desktop_media_list_ash.cc',
+ 'browser/media/desktop_media_list_ash.h',
+ 'browser/signin/signin_error_notifier_ash.cc',
+ 'browser/signin/signin_error_notifier_ash.h',
+ 'browser/signin/signin_error_notifier_factory_ash.cc',
+ 'browser/signin/signin_error_notifier_factory_ash.h',
'browser/sync/sync_error_notifier_ash.cc',
'browser/sync/sync_error_notifier_ash.h',
'browser/sync/sync_error_notifier_factory_ash.cc',
diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn
index 4930360..afce07b 100644
--- a/chrome/common/BUILD.gn
+++ b/chrome/common/BUILD.gn
@@ -123,6 +123,7 @@ static_library("common") {
"extensions/api/networking_private/networking_private_crypto_openssl.cc",
]
}
+ deps += [ "//breakpad:client" ]
}
if (is_mac) {
sources += rebase_path(
@@ -203,7 +204,7 @@ static_library("common") {
]
deps += [
"//third_party/mach_override",
- #'../third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp:google_toolbox_for_mac', TODO(GYP)
+ "//third_party/google_toolbox_for_mac",
]
}
diff --git a/components/breakpad/browser/BUILD.gn b/components/breakpad/browser/BUILD.gn
index 198efce4..89ec7b7 100644
--- a/components/breakpad/browser/BUILD.gn
+++ b/components/breakpad/browser/BUILD.gn
@@ -28,6 +28,7 @@ source_set("browser") {
# headers, so add the dependency here.
if (is_posix && !is_ios &&
(!is_android || !is_android_webview_build)) {
- deps += [ "//breakpad:client" ]
+ configs += [ "//breakpad:client_config" ]
+ direct_dependent_configs = [ "//breakpad:client_config" ]
}
}
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
index fa71c12..038d758 100644
--- a/content/common/BUILD.gn
+++ b/content/common/BUILD.gn
@@ -163,6 +163,10 @@ source_set("common") {
"gpu/x_util.h",
]
}
+ } else {
+ sources -= [
+ "gpu/gpu_memory_buffer_factory_x11.cc",
+ ]
}
if (enable_plugins) {
diff --git a/media/media_options.gni b/media/media_options.gni
index 6bd1f5a..23decab 100644
--- a/media/media_options.gni
+++ b/media/media_options.gni
@@ -27,7 +27,7 @@ if (is_android) {
# Original conditional: (OS=="linux" or OS=="freebsd" or OS=="solaris") and embedded!=1
use_alsa = false
use_pulseaudio = false
-if (is_posix && !is_android) {
+if (is_posix && !is_android && !is_mac) {
use_alsa = true
if (!use_cras) {
use_pulseaudio = true