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', |
+ }], |
], |
- }], |
+ }, |
], |
} |