Index: chrome/chrome.gyp |
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp |
index 06eab55a2d836129dbb969498392a54a07006b7b..c793483626bea2b3827a027f32c3739d9d5df964 100644 |
--- a/chrome/chrome.gyp |
+++ b/chrome/chrome.gyp |
@@ -452,6 +452,8 @@ |
'common/platform_util_linux.cc', |
'common/platform_util_mac.mm', |
'common/platform_util_win.cc', |
+ 'common/plugin_carbon_interpose_constants_mac.h', |
+ 'common/plugin_carbon_interpose_constants_mac.cc', |
'common/plugin_messages.h', |
'common/plugin_messages_internal.h', |
'common/pref_member.cc', |
@@ -2942,7 +2944,8 @@ |
'destination': '<(PRODUCT_DIR)/<(mac_product_name).app/Contents/MacOS/', |
'files': ['../third_party/ffmpeg/binaries/chrome/libavcodec.52.dylib', |
'../third_party/ffmpeg/binaries/chrome/libavformat.52.dylib', |
- '../third_party/ffmpeg/binaries/chrome/libavutil.50.dylib'], |
+ '../third_party/ffmpeg/binaries/chrome/libavutil.50.dylib', |
+ '<(PRODUCT_DIR)/plugin_carbon_interpose.dylib'], |
}, |
], |
}, { # else: 'branding!="Chrome" |
@@ -2955,7 +2958,8 @@ |
'destination': '<(PRODUCT_DIR)/<(mac_product_name).app/Contents/MacOS/', |
'files': ['../third_party/ffmpeg/binaries/chromium/libavcodec.52.dylib', |
'../third_party/ffmpeg/binaries/chromium/libavformat.52.dylib', |
- '../third_party/ffmpeg/binaries/chromium/libavutil.50.dylib'], |
+ '../third_party/ffmpeg/binaries/chromium/libavutil.50.dylib', |
+ '<(PRODUCT_DIR)/plugin_carbon_interpose.dylib'], |
}, |
], |
}], |
@@ -3004,6 +3008,7 @@ |
# Bring in pdfsqueeze and run it on all pdfs |
'dependencies': [ |
'../build/temp_gyp/pdfsqueeze.gyp:pdfsqueeze', |
+ 'interpose_dependency_shim', |
], |
'rules': [ |
{ |
@@ -4422,6 +4427,49 @@ |
}, |
], # 'actions' |
}, |
+ { |
+ # Dummy target to allow chrome to require plugin_carbon_interpose to |
+ # build without actually linking to the resulting library. |
+ 'target_name': 'interpose_dependency_shim', |
+ 'type': 'executable', |
+ 'dependencies': [ |
+ 'plugin_carbon_interpose', |
+ ], |
+ # In release, we end up with a strip step that is unhappy if there is |
+ # no binary. Rather than check in a new file for this temporary hack, |
+ # just generate a source file on the fly. |
+ 'actions': [ |
+ { |
+ 'action_name': 'generate_stub_main', |
+ 'process_outputs_as_sources': 1, |
+ 'inputs': [], |
+ 'outputs': [ '<(INTERMEDIATE_DIR)/dummy_main.c' ], |
+ 'action': [ |
+ 'bash', '-c', |
+ 'echo "int main() { return 0; }" > <(INTERMEDIATE_DIR)/dummy_main.c' |
+ ], |
+ }, |
+ ], |
+ }, |
+ { |
+ # dylib for interposing Carbon calls in the plugin process. |
+ 'target_name': 'plugin_carbon_interpose', |
+ 'type': 'shared_library', |
+ 'dependencies': [ |
+ 'chrome_dll', |
+ ], |
+ 'sources': [ |
+ 'browser/plugin_carbon_interpose_mac.cc', |
+ ], |
+ 'include_dirs': [ |
+ '..', |
+ ], |
+ 'link_settings': { |
+ 'libraries': [ |
+ '$(SDKROOT)/System/Library/Frameworks/Carbon.framework', |
+ ], |
+ }, |
+ }, |
] |
}, { # else: OS != "mac" |
'targets': [ |