Index: runtime/bin/BUILD.gn |
diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn |
index d8a638446ae376633fb61c2abc44184df527e7d9..df8d40573e828456e08eff7b8e29a4e600c17c00 100644 |
--- a/runtime/bin/BUILD.gn |
+++ b/runtime/bin/BUILD.gn |
@@ -203,9 +203,11 @@ gen_library_src_path("generate_web_audio_cc_file") { |
} |
config("libdart_builtin_config") { |
- libs = [ |
- "dl", |
- ] |
+ if (!is_win) { |
+ libs = [ |
+ "dl", |
+ ] |
+ } |
if (is_android) { |
libs += [ |
"android", |
@@ -300,6 +302,16 @@ executable("gen_snapshot") { |
"CoreServices.framework" |
] |
} |
+ |
+ if (is_win) { |
+ libs = [ |
+ "iphlpapi.lib", |
+ "psapi.lib", |
+ "ws2_32.lib", |
+ "Rpcrt4.lib", |
+ "winmm.lib", |
+ ] |
+ } |
} |
# A source set for the implementation of 'dart:io' library |
@@ -545,9 +557,25 @@ template("dart_executable") { |
"//third_party", |
] |
- ldflags = [ |
- "-rdynamic", |
- ] |
+ if (is_win) { |
+ ldflags = [ |
+ "/EXPORT:Dart_True" |
+ ] |
+ } else { |
+ ldflags = [ |
+ "-rdynamic", |
+ ] |
+ } |
+ |
+ if (is_win) { |
+ libs = [ |
+ "iphlpapi.lib", |
+ "psapi.lib", |
+ "ws2_32.lib", |
+ "Rpcrt4.lib", |
+ "winmm.lib", |
+ ] |
+ } |
} |
} |
@@ -719,9 +747,21 @@ executable("run_vm_tests") { |
"run_vm_tests.cc", |
] + builtin_impl_tests_list.sources + vm_tests |
- ldflags = [ |
- "-rdynamic", |
- ] |
+ if (!is_win) { |
+ ldflags = [ |
+ "-rdynamic", |
+ ] |
+ } |
+ |
+ if (is_win) { |
+ libs = [ |
+ "iphlpapi.lib", |
+ "psapi.lib", |
+ "ws2_32.lib", |
+ "Rpcrt4.lib", |
+ "winmm.lib", |
+ ] |
+ } |
} |
if (!defined(is_fuchsia) || !is_fuchsia) { |
@@ -740,6 +780,15 @@ if (!defined(is_fuchsia) || !is_fuchsia) { |
# The only effect of DART_SHARED_LIB is to export the Dart API. |
"DART_SHARED_LIB", |
] |
+ if (is_win) { |
+ libs = [ |
+ "dart.lib" |
+ ] |
+ abs_root_out_dir = rebase_path(root_out_dir) |
+ ldflags = [ |
+ "/LIBPATH:$abs_root_out_dir" |
+ ] |
+ } |
} |
shared_library("sample_extension") { |
@@ -757,5 +806,14 @@ if (!defined(is_fuchsia) || !is_fuchsia) { |
# The only effect of DART_SHARED_LIB is to export the Dart API. |
"DART_SHARED_LIB", |
] |
+ if (is_win) { |
+ libs = [ |
+ "dart.lib" |
+ ] |
+ abs_root_out_dir = rebase_path(root_out_dir) |
+ ldflags = [ |
+ "/LIBPATH:$abs_root_out_dir" |
+ ] |
+ } |
} |
} |