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

Unified Diff: runtime/bin/BUILD.gn

Issue 2385643004: Enables GN build on windows (Closed)
Patch Set: Add .gitignore for build Created 4 years, 2 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 | « runtime/BUILD.gn ('k') | runtime/vm/BUILD.gn » ('j') | utils/invoke_dart.gni » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
+ ]
+ }
}
}
« no previous file with comments | « runtime/BUILD.gn ('k') | runtime/vm/BUILD.gn » ('j') | utils/invoke_dart.gni » ('J')

Powered by Google App Engine
This is Rietveld 408576698