Add support for Dr memory and Windows tsan in the GN build.
This generalizes the GCC iterator debugging flag to now be platform-independent. R=scottmg@chromium.org TBR=scottmg Review URL: https://codereview.chromium.org/139783012 git-svn-id: http://src.chromium.org/svn/trunk/src/build@245665 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
Родитель
9b50cd26e9
Коммит
d34dce13b5
|
@ -3,11 +3,10 @@
|
||||||
# found in the LICENSE file.
|
# found in the LICENSE file.
|
||||||
|
|
||||||
declare_args() {
|
declare_args() {
|
||||||
# When set, turns off the definition of _GLIBCXX_DEBUG when it would
|
# When set, turns off the (normally-on) iterator debugging and related stuff
|
||||||
# otherwise be set. Setting _GLIBCXX_DEBUG adds iterator debugging stuff
|
# that is normall turned on for Debug builds. These are generally useful for
|
||||||
# that is usually helpful in debugging, but can cause problems in some
|
# catching bugs but in some cases may cause conflicts or excessive slowness.
|
||||||
# contexts.
|
disable_iterator_debugging = false
|
||||||
disable_glibcxx_debug = false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
config("my_msvs") {
|
config("my_msvs") {
|
||||||
|
@ -46,7 +45,6 @@ config("my_msvs") {
|
||||||
}
|
}
|
||||||
|
|
||||||
config("feature_flags") {
|
config("feature_flags") {
|
||||||
#defines =
|
|
||||||
}
|
}
|
||||||
|
|
||||||
config("debug") {
|
config("debug") {
|
||||||
|
@ -56,7 +54,14 @@ config("debug") {
|
||||||
"WTF_USE_DYNAMIC_ANNOTATIONS=1",
|
"WTF_USE_DYNAMIC_ANNOTATIONS=1",
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_linux && !is_android && cpu_arch == "x64" && !disable_glibcxx_debug) {
|
if (is_win) {
|
||||||
|
if (disable_iterator_debugging) {
|
||||||
|
# Iterator debugging is enabled by the compiler on debug builds, and we
|
||||||
|
# have to tell it to turn it off.
|
||||||
|
defines += [ "_HAS_ITERATOR_DEBUGGING=0" ]
|
||||||
|
}
|
||||||
|
} else if (is_linux && !is_android && cpu_arch == "x64" &&
|
||||||
|
!disable_iterator_debugging) {
|
||||||
# Enable libstdc++ debugging facilities to help catch problems early, see
|
# Enable libstdc++ debugging facilities to help catch problems early, see
|
||||||
# http://crbug.com/65151 .
|
# http://crbug.com/65151 .
|
||||||
# TODO(phajdan.jr): Should we enable this for all of POSIX?
|
# TODO(phajdan.jr): Should we enable this for all of POSIX?
|
||||||
|
|
|
@ -173,11 +173,13 @@ def GetArgsStringForGN(supplemental_files):
|
||||||
remap_cases = [
|
remap_cases = [
|
||||||
('android_webview_build', '1', 'is_android_webview_build=true'),
|
('android_webview_build', '1', 'is_android_webview_build=true'),
|
||||||
('branding', 'Chrome', 'is_chrome_branded=true'),
|
('branding', 'Chrome', 'is_chrome_branded=true'),
|
||||||
|
('build_for_tool', 'drmemory', 'disable_iterator_debugging=true'),
|
||||||
|
('build_for_tool', 'tsan', 'disable_iterator_debugging=true'),
|
||||||
('buildtype', 'Official', 'is_official_build=true'),
|
('buildtype', 'Official', 'is_official_build=true'),
|
||||||
('component', 'shared_library', 'is_component_build=true'),
|
('component', 'shared_library', 'is_component_build=true'),
|
||||||
('clang', '1', 'is_clang=true'),
|
('clang', '1', 'is_clang=true'),
|
||||||
('clang_use_chrome_plugins', '0', 'clang_use_chrome_plugins=false'),
|
('clang_use_chrome_plugins', '0', 'clang_use_chrome_plugins=false'),
|
||||||
('disable_glibcxx_debug', '1', 'disable_glibcxx_debug=true'),
|
('disable_glibcxx_debug', '1', 'disable_iterator_debugging=true'),
|
||||||
('target_arch', 'ia32', 'cpu_arch="x86"'),
|
('target_arch', 'ia32', 'cpu_arch="x86"'),
|
||||||
('target_arch', 'x64', 'cpu_arch="x64" force_win64=true'),
|
('target_arch', 'x64', 'cpu_arch="x64" force_win64=true'),
|
||||||
('target_arch', 'arm', 'cpu_arch="arm"'),
|
('target_arch', 'arm', 'cpu_arch="arm"'),
|
||||||
|
|
Загрузка…
Ссылка в новой задаче