Linux: Enable ODR violation detection.

BUG=449754

Review URL: https://codereview.chromium.org/899403003

Cr-Original-Commit-Position: refs/heads/master@{#315906}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e86588abd0f3b65777d8bc679747eeb6bbdf21f8
This commit is contained in:
thestig 2015-02-11 18:04:11 -08:00 коммит произвёл Commit bot
Родитель 4b174dc29c
Коммит dac591e07f
2 изменённых файлов: 16 добавлений и 1 удалений

Просмотреть файл

@ -4386,6 +4386,14 @@
# '-Wl,--threads',
# '-Wl,--thread-count=4',
],
'conditions': [
# TODO(thestig): Enable this for CrOS and Sanitizers.
[ 'chromeos==0 and asan==0 and lsan==0 and tsan==0 and msan==0 and ubsan==0 and ubsan_vptr==0', {
'ldflags': [
'-Wl,--detect-odr-violations',
],
}],
],
}],
],
'conditions': [

Просмотреть файл

@ -71,7 +71,7 @@ if (!is_win) {
#
# Base compiler configuration.
#
# See also "runtime_library" below for related stuff and a discusison about
# See also "runtime_library" below for related stuff and a discussion about
# where stuff should go. Put warning related stuff in the "warnings" config.
config("compiler") {
@ -385,6 +385,13 @@ config("compiler") {
#"-Wl,--threads",
#"-Wl,--thread-count=4",
]
# TODO(thestig): Make this flag work with GN.
#if (!is_chromeos && !(is_asan || is_lsan || is_tsan || is_msan)) {
# ldflags += [
# "-Wl,--detect-odr-violations",
# ]
#}
}
if (linux_use_bundled_binutils) {