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 ], |
| 69 'cflags!': [ |
| 70 '-Werror', |
| 71 '-Wvla', |
| 72 ], |
| 73 'link_settings': { |
| 74 'ldflags': [ |
| 75 # Don't let linker rip this symbol out, otherwise the heap&cpu |
| 76 # profilers will not initialize properly on startup. |
| 77 '-Wl,-uIsHeapProfilerRunning,-uProfilerStart', |
| 78 ], |
| 79 }, |
| 80 'sources!': [ |
| 81 # No debug allocator. |
| 82 'gperftools/src/debugallocation.cc', |
| 83 # Not needed when using emergency malloc. |
| 84 'gperftools/src/fake_stacktrace_scope.cc', |
| 85 # Not using the cpuprofiler |
| 86 'gperftools/src/base/thread_lister.c', |
| 87 'gperftools/src/base/thread_lister.h', |
| 88 'gperftools/src/profile-handler.cc', |
| 89 'gperftools/src/profile-handler.h', |
| 90 'gperftools/src/profiledata.cc', |
| 91 'gperftools/src/profiledata.h', |
| 92 'gperftools/src/profiler.cc', |
| 93 ], |
| 94 # Disable sample collection in Release and Product builds. |
| 95 'configurations': { |
| 96 'Dart_Product': { |
| 97 'defines': [ |
| 98 'NO_TCMALLOC_SAMPLES', |
| 99 ], |
| 100 }, |
| 101 }, |
| 102 }, |
| 103 ], |
| 104 } |
OLD | NEW |