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

Side by Side 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 unified diff | Download patch
OLDNEW
1 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 # for details. All rights reserved. Use of this source code is governed by a 2 # for details. All rights reserved. Use of this source code is governed by a
3 # BSD-style license that can be found in the LICENSE file. 3 # BSD-style license that can be found in the LICENSE file.
4 4
5 declare_args() { 5 declare_args() {
6 # Whether to fall back to built-in root certificates when they cannot be 6 # Whether to fall back to built-in root certificates when they cannot be
7 # verified at the operating system level. 7 # verified at the operating system level.
8 dart_use_fallback_root_certificates = false 8 dart_use_fallback_root_certificates = false
9 9
10 # The BUILD.gn file that we pull from chromium as part of zlib has a 10 # The BUILD.gn file that we pull from chromium as part of zlib has a
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } 196 }
197 197
198 gen_library_src_path("generate_web_audio_cc_file") { 198 gen_library_src_path("generate_web_audio_cc_file") {
199 name = "web_audio" 199 name = "web_audio"
200 kind = "source" 200 kind = "source"
201 sources = ["../../sdk/lib/web_audio/dartium/web_audio_dartium.dart"] 201 sources = ["../../sdk/lib/web_audio/dartium/web_audio_dartium.dart"]
202 output = "$target_gen_dir/web_audio_gen.cc" 202 output = "$target_gen_dir/web_audio_gen.cc"
203 } 203 }
204 204
205 config("libdart_builtin_config") { 205 config("libdart_builtin_config") {
206 libs = [ 206 if (!is_win) {
207 "dl", 207 libs = [
208 ] 208 "dl",
209 ]
210 }
209 if (is_android) { 211 if (is_android) {
210 libs += [ 212 libs += [
211 "android", 213 "android",
212 "log", 214 "log",
213 ] 215 ]
214 } 216 }
215 } 217 }
216 218
217 builtin_impl_sources_gypi = 219 builtin_impl_sources_gypi =
218 exec_script("../../tools/gypi_to_gn.py", 220 exec_script("../../tools/gypi_to_gn.py",
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 include_dirs = [ 295 include_dirs = [
294 "..", 296 "..",
295 ] 297 ]
296 298
297 if (is_mac) { 299 if (is_mac) {
298 libs = [ 300 libs = [
299 "CoreFoundation.framework", 301 "CoreFoundation.framework",
300 "CoreServices.framework" 302 "CoreServices.framework"
301 ] 303 ]
302 } 304 }
305
306 if (is_win) {
307 libs = [
308 "iphlpapi.lib",
309 "psapi.lib",
310 "ws2_32.lib",
311 "Rpcrt4.lib",
312 "winmm.lib",
313 ]
314 }
303 } 315 }
304 316
305 # A source set for the implementation of 'dart:io' library 317 # A source set for the implementation of 'dart:io' library
306 # (without secure sockets) suitable for linking with gen_snapshot. 318 # (without secure sockets) suitable for linking with gen_snapshot.
307 source_set("gen_snapshot_dart_io") { 319 source_set("gen_snapshot_dart_io") {
308 configs += ["..:dart_config", 320 configs += ["..:dart_config",
309 "..:dart_maybe_product_config", 321 "..:dart_maybe_product_config",
310 "..:dart_precompiler_config"] 322 "..:dart_precompiler_config"]
311 323
312 deps = [ 324 deps = [
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 "vmservice_impl.cc", 550 "vmservice_impl.cc",
539 "vmservice_impl.h", 551 "vmservice_impl.h",
540 "$target_gen_dir/resources_gen.cc", 552 "$target_gen_dir/resources_gen.cc",
541 ] + extra_sources 553 ] + extra_sources
542 554
543 include_dirs = [ 555 include_dirs = [
544 "..", 556 "..",
545 "//third_party", 557 "//third_party",
546 ] 558 ]
547 559
548 ldflags = [ 560 if (is_win) {
549 "-rdynamic", 561 ldflags = [
550 ] 562 "/EXPORT:Dart_True"
563 ]
564 } else {
565 ldflags = [
566 "-rdynamic",
567 ]
568 }
569
570 if (is_win) {
571 libs = [
572 "iphlpapi.lib",
573 "psapi.lib",
574 "ws2_32.lib",
575 "Rpcrt4.lib",
576 "winmm.lib",
577 ]
578 }
551 } 579 }
552 } 580 }
553 581
554 if (!defined(is_fuchsia) || !is_fuchsia) { 582 if (!defined(is_fuchsia) || !is_fuchsia) {
555 dart_executable("dart") { 583 dart_executable("dart") {
556 extra_deps = [ 584 extra_deps = [
557 "..:libdart", 585 "..:libdart",
558 ":dart_snapshot_cc", 586 ":dart_snapshot_cc",
559 "../observatory:standalone_observatory_archive", 587 "../observatory:standalone_observatory_archive",
560 ] 588 ]
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 [rebase_path("builtin_impl_sources.gypi"), 740 [rebase_path("builtin_impl_sources.gypi"),
713 "--keep_only=_test.cc", 741 "--keep_only=_test.cc",
714 "--keep_only=_test.h",], 742 "--keep_only=_test.h",],
715 "scope", 743 "scope",
716 ["builtin_impl_sources.gypi"]) 744 ["builtin_impl_sources.gypi"])
717 745
718 sources = [ 746 sources = [
719 "run_vm_tests.cc", 747 "run_vm_tests.cc",
720 ] + builtin_impl_tests_list.sources + vm_tests 748 ] + builtin_impl_tests_list.sources + vm_tests
721 749
722 ldflags = [ 750 if (!is_win) {
723 "-rdynamic", 751 ldflags = [
724 ] 752 "-rdynamic",
753 ]
754 }
755
756 if (is_win) {
757 libs = [
758 "iphlpapi.lib",
759 "psapi.lib",
760 "ws2_32.lib",
761 "Rpcrt4.lib",
762 "winmm.lib",
763 ]
764 }
725 } 765 }
726 766
727 if (!defined(is_fuchsia) || !is_fuchsia) { 767 if (!defined(is_fuchsia) || !is_fuchsia) {
728 shared_library("test_extension") { 768 shared_library("test_extension") {
729 deps = [ 769 deps = [
730 ":dart", 770 ":dart",
731 ] 771 ]
732 sources = [ 772 sources = [
733 "test_extension.c", 773 "test_extension.c",
734 "test_extension_dllmain_win.cc", 774 "test_extension_dllmain_win.cc",
735 ] 775 ]
736 include_dirs = [ 776 include_dirs = [
737 "..", 777 "..",
738 ] 778 ]
739 defines = [ 779 defines = [
740 # The only effect of DART_SHARED_LIB is to export the Dart API. 780 # The only effect of DART_SHARED_LIB is to export the Dart API.
741 "DART_SHARED_LIB", 781 "DART_SHARED_LIB",
742 ] 782 ]
783 if (is_win) {
784 libs = [
785 "dart.lib"
786 ]
787 abs_root_out_dir = rebase_path(root_out_dir)
788 ldflags = [
789 "/LIBPATH:$abs_root_out_dir"
790 ]
791 }
743 } 792 }
744 793
745 shared_library("sample_extension") { 794 shared_library("sample_extension") {
746 deps = [ 795 deps = [
747 ":dart", 796 ":dart",
748 ] 797 ]
749 sources = [ 798 sources = [
750 "../../samples/sample_extension/sample_extension.cc", 799 "../../samples/sample_extension/sample_extension.cc",
751 "../../samples/sample_extension/sample_extension_dllmain_win.cc", 800 "../../samples/sample_extension/sample_extension_dllmain_win.cc",
752 ] 801 ]
753 include_dirs = [ 802 include_dirs = [
754 "..", 803 "..",
755 ] 804 ]
756 defines = [ 805 defines = [
757 # The only effect of DART_SHARED_LIB is to export the Dart API. 806 # The only effect of DART_SHARED_LIB is to export the Dart API.
758 "DART_SHARED_LIB", 807 "DART_SHARED_LIB",
759 ] 808 ]
809 if (is_win) {
810 libs = [
811 "dart.lib"
812 ]
813 abs_root_out_dir = rebase_path(root_out_dir)
814 ldflags = [
815 "/LIBPATH:$abs_root_out_dir"
816 ]
817 }
760 } 818 }
761 } 819 }
OLDNEW
« 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