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

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: Use shared library (dylib) on Mac (and therefore for all platforms). 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') | no next file with comments »
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..22478d8a4b6f493e9d2f6ba86016a9ae73b2760f 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,38 @@
}],
],
},
- ],
- 'conditions': [
- ['OS=="linux"', {
- 'targets': [
- {
- 'target_name': 'test_extension',
- 'type': 'shared_library',
- 'dependencies': [
- ],
- 'include_dirs': [
- '.',
- ],
- 'sources': [
- 'test_extension_linux.cc',
- ],
- 'defines': [
- 'DART_SHARED_LIB',
- ],
- },
+ {
+ 'target_name': 'test_extension',
+ 'type': 'shared_library',
+ 'dependencies': [
+ 'dart',
],
- }],
+ 'include_dirs': [
+ '..',
+ ],
+ 'sources': [
+ 'test_extension.cc',
+ 'test_extension_dllmain_win.cc',
+ ],
+ 'defines': [
+ 'DART_SHARED_LIB',
+ ],
+ 'conditions': [
+ ['OS=="win"', {
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'AdditionalDependencies': [ 'dart.lib' ],
+ 'AdditionalLibraryDirectories': [ '<(PRODUCT_DIR)' ],
+ },
+ },
+ }],
+ ['OS=="mac"', {
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [ '-undefined', 'dynamic_lookup' ],
+ },
+ }],
+ ],
+ },
],
}
« no previous file with comments | « no previous file | runtime/bin/builtin_impl_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698