From 7f6bb962eb3dec45bf3ebd0d2b797942d74fba91 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Fri, 13 Apr 2018 17:30:17 -0400 Subject: [PATCH] Linux: Fix ASAN link error: odr-violation: global 'typeinfo name for std::exception' (see https://crbug.com/832808) --- BUILD.gn | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index a6b3513b6..3cf62ac79 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1443,6 +1443,7 @@ if (is_mac) { deps = [ ":libcef_static", + "//build/config:exe_and_shlib_deps", ] if (is_win) { @@ -1463,9 +1464,12 @@ if (is_mac) { ] } - if (is_linux && !is_debug && !using_sanitizer && use_allocator=="none") { + if (is_linux && !is_debug && use_allocator=="none") { # Only export necessary symbols from libcef.so. - # Don't do this in Debug builds because it causes the resulting application to crash. + # Don't do this in Debug builds because it causes the resulting + # application to crash. + # Also need to do this for ASAN builds to work around + # https://crbug.com/832808. ldflags = [ "-Wl,--version-script=" + rebase_path("//cef/libcef_dll/libcef.lst") ] }