Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Unified Diff: runtime/bin/bin.gypi

Issue 9465004: Add native extensions for the Dart shell to mac and windows (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Replace MakeString with Concatenate Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/bin/builtin_impl_sources.gypi » ('j') | runtime/bin/extensions.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/bin.gypi
diff --git a/runtime/bin/bin.gypi b/runtime/bin/bin.gypi
index 92e5a745e70af2dd3f3364dcfe11b25fdc239557..01936829604ae0f20300d3195fa3032958ffadbb 100644
--- a/runtime/bin/bin.gypi
+++ b/runtime/bin/bin.gypi
@@ -346,7 +346,15 @@
'link_settings': {
'libraries': [ '-lws2_32.lib', '-lRpcrt4.lib' ],
},
- }]],
+ # Generate an import library on Windows, by exporting a function.
+ # Extensions use this import library to link to the API in dart.exe.
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'AdditionalOptions': [ '/EXPORT:Dart_True' ],
+ },
+ },
+ }],
+ ],
},
{
# dart binary without any snapshot built in.
@@ -421,27 +429,42 @@
}],
],
},
- ],
- 'conditions': [
- ['OS=="linux"', {
- 'targets': [
- {
- 'target_name': 'test_extension',
+ {
+ 'target_name': 'test_extension',
+ 'dependencies': [
+ 'dart',
+ ],
+ 'include_dirs': [
+ '..',
+ ],
+ 'sources': [
+ 'test_extension.cc',
+ 'test_extension_dllmain_win.cc',
+ ],
+ 'defines': [
+ 'DART_SHARED_LIB',
+ ],
+ 'conditions': [
+ ['OS=="win"', {
'type': 'shared_library',
Ivan Posva 2012/03/08 17:03:05 Why are windows and linux not using loadable_modul
- 'dependencies': [
- ],
- 'include_dirs': [
- '.',
- ],
- 'sources': [
- 'test_extension_linux.cc',
- ],
- 'defines': [
- 'DART_SHARED_LIB',
- ],
- },
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'AdditionalDependencies': [ 'dart.lib' ],
+ 'AdditionalLibraryDirectories': [ '<(PRODUCT_DIR)' ],
+ },
+ },
+ }],
+ ['OS=="macos"', {
+ 'type': 'loadable_module',
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [ '-undefined', 'dynamic_lookup' ],
+ },
+ }],
+ ['OS=="linux"', {
+ 'type': 'shared_library',
+ }],
],
- }],
+ },
],
}
« no previous file with comments | « no previous file | runtime/bin/builtin_impl_sources.gypi » ('j') | runtime/bin/extensions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698