| OLD | NEW |
| (Empty) |
| 1 # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | |
| 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. | |
| 4 | |
| 5 { | |
| 6 'targets': [ | |
| 7 { | |
| 8 'target_name': 'dynamic_annotations', | |
| 9 'type': 'static_library', | |
| 10 'toolsets': ['host', 'target'], | |
| 11 'include_dirs': [ | |
| 12 'include', | |
| 13 'gperftools/src/base', | |
| 14 'gperftools/src', | |
| 15 ], | |
| 16 'cflags!': [ | |
| 17 '-Werror', | |
| 18 '-Wnon-virtual-dtor', | |
| 19 '-Woverloaded-virtual', | |
| 20 '-fno-rtti', | |
| 21 ], | |
| 22 'sources': [ | |
| 23 'gperftools/src/base/dynamic_annotations.c', | |
| 24 'gperftools/src/base/dynamic_annotations.h', | |
| 25 ], | |
| 26 }, | |
| 27 { | |
| 28 'target_name': 'tcmalloc', | |
| 29 'type': 'static_library', | |
| 30 'toolsets': ['host', 'target'], | |
| 31 'dependencies': [ | |
| 32 'dynamic_annotations', | |
| 33 ], | |
| 34 'include_dirs': [ | |
| 35 'include', | |
| 36 'gperftools/src/base', | |
| 37 'gperftools/src', | |
| 38 ], | |
| 39 'includes': [ | |
| 40 'tcmalloc_sources.gypi', | |
| 41 ], | |
| 42 # Disable the heap checker in tcmalloc. | |
| 43 'defines': [ | |
| 44 'ENABLE_EMERGENCY_MALLOC', | |
| 45 'NO_HEAP_CHECK', | |
| 46 # Disable debug even in a Dart Debug build. It is too slow. | |
| 47 'NDEBUG', | |
| 48 ], | |
| 49 'defines!': [ | |
| 50 # Disable debug even in a Dart Debug build. It is too slow. | |
| 51 'DEBUG', | |
| 52 ], | |
| 53 'cflags': [ | |
| 54 '-Wno-missing-field-initializers', | |
| 55 '-Wno-sign-compare', | |
| 56 '-Wno-type-limits', | |
| 57 '-Wno-unused-result', | |
| 58 '-Wno-vla', | |
| 59 '-fno-builtin-malloc', | |
| 60 '-fno-builtin-free', | |
| 61 '-fno-builtin-realloc', | |
| 62 '-fno-builtin-calloc', | |
| 63 '-fno-builtin-cfree', | |
| 64 '-fno-builtin-memalign', | |
| 65 '-fno-builtin-posix_memalign', | |
| 66 '-fno-builtin-valloc', | |
| 67 '-fno-builtin-pvalloc', | |
| 68 '-fpermissive', | |
| 69 ], | |
| 70 'cflags!': [ | |
| 71 '-Werror', | |
| 72 '-Wvla', | |
| 73 ], | |
| 74 'link_settings': { | |
| 75 'configurations': { | |
| 76 'Dart_Linux_Base': { | |
| 77 'ldflags': [ | |
| 78 # Don't let linker rip this symbol out, otherwise the heap&cpu | |
| 79 # profilers will not initialize properly on startup. | |
| 80 '-Wl,-uIsHeapProfilerRunning,-uProfilerStart', | |
| 81 ], | |
| 82 }, | |
| 83 }, | |
| 84 }, | |
| 85 'sources!': [ | |
| 86 # No debug allocator. | |
| 87 'gperftools/src/debugallocation.cc', | |
| 88 # Not needed when using emergency malloc. | |
| 89 'gperftools/src/fake_stacktrace_scope.cc', | |
| 90 # Not using the cpuprofiler | |
| 91 'gperftools/src/base/thread_lister.c', | |
| 92 'gperftools/src/base/thread_lister.h', | |
| 93 'gperftools/src/profile-handler.cc', | |
| 94 'gperftools/src/profile-handler.h', | |
| 95 'gperftools/src/profiledata.cc', | |
| 96 'gperftools/src/profiledata.h', | |
| 97 'gperftools/src/profiler.cc', | |
| 98 ], | |
| 99 # Disable sample collection in Release and Product builds. | |
| 100 'configurations': { | |
| 101 'Dart_Product': { | |
| 102 'defines': [ | |
| 103 'NO_TCMALLOC_SAMPLES', | |
| 104 ], | |
| 105 }, | |
| 106 }, | |
| 107 }, | |
| 108 ], | |
| 109 } | |
| OLD | NEW |