| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 { | 5 { |
| 6 'target_defaults': { | 6 'target_defaults': { |
| 7 'variables': { | 7 'variables': { |
| 8 # This code gets run a lot and debugged rarely, so it should be fast | 8 # This code gets run a lot and debugged rarely, so it should be fast |
| 9 # by default. See http://crbug.com/388949. | 9 # by default. See http://crbug.com/388949. |
| 10 'debug_optimize': '2', | 10 'debug_optimize': '2', |
| 11 'win_debug_Optimization': '0', | 11 'win_debug_Optimization': '0', |
| 12 # Run time checks are incompatible with any level of optimizations. | 12 # Run time checks are incompatible with any level of optimizations. |
| 13 'win_debug_RuntimeChecks': '0', | 13 'win_debug_RuntimeChecks': '0', |
| 14 }, | 14 }, |
| 15 }, | 15 }, |
| 16 'variables': { | 16 'variables': { |
| 17 'tcmalloc_dir': '../../third_party/tcmalloc/chromium', | 17 'tcmalloc_dir': '../../third_party/tcmalloc/chromium', |
| 18 'use_vtable_verify%': 0, | 18 'use_vtable_verify%': 0, |
| 19 # Provide a way to force disable debugallocation in Debug builds | 19 # Provide a way to force disable debugallocation in Debug builds |
| 20 # e.g. for profiling (it's more rare to profile Debug builds, | 20 # e.g. for profiling (it's more rare to profile Debug builds, |
| 21 # but people sometimes need to do that). | 21 # but people sometimes need to do that). |
| 22 'disable_debugallocation%': 0, | 22 'disable_debugallocation%': 0, |
| 23 'use_experimental_allocator_shim%': 0, | |
| 24 }, | 23 }, |
| 25 'targets': [ | 24 'targets': [ |
| 26 # The only targets that should depend on allocator are 'base' and | 25 # The only targets that should depend on allocator are 'base' and |
| 27 # executables that don't depend, directly or indirectly, on base (a few). | 26 # executables that don't depend, directly or indirectly, on base (a few). |
| 28 # All the other targets get a transitive dependency on this target via base. | 27 # All the other targets get a transitive dependency on this target via base. |
| 29 { | 28 { |
| 30 'target_name': 'allocator', | 29 'target_name': 'allocator', |
| 31 'variables': { | 30 'variables': { |
| 32 'conditions': [ | 31 'conditions': [ |
| 33 ['use_allocator!="none" or (OS=="win" and win_use_allocator_shim==1)',
{ | 32 ['use_allocator!="none" or (OS=="win" and win_use_allocator_shim==1)',
{ |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 }], | 371 }], |
| 373 ['order_profiling != 0', { | 372 ['order_profiling != 0', { |
| 374 'target_conditions' : [ | 373 'target_conditions' : [ |
| 375 ['_toolset=="target"', { | 374 ['_toolset=="target"', { |
| 376 'cflags!': [ '-finstrument-functions' ], | 375 'cflags!': [ '-finstrument-functions' ], |
| 377 }], | 376 }], |
| 378 ], | 377 ], |
| 379 }], | 378 }], |
| 380 ], # conditions of 'allocator' target. | 379 ], # conditions of 'allocator' target. |
| 381 }, # 'allocator' target. | 380 }, # 'allocator' target. |
| 381 { |
| 382 # GN: //base/allocator:features |
| 383 'target_name': 'allocator_features', |
| 384 'includes': [ '../../build/buildflag_header.gypi' ], |
| 385 'toolsets': ['host', 'target'], |
| 386 'variables': { |
| 387 'buildflag_header_path': 'base/allocator/features.h', |
| 388 'buildflag_flags': [ |
| 389 'USE_EXPERIMENTAL_ALLOCATOR_SHIM=<(use_experimental_allocator_shim)', |
| 390 ], |
| 391 }, |
| 392 }, # 'allocator_features' target. |
| 382 ], # targets. | 393 ], # targets. |
| 383 'conditions': [ | 394 'conditions': [ |
| 384 ['OS=="win" and win_use_allocator_shim==1', { | 395 ['OS=="win" and win_use_allocator_shim==1', { |
| 385 'targets': [ | 396 'targets': [ |
| 386 { | 397 { |
| 387 'target_name': 'libcmt', | 398 'target_name': 'libcmt', |
| 388 'toolsets': ['host', 'target'], | 399 'toolsets': ['host', 'target'], |
| 389 'type': 'none', | 400 'type': 'none', |
| 390 'actions': [ | 401 'actions': [ |
| 391 { | 402 { |
| 392 'action_name': 'libcmt', | 403 'action_name': 'libcmt', |
| 393 'inputs': [ | 404 'inputs': [ |
| 394 'prep_libc.py', | 405 'prep_libc.py', |
| 395 ], | 406 ], |
| 396 'outputs': [ | 407 'outputs': [ |
| 397 '<(SHARED_INTERMEDIATE_DIR)/allocator/libcmt.lib', | 408 '<(SHARED_INTERMEDIATE_DIR)/allocator/libcmt.lib', |
| 398 ], | 409 ], |
| 399 'action': [ | 410 'action': [ |
| 400 'python', | 411 'python', |
| 401 'prep_libc.py', | 412 'prep_libc.py', |
| 402 '$(VCInstallDir)lib', | 413 '$(VCInstallDir)lib', |
| 403 '<(SHARED_INTERMEDIATE_DIR)/allocator', | 414 '<(SHARED_INTERMEDIATE_DIR)/allocator', |
| 404 '<(target_arch)', | 415 '<(target_arch)', |
| 405 ], | 416 ], |
| 406 }, | 417 }, |
| 407 ], | 418 ], |
| 408 }, | 419 }, |
| 409 ], | 420 ], |
| 410 }], | 421 }], |
| 422 ['use_experimental_allocator_shim==1', { |
| 423 'targets': [ |
| 424 { |
| 425 # GN: //base/allocator:unified_allocator_shim |
| 426 'target_name': 'unified_allocator_shim', |
| 427 'toolsets': ['host', 'target'], |
| 428 'type': 'static_library', |
| 429 'defines': [ 'BASE_IMPLEMENTATION' ], |
| 430 'sources': [ |
| 431 'allocator_shim.cc', |
| 432 'allocator_shim.h', |
| 433 'allocator_shim_internals.h', |
| 434 'allocator_shim_override_cpp_symbols.h', |
| 435 'allocator_shim_override_libc_symbols.h', |
| 436 ], |
| 437 'include_dirs': [ |
| 438 '../..', |
| 439 ], |
| 440 'conditions': [ |
| 441 ['OS=="linux" and use_allocator=="tcmalloc"', { |
| 442 'sources': [ |
| 443 'allocator_shim_default_dispatch_to_tcmalloc.cc', |
| 444 'allocator_shim_override_glibc_weak_symbols.h', |
| 445 ], |
| 446 }], |
| 447 ['OS=="linux" and use_allocator=="none"', { |
| 448 'sources': [ |
| 449 'allocator_shim_default_dispatch_to_glibc.cc', |
| 450 ], |
| 451 }], |
| 452 ] |
| 453 }, # 'unified_allocator_shim' target. |
| 454 ], |
| 455 }] |
| 411 ], | 456 ], |
| 412 } | 457 } |
| OLD | NEW |