Commit ae8297db authored by jiangj's avatar jiangj Committed by Commit bot

Fix errors found in Mac gn component builds

Mac gn component build fail because of missing frameworks and missing some other
dependencies, and occasionally file list out of sync with the gyp counterpart:
http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_gn_dbg/builds/321/steps/compile/logs/stdio

For instance, the frameworks linked in the components that sync depends on is not
automatically linked into sync, thus revealing the issue.

Review URL: https://codereview.chromium.org/1087873003

Cr-Commit-Position: refs/heads/master@{#325479}
parent 85ac931d
......@@ -362,8 +362,16 @@ source_set("browser") {
"geolocation/empty_wifi_data_provider.cc",
"geolocation/empty_wifi_data_provider.h",
]
deps += [ "//ui/accelerated_widget_mac" ]
libs += [ "bsm" ]
deps += [
"//sandbox/mac:sandbox",
"//third_party/mozilla",
"//third_party/sudden_motion_sensor",
"//ui/accelerated_widget_mac",
]
libs += [
"bsm",
"QTKit.framework",
]
}
if (is_chromeos) {
......@@ -383,6 +391,8 @@ source_set("browser") {
]
} else { # Not aura.
sources -= [
"renderer_host/compositor_resize_lock_aura.cc",
"renderer_host/compositor_resize_lock_aura.h",
"renderer_host/input/synthetic_gesture_target_aura.cc",
"renderer_host/input/synthetic_gesture_target_aura.h",
"renderer_host/native_web_keyboard_event_aura.cc",
......
......@@ -207,6 +207,11 @@ source_set("common") {
sources += [
"gpu/client/gpu_memory_buffer_impl_io_surface.cc",
"gpu/client/gpu_memory_buffer_impl_io_surface.h",
"gpu/gpu_memory_buffer_factory_io_surface.cc",
"gpu/gpu_memory_buffer_factory_io_surface.h",
"gpu/media/vt.h",
"gpu/media/vt_video_decode_accelerator.cc",
"gpu/media/vt_video_decode_accelerator.h",
] + get_target_outputs(":libvt_generate_stubs")
sources -= [ "plugin_list_posix.cc" ]
......@@ -219,7 +224,11 @@ source_set("common") {
"//third_party/WebKit/public:resources",
"//ui/accelerated_widget_mac",
]
libs += [ "QuartzCore.framework" ]
libs += [
"IOSurface.framework",
"OpenGL.framework",
"QuartzCore.framework",
]
}
if (is_android) {
......
......@@ -165,6 +165,14 @@ source_set("service_sources") {
]
}
if (is_mac) {
# Required by gles2_cmd_decoder.cc on Mac.
libs = [
"IOSurface.framework",
"OpenGL.framework",
]
}
if (is_android && !is_debug) {
# On Android optimize more since this component can be a bottleneck.
configs -= [ "//build/config/compiler:optimize" ]
......
......@@ -142,6 +142,15 @@
'../third_party/khronos',
],
}],
['OS=="mac"', {
# Required by gles2_cmd_decoder.cc on Mac.
'link_settings': {
'libraries': [
'$(SDKROOT)/System/Library/Frameworks/IOSurface.framework',
'$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
],
},
}],
['OS in ("win", "android") or (OS == "linux" and use_x11 == 1)', {
'sources': [
'command_buffer/service/async_pixel_transfer_manager_egl.cc',
......
......@@ -682,6 +682,10 @@ test("media_unittests") {
"midi/midi_manager_mac_unittest.cc",
"video/capture/mac/video_capture_device_factory_mac_unittest.mm",
]
libs = [
# Required by midi_manager_mac_unittest.cc.
"CoreMIDI.framework",
]
}
if (use_alsa) {
......
......@@ -241,6 +241,11 @@ source_set("base") {
]
} else if (is_mac) {
sources += [ "user_input_monitor_mac.cc" ]
# Required by video_frame.cc.
libs = [
"CoreVideo.framework"
]
} else if (is_win) {
sources += [ "user_input_monitor_win.cc" ]
} else {
......
......@@ -20,6 +20,10 @@ source_set("mac") {
"avfoundation_glue.h",
"avfoundation_glue.mm",
]
libs = [
# Required by video_frame_mac.cc.
"CoreVideo.framework",
]
}
set_sources_assignment_filter(sources_assignment_filter)
configs += [ "//media:media_config" ]
......
......@@ -163,12 +163,25 @@ source_set("sender") {
]
}
libs = []
# iOS and OS X encoders
if (is_ios || is_mac) {
sources += [
"sender/h264_vt_encoder.cc",
"sender/h264_vt_encoder.h",
]
libs += [
"CoreVideo.framework",
]
}
if (is_mac) {
# Required by audio_encoder.cc.
libs += [
"AudioToolbox.framework",
]
}
}
......
......@@ -199,7 +199,19 @@
'sender/h264_vt_encoder.cc',
'sender/h264_vt_encoder.h',
],
'link_settings': {
'libraries': [
'$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
],
},
}], # OS=="ios" or OS=="mac"
['OS=="mac"', {
'link_settings': {
'libraries': [
'$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
],
},
}], # OS=="mac"
], # conditions
},
{
......
......@@ -421,6 +421,13 @@ source_set("sync_core") {
deps += [ "//chromeos" ]
}
if (is_mac) {
libs = [
# Required by get_session_name_mac.mm on Mac.
"SystemConfiguration.framework",
]
}
defines = [ "SYNC_IMPLEMENTATION" ]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
}
......
......@@ -461,6 +461,14 @@
'../chromeos/chromeos.gyp:chromeos',
],
}],
['OS=="mac"', {
'link_settings': {
'libraries': [
# Required by get_session_name_mac.mm on Mac.
'$(SDKROOT)/System/Library/Frameworks/SystemConfiguration.framework',
]
},
}],
],
},
{
......
# Copyright 2015 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.
source_set("sudden_motion_sensor") {
sources = [
"sudden_motion_sensor_mac.cc",
"sudden_motion_sensor_mac.h",
]
deps = [
"//base",
]
}
......@@ -27,9 +27,15 @@ component("accelerated_widget_mac") {
"//skia",
"//ui/base",
"//ui/events",
"//ui/events:events_base",
"//ui/gfx/geometry",
"//ui/gl",
]
libs = [ "QuartzCore.framework" ]
libs = [
# Required by io_surface_texture.mm.
"IOSurface.framework",
"OpenGL.framework",
"QuartzCore.framework",
]
}
......@@ -39,6 +39,9 @@
],
'link_settings': {
'libraries': [
# Required by io_surface_texture.mm.
'$(SDKROOT)/System/Library/Frameworks/IOSurface.framework',
'$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
'$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
],
},
......
......@@ -27,4 +27,12 @@ component("surface") {
"//ui/gfx/geometry",
"//ui/gl",
]
if (is_mac) {
# Required by accelerated_surface_mac.cc.
libs = [
"IOSurface.framework",
"OpenGL.framework",
]
}
}
......@@ -14,9 +14,11 @@
],
}],
['OS == "mac"', {
# Required by accelerated_surface_mac.cc.
'link_settings': {
'libraries': [
'$(SDKROOT)/System/Library/Frameworks/IOSurface.framework',
'$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
],
},
}],
......
......@@ -119,6 +119,10 @@ component("views") {
if (is_mac) {
deps += [ "//ui/accelerated_widget_mac" ]
libs = [
# Required by bridged_native_widget.mm.
"QuartzCore.framework",
]
}
}
......
......@@ -726,6 +726,12 @@
'dependencies': [
'../accelerated_widget_mac/accelerated_widget_mac.gyp:accelerated_widget_mac',
],
'link_settings': {
'libraries': [
# Required by bridged_native_widget.mm.
'$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
],
},
}],
],
}, # target_name: views
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment