diff options
author | brettw <brettw@chromium.org> | 2015-12-04 16:44:15 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-05 00:45:52 +0000 |
commit | fb87ed2af7a7b63d2ef2506bb2ca4994a36c3840 (patch) | |
tree | b3adeeff8450eaa9623310195b876c18b5fce990 /base/base.gyp | |
parent | 1c425796f9b4d91bd0d3a616e86a9ed942de21e9 (diff) | |
download | chromium_src-fb87ed2af7a7b63d2ef2506bb2ca4994a36c3840.zip chromium_src-fb87ed2af7a7b63d2ef2506bb2ca4994a36c3840.tar.gz chromium_src-fb87ed2af7a7b63d2ef2506bb2ca4994a36c3840.tar.bz2 |
Move ENABLE_PROFILING to build flags system.
This flag is only used in 3 files so having a global define is unnecessary.
Moves the build flag to compiler.gni so it can be included by the new target in base that generates the header, as well as the tcmalloc target.
The tcmalloc target now conditionally compiles the profiler depending on this flag. This is something the GYP build does but was inconsistent in GN. This results in the tcmalloc source files not being compiled in normal builds.
This should remove the static initializer in tcmalloc profiling in the normal build.
Independently, remove an iostream use in gin logging. Use printf instead.
BUG=559766
R=dpranke@chromium.org
Reland of https://codereview.chromium.org/1499773002 with fix
NOPRESUBMIT=true
(on account of changing the printf, which I did not add)
Review URL: https://codereview.chromium.org/1498733007
Cr-Commit-Position: refs/heads/master@{#363318}
Diffstat (limited to 'base/base.gyp')
-rw-r--r-- | base/base.gyp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/base/base.gyp b/base/base.gyp index 6ab4b36..8fa0524 100644 --- a/base/base.gyp +++ b/base/base.gyp @@ -21,6 +21,7 @@ 'optimize': 'max', }, 'dependencies': [ + 'base_debugging_flags', 'base_static', 'allocator/allocator.gyp:allocator_extension_thunks', '../testing/gtest.gyp:gtest_prod', @@ -1076,6 +1077,18 @@ }], ], }, + { + # GN version: //base/debug:debugging_flags + 'target_name': 'base_debugging_flags', + 'toolsets': ['host', 'target'], + 'includes': [ '../build/buildflag_header.gypi' ], + 'variables': { + 'buildflag_header_path': 'base/debug/debugging_flags.h', + 'buildflag_flags': [ + 'ENABLE_PROFILING=<(profiling)', + ], + }, + }, ], 'conditions': [ ['OS=="ios" and "<(GENERATOR)"=="ninja"', { @@ -1131,6 +1144,7 @@ 'base_target': 1, }, 'dependencies': [ + 'base_debugging_flags', 'base_static_win64', 'allocator/allocator.gyp:allocator_extension_thunks_win64', '../third_party/modp_b64/modp_b64.gyp:modp_b64_win64', |