OLD | NEW |
---|---|
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/buildflag_header.gni") | 5 import("//build/buildflag_header.gni") |
6 import("//build/config/allocator.gni") | 6 import("//build/config/allocator.gni") |
7 import("//build/config/compiler/compiler.gni") | 7 import("//build/config/compiler/compiler.gni") |
8 | 8 |
9 declare_args() { | 9 declare_args() { |
10 # Provide a way to force disable debugallocation in Debug builds, | 10 # Provide a way to force disable debugallocation in Debug builds, |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
66 "-Wno-unused-function", | 66 "-Wno-unused-function", |
67 | 67 |
68 # tcmalloc uses COMPILE_ASSERT without static_assert but with | 68 # tcmalloc uses COMPILE_ASSERT without static_assert but with |
69 # typedefs. | 69 # typedefs. |
70 "-Wno-unused-local-typedefs", | 70 "-Wno-unused-local-typedefs", |
71 | 71 |
72 # for magic2_ in debugallocation.cc (only built in Debug builds) | 72 # for magic2_ in debugallocation.cc (only built in Debug builds) |
73 # typedefs. | 73 # typedefs. |
74 "-Wno-unused-private-field", | 74 "-Wno-unused-private-field", |
75 ] | 75 ] |
76 if (target_cpu == "arm") { | |
77 # Temporarily disable clang's integrated assembler when building tcmalloc | |
78 # TODO(https://llvm.org/bugs/show_bug.cgi?id=31058) | |
79 cflags += [ "-fno-integrated-as" ] | |
llozano
2016/11/22 19:42:53
I thought the option is -no-integrated-as but this
| |
80 } | |
76 } else { | 81 } else { |
77 cflags = [] | 82 cflags = [] |
78 } | 83 } |
79 | 84 |
80 if (is_linux || is_android) { | 85 if (is_linux || is_android) { |
81 # We enable all warnings by default, but upstream disables a few. | 86 # We enable all warnings by default, but upstream disables a few. |
82 # Keep "-Wno-*" flags in sync with upstream by comparing against: | 87 # Keep "-Wno-*" flags in sync with upstream by comparing against: |
83 # http://code.google.com/p/google-perftools/source/browse/trunk/Makefile.am | 88 # http://code.google.com/p/google-perftools/source/browse/trunk/Makefile.am |
84 cflags += [ | 89 cflags += [ |
85 "-Wno-sign-compare", | 90 "-Wno-sign-compare", |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
209 | 214 |
210 # Disable the heap checker in tcmalloc. | 215 # Disable the heap checker in tcmalloc. |
211 defines = [ "NO_HEAP_CHECK" ] | 216 defines = [ "NO_HEAP_CHECK" ] |
212 | 217 |
213 include_dirs = [ | 218 include_dirs = [ |
214 ".", | 219 ".", |
215 "$tcmalloc_dir/src/base", | 220 "$tcmalloc_dir/src/base", |
216 "$tcmalloc_dir/src", | 221 "$tcmalloc_dir/src", |
217 ] | 222 ] |
218 | 223 |
219 configs -= [ | 224 configs -= [ "//build/config/compiler:chromium_code" ] |
220 "//build/config/compiler:chromium_code", | |
221 | |
222 # Thumb mode disabled due to bug in clang integrated assembler | |
223 # TODO(https://llvm.org/bugs/show_bug.cgi?id=31058) | |
224 "//build/config/compiler:compiler_arm_thumb", | |
225 ] | |
226 configs += [ | 225 configs += [ |
227 "//build/config/compiler:no_chromium_code", | 226 "//build/config/compiler:no_chromium_code", |
228 ":tcmalloc_flags", | 227 ":tcmalloc_flags", |
229 ] | 228 ] |
230 | 229 |
231 # TODO(crbug.com/633719) Make tcmalloc work with AFDO if possible. | 230 # TODO(crbug.com/633719) Make tcmalloc work with AFDO if possible. |
232 configs -= [ "//build/config/compiler:afdo" ] | 231 configs -= [ "//build/config/compiler:afdo" ] |
233 | 232 |
234 deps = [] | 233 deps = [] |
235 | 234 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
341 sources += [ "allocator_shim_default_dispatch_to_glibc.cc" ] | 340 sources += [ "allocator_shim_default_dispatch_to_glibc.cc" ] |
342 } else if (is_android && use_allocator == "none") { | 341 } else if (is_android && use_allocator == "none") { |
343 sources += [ | 342 sources += [ |
344 "allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc", | 343 "allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc", |
345 "allocator_shim_override_linker_wrapped_symbols.h", | 344 "allocator_shim_override_linker_wrapped_symbols.h", |
346 ] | 345 ] |
347 all_dependent_configs = [ ":wrap_malloc_symbols" ] | 346 all_dependent_configs = [ ":wrap_malloc_symbols" ] |
348 } | 347 } |
349 } | 348 } |
350 } | 349 } |
OLD | NEW |