summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn10
-rw-r--r--build/toolchain/mac/BUILD.gn8
-rw-r--r--chrome/BUILD.gn46
-rw-r--r--chrome/chrome_tests.gypi31
-rw-r--r--chrome/test/BUILD.gn25
-rw-r--r--content/content_shell.gypi1
-rw-r--r--content/shell/BUILD.gn28
-rw-r--r--extensions/shell/BUILD.gn23
-rw-r--r--extensions/shell/app_shell.gyp3
9 files changed, 128 insertions, 47 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 7f3dd9f..bfc0fc8 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -494,18 +494,10 @@ group("both_gn_and_gyp") {
"//third_party/apple_sample_code",
"//third_party/molokocacao",
]
-
- # TODO(GYP): These don't work on Mac yet.
deps -= [
- "//chrome", # TODO(GYP)
- "//chrome/test:browser_tests", # TODO(GYP)
- "//chrome/test:interactive_ui_tests", # TODO(GYP)
- "//chrome/test:sync_integration_tests", # TODO(GYP)
- "//extensions:extensions_browsertests", # TODO(GYP) Needs ContentMain
-
# Mojo in GN contains some things which are never compiled in GYP on Mac,
# so compilation fails on Mac. They need porting.
- "//mojo", # TODO(GYP)
+ "//mojo",
]
}
diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn
index 639dc60..8d024ed 100644
--- a/build/toolchain/mac/BUILD.gn
+++ b/build/toolchain/mac/BUILD.gn
@@ -130,7 +130,8 @@ template("mac_toolchain") {
does_reexport_command = "[ ! -e $dylib -o ! -e $tocname ] || otool -l $dylib | grep -q LC_REEXPORT_DYLIB"
- link_command = "$ld -shared {{ldflags}} -o $dylib -Wl,-filelist,$rspfile"
+ link_command =
+ "$ld -shared {{ldflags}} -o \"$dylib\" -Wl,-filelist,\"$rspfile\""
if (is_component_build) {
link_command += " -Wl,-install_name,@rpath/{{target_output_name}}{{output_extension}}"
}
@@ -171,7 +172,8 @@ template("mac_toolchain") {
sofile = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}" # eg "./libfoo.so"
rspfile = sofile + ".rsp"
- link_command = "$ld -bundle {{ldflags}} -o $sofile -Wl,-filelist,$rspfile"
+ link_command =
+ "$ld -bundle {{ldflags}} -o \"$sofile\" -Wl,-filelist,\"$rspfile\""
if (is_component_build) {
link_command += " -Wl,-install_name,@rpath/{{target_output_name}}{{output_extension}}"
}
@@ -195,7 +197,7 @@ template("mac_toolchain") {
tool("link") {
outfile = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}"
rspfile = "$outfile.rsp"
- command = "$ld {{ldflags}} -o $outfile -Wl,-filelist,$rspfile {{solibs}} {{libs}}"
+ command = "$ld {{ldflags}} -o \"$outfile\" -Wl,-filelist,\"$rspfile\" {{solibs}} {{libs}}"
description = "LINK $outfile"
rspfile_content = "{{inputs_newline}}"
outputs = [
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index 7079bbb..8816e81 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -276,6 +276,23 @@ if (is_mac || is_win) {
shared_library("main_dll") {
configs += [ "//build/config/compiler:wexit_time_destructors" ]
defines = []
+ ldflags = []
+
+ sources = [
+ "//base/win/dllmain.cc",
+ "app/chrome_command_ids.h",
+ "app/chrome_dll.rc",
+ "app/chrome_dll_resource.h",
+ "app/chrome_main.cc",
+ "app/chrome_main_delegate.cc",
+ "app/chrome_main_delegate.h",
+ "app/chrome_main_mac.h",
+ "app/chrome_main_mac.mm",
+ "app/close_handle_hook_win.cc",
+ "app/close_handle_hook_win.h",
+ "app/delay_load_hook_win.cc",
+ "app/delay_load_hook_win.h",
+ ]
deps = [
":browser_dependencies",
@@ -285,20 +302,6 @@ if (is_mac || is_win) {
if (is_win) {
output_name = "chrome"
- sources = [
- "//base/win/dllmain.cc",
- "app/chrome_command_ids.h",
- "app/chrome_dll.rc",
- "app/chrome_dll_resource.h",
- "app/chrome_main.cc",
- "app/chrome_main_delegate.cc",
- "app/chrome_main_delegate.h",
- "app/close_handle_hook_win.cc",
- "app/close_handle_hook_win.h",
- "app/delay_load_hook_win.cc",
- "app/delay_load_hook_win.h",
- ]
-
deps += [
":chrome_dll_manifest",
":chrome_dll_version",
@@ -350,6 +353,21 @@ if (is_mac || is_win) {
# 'includes': [ 'chrome_dll_bundle.gypi' ],
#}],
# TODO(GYP) Lots of other stuff in the OS=="mac" block.
+ sources += [
+ "app/chrome_crash_reporter_client.cc",
+ "app/chrome_crash_reporter_client.h",
+ "app/chrome_crash_reporter_client_mac.mm",
+ ]
+ deps += [
+ "//components/crash/content/app",
+ "//components/policy",
+ ]
+
+ # Define the order of symbols within the framework.
+ ldflags += [
+ "-Wl,-order_file",
+ "-Wl," + rebase_path("app/framework.order", root_build_dir),
+ ]
}
if (enable_plugins && !is_multi_dll_chrome) {
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index a3b0e19..f38c516 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -447,17 +447,6 @@
'browser/translate/standalone_cld_data_harness.h',
'browser/translate/translate_browsertest.cc',
'browser/translate/translate_manager_browsertest.cc',
- 'browser/ui/ash/accelerator_commands_browsertest.cc',
- 'browser/ui/ash/accelerator_controller_browsertest.cc',
- 'browser/ui/ash/keyboard_controller_browsertest.cc',
- 'browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc',
- 'browser/ui/ash/launcher/launcher_favicon_loader_browsertest.cc',
- 'browser/ui/ash/multi_user/multi_user_window_manager_test.cc',
- 'browser/ui/ash/multi_user/multi_user_window_manager_test.h',
- 'browser/ui/ash/shelf_browsertest.cc',
- 'browser/ui/ash/system_tray_delegate_chromeos_browsertest_chromeos.cc',
- 'browser/ui/ash/system_tray_tray_cast_browsertest_chromeos.cc',
- 'browser/ui/ash/volume_controller_browsertest_chromeos.cc',
'browser/ui/autofill/autofill_dialog_controller_browsertest.cc',
'browser/ui/autofill/autofill_dialog_view_tester.h',
'browser/ui/autofill/card_unmask_prompt_view_browsertest.cc',
@@ -622,11 +611,24 @@
'test/gpu/webgl_infobar_browsertest.cc',
'test/ppapi/ppapi_browsertest.cc',
],
+ 'chrome_browser_tests_ash_sources': [
+ 'browser/ui/ash/accelerator_commands_browsertest.cc',
+ 'browser/ui/ash/accelerator_controller_browsertest.cc',
+ 'browser/ui/ash/keyboard_controller_browsertest.cc',
+ 'browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc',
+ 'browser/ui/ash/launcher/launcher_favicon_loader_browsertest.cc',
+ 'browser/ui/ash/multi_user/multi_user_window_manager_test.cc',
+ 'browser/ui/ash/multi_user/multi_user_window_manager_test.h',
+ 'browser/ui/ash/shelf_browsertest.cc',
+ 'browser/ui/ash/system_tray_delegate_chromeos_browsertest_chromeos.cc',
+ 'browser/ui/ash/system_tray_tray_cast_browsertest_chromeos.cc',
+ 'browser/ui/ash/volume_controller_browsertest_chromeos.cc',
+ 'browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc',
+ ],
# Cross-platform views browser tests ready for toolkit-views on Mac.
'chrome_browser_tests_views_sources': [
'browser/ui/global_error/global_error_service_browsertest.cc',
'browser/ui/views/extensions/extension_uninstall_dialog_view_browsertest.cc',
- 'browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc',
'browser/ui/views/frame/browser_window_property_manager_browsertest_win.cc',
'browser/ui/views/select_file_dialog_extension_browsertest.cc',
],
@@ -1065,7 +1067,6 @@
'test/base/interactive_test_utils_win.cc',
'test/base/interactive_ui_tests_main.cc',
'test/base/view_event_test_platform_part.h',
- 'test/base/view_event_test_platform_part_ash.cc',
'test/base/view_event_test_platform_part_chromeos.cc',
'test/base/view_event_test_platform_part_mac.mm',
'test/ppapi/ppapi_interactive_browsertest.cc',
@@ -1086,7 +1087,6 @@
'../ui/views/widget/desktop_aura/desktop_window_tree_host_x11_interactive_uitest.cc',
'../ui/views/widget/desktop_aura/x11_topmost_window_finder_interactive_uitest.cc',
'../ui/views/widget/widget_interactive_uitest.cc',
- 'browser/ui/views/ash/tab_scrubber_browsertest.cc',
'browser/ui/views/menu_controller_interactive_uitest.cc',
'browser/ui/views/menu_item_view_interactive_uitest.cc',
'browser/ui/views/menu_model_adapter_test.cc',
@@ -1192,7 +1192,9 @@
'chrome_interactive_ui_test_ash_sources': [
'../ash/drag_drop/drag_drop_interactive_uitest.cc',
'../ash/wm/ash_native_cursor_manager_interactive_uitest.cc',
+ 'browser/ui/views/ash/tab_scrubber_browsertest.cc',
'browser/ui/window_sizer/window_sizer_ash_uitest.cc',
+ 'test/base/view_event_test_platform_part_ash.cc',
],
'chrome_interactive_ui_test_non_desktop_linux_sources': [
# TODO(port): Everything here times out. Attempts have been made to fix
@@ -2317,6 +2319,7 @@
],
}],
['use_ash==1', {
+ 'sources': [ '<@(chrome_browser_tests_ash_sources)' ],
'dependencies': [
'../ash/ash.gyp:ash_test_support',
],
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 7f32839..815f2b6 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -420,10 +420,6 @@ if (!is_android) {
".",
"//chrome")
sources += [ "../browser/notifications/login_state_notification_blocker_chromeos_browsertest.cc" ]
- sources -= [
- # Use only the _chromeos version on ChromeOS.
- "base/view_event_test_platform_part_ash.cc",
- ]
deps += [
"//ash/resources",
@@ -513,11 +509,24 @@ if (!is_android) {
"//chrome")
}
+ if (!use_aura) {
+ sources -= [
+ "base/interactive_test_utils_aura.cc",
+ "base/interactive_test_utils_aura.h",
+ ]
+ }
+
if (use_ash) {
sources += rebase_path(
chrome_tests_gypi_values.chrome_interactive_ui_test_ash_sources,
".",
"//chrome")
+ if (is_chromeos) {
+ sources -= [
+ # Use only the _chromeos version on ChromeOS.
+ "base/view_event_test_platform_part_ash.cc",
+ ]
+ }
deps += [ "//ash:interactive_ui_test_support" ]
}
@@ -983,6 +992,10 @@ if (!is_android) {
defines += [ "DEBUG_DEVTOOLS=1" ]
}
if (use_ash) {
+ sources +=
+ rebase_path(chrome_tests_gypi_values.chrome_browser_tests_ash_sources,
+ ".",
+ "//chrome")
deps += [ "//ash:test_support" ]
}
if (use_aura || toolkit_views) {
@@ -1034,9 +1047,11 @@ if (!is_android) {
"../browser/extensions/api/terminal/terminal_private_apitest.cc",
"../browser/invalidation/profile_invalidation_provider_factory_browsertest.cc",
"../browser/net/nss_context_chromeos_browsertest.cc",
- "../browser/ui/ash/keyboard_controller_browsertest.cc",
"data/webui/certificate_viewer_ui_test-inl.h",
]
+ if (use_ash) {
+ sources -= [ "../browser/ui/ash/keyboard_controller_browsertest.cc" ]
+ }
if (toolkit_views) {
sources -= [ "../browser/ui/views/select_file_dialog_extension_browsertest.cc" ]
}
diff --git a/content/content_shell.gypi b/content/content_shell.gypi
index e170e34..b17ec60 100644
--- a/content/content_shell.gypi
+++ b/content/content_shell.gypi
@@ -696,6 +696,7 @@
['OS=="mac"', {
'targets': [
{
+ # GN version: //content/shell:framework
'target_name': 'content_shell_framework',
'type': 'shared_library',
'product_name': '<(content_shell_product_name) Framework',
diff --git a/content/shell/BUILD.gn b/content/shell/BUILD.gn
index 4bfdd9f..f3b26ad 100644
--- a/content/shell/BUILD.gn
+++ b/content/shell/BUILD.gn
@@ -430,7 +430,12 @@ if (!is_android && !is_mac) {
}
if (is_mac) {
- # TODO(GYP) lots of stuff from GYP file here.
+ # TODO(GYP) lots of stuff from GYP file here including helper_app and
+ # postbuilds.
+ output_name = content_shell_product_name
+ deps = [
+ ":framework",
+ ]
}
if (is_android) {
@@ -467,3 +472,24 @@ if (is_win) {
configs += [ "//build/config/win:windowed" ]
}
}
+
+if (is_mac) {
+ # TODO(GYP) this should be a bundle. Lots of other stuff in this target.
+ # GYP version: content/content_shell.gypi:content_shell_framework
+ shared_library("framework") {
+ testonly = true
+
+ # TODO(GYP) bug 546894: Fix GN and toolchains to handle spaces here.
+ #output_name = "$content_shell_product_name Framework"
+ output_name = "content_shell_framework" # Temporary one with no spaces.
+
+ sources = [
+ "shell_content_main.cc",
+ "shell_content_main.h",
+ ]
+
+ deps = [
+ ":content_shell_lib",
+ ]
+ }
+}
diff --git a/extensions/shell/BUILD.gn b/extensions/shell/BUILD.gn
index 06bf717..0e31897 100644
--- a/extensions/shell/BUILD.gn
+++ b/extensions/shell/BUILD.gn
@@ -156,7 +156,12 @@ if (!(is_chromeos && !use_ozone)) {
}
if (is_mac) {
- # TODO(GYP): Mac bundling
+ # TODO(GYP) bug 546894: Fix GN and toolchains to handle spaces here.
+ #output_name = "App Shell"
+ # TODO(GYP): Mac bundling. See also content_shell which this is basically
+ # a copy-paste of.
+ deps += [ ":app_shell_framework" ]
+ # TODO(GYP): Mac app_shell_helper stuff.
}
}
}
@@ -238,3 +243,19 @@ process_version("version_header") {
template_file = "common/version.h.in"
output = "$target_gen_dir/common/version.h"
}
+
+if (is_mac) {
+ # TODO(GYP) this should be a bundle. Lots of other stuff in this target.
+ # Should be able to copy content shell framework (this is basically a
+ # copy-paste of that target).
+ shared_library("app_shell_framework") {
+ testonly = true
+ sources = [
+ "app/shell_main_mac.cc",
+ "app/shell_main_mac.h",
+ ]
+ deps = [
+ ":app_shell_lib",
+ ]
+ }
+}
diff --git a/extensions/shell/app_shell.gyp b/extensions/shell/app_shell.gyp
index 0ad524c..7184266 100644
--- a/extensions/shell/app_shell.gyp
+++ b/extensions/shell/app_shell.gyp
@@ -16,6 +16,7 @@
},
'targets': [
{
+ # GN version: //extensions/shell:app_shell_lib
'target_name': 'app_shell_lib',
'type': 'static_library',
'dependencies': [
@@ -107,6 +108,7 @@
],
},
{
+ # GN version: //extensions/shell:app_shell
'target_name': 'app_shell',
'type': 'executable',
'mac_bundle': 1,
@@ -271,6 +273,7 @@
['OS=="mac"', {
'targets': [
{
+ # GN version: //extensions/shell:app_shell_framework
'target_name': 'app_shell_framework',
'type': 'shared_library',
'product_name': '<(app_shell_product_name) Framework',