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

Side by Side Diff: runtime/bin/BUILD.gn

Issue 2367723004: Add tcmalloc to GN build (Closed)
Patch Set: Address comments Created 4 years, 3 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
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | third_party/tcmalloc/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
11 # dependence on //base, which we don't pull in. In a standalone build of the 11 # dependence on //base, which we don't pull in. In a standalone build of the
12 # VM, we set this to //runtime/bin/zlib where we have a BUILD.gn file without 12 # VM, we set this to //runtime/bin/zlib where we have a BUILD.gn file without
13 # a dependence on //base. 13 # a dependence on //base.
14 dart_zlib_path = "//third_party/zlib" 14 dart_zlib_path = "//third_party/zlib"
15
16 # Whether to link the standalone VM against tcmalloc. The standalone build of
17 # the VM enables this only for Linux builds.
18 dart_use_tcmalloc = false
15 } 19 }
16 20
17 resources_sources_gypi = 21 resources_sources_gypi =
18 exec_script("../../tools/gypi_to_gn.py", 22 exec_script("../../tools/gypi_to_gn.py",
19 [rebase_path("vmservice/vmservice_sources.gypi")], 23 [rebase_path("vmservice/vmservice_sources.gypi")],
20 "scope", 24 "scope",
21 ["vmservice/vmservice_sources.gypi"]) 25 ["vmservice/vmservice_sources.gypi"])
22 26
23 # Generate a resources.cc file for the service isolate without Observatory. 27 # Generate a resources.cc file for the service isolate without Observatory.
24 action("gen_resources_cc") { 28 action("gen_resources_cc") {
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 "..:dart_maybe_product_config" 513 "..:dart_maybe_product_config"
510 ] + extra_configs 514 ] + extra_configs
511 515
512 deps = [ 516 deps = [
513 ":gen_resources_cc", 517 ":gen_resources_cc",
514 ":embedded_dart_io", 518 ":embedded_dart_io",
515 ":libdart_builtin", 519 ":libdart_builtin",
516 "$dart_zlib_path", 520 "$dart_zlib_path",
517 ] + extra_deps 521 ] + extra_deps
518 522
523 if (dart_use_tcmalloc) {
524 deps += [
525 "//third_party/tcmalloc",
526 ]
527 }
528
519 defines = extra_defines 529 defines = extra_defines
520 530
521 sources = [ 531 sources = [
522 "main.cc", 532 "main.cc",
523 "vmservice_impl.cc", 533 "vmservice_impl.cc",
524 "vmservice_impl.h", 534 "vmservice_impl.h",
525 "$target_gen_dir/resources_gen.cc", 535 "$target_gen_dir/resources_gen.cc",
526 ] + extra_sources 536 ] + extra_sources
527 537
528 include_dirs = [ 538 include_dirs = [
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 "$dart_zlib_path", 668 "$dart_zlib_path",
659 ] 669 ]
660 include_dirs = [ 670 include_dirs = [
661 "..", 671 "..",
662 "$target_gen_dir", 672 "$target_gen_dir",
663 ] 673 ]
664 defines = [ 674 defines = [
665 "TESTING", 675 "TESTING",
666 ] 676 ]
667 677
678 if (dart_use_tcmalloc) {
679 deps += [
680 "//third_party/tcmalloc",
681 ]
682 }
683
668 # The VM sources are already included in libdart, so we just want to add in 684 # The VM sources are already included in libdart, so we just want to add in
669 # the tests here. 685 # the tests here.
670 vm_tests_list = exec_script("../../tools/gypi_to_gn.py", 686 vm_tests_list = exec_script("../../tools/gypi_to_gn.py",
671 [rebase_path("../vm/vm_sources.gypi"), 687 [rebase_path("../vm/vm_sources.gypi"),
672 "--keep_only=_test.cc", 688 "--keep_only=_test.cc",
673 "--keep_only=_test.h",], 689 "--keep_only=_test.h",],
674 "scope", 690 "scope",
675 ["../vm/vm_sources.gypi"]) 691 ["../vm/vm_sources.gypi"])
676 vm_tests = rebase_path(vm_tests_list.sources, ".", "../vm") 692 vm_tests = rebase_path(vm_tests_list.sources, ".", "../vm")
677 693
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 ] 736 ]
721 include_dirs = [ 737 include_dirs = [
722 "..", 738 "..",
723 ] 739 ]
724 defines = [ 740 defines = [
725 # The only effect of DART_SHARED_LIB is to export the Dart API. 741 # The only effect of DART_SHARED_LIB is to export the Dart API.
726 "DART_SHARED_LIB", 742 "DART_SHARED_LIB",
727 ] 743 ]
728 } 744 }
729 } 745 }
OLDNEW
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | third_party/tcmalloc/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698