Skip to content

Commit 75374b8

Browse files
[vm] Fix ASAN build.
Change-Id: I6e5c40412493933a0a21f4df880f367840fd68cf Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115710 Reviewed-by: Samir Jindel <[email protected]>
1 parent 8ee3f31 commit 75374b8

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

build/config/linux/BUILD.gn

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,19 @@
55
import("//build/config/sysroot.gni")
66

77
config("sdk") {
8-
# Don't allow visible symbols from libc++ to be re-exported.
9-
ldflags = [
10-
"-nodefaultlibs",
11-
"-lc++",
12-
"-lc",
13-
"-lm",
14-
"-lclang_rt.builtins",
15-
"-Wl,--exclude-libs=libc++.a",
16-
]
8+
ldflags = []
9+
10+
if (!is_asan) {
11+
# Don't allow visible symbols from libc++ to be re-exported.
12+
ldflags = [
13+
"-nodefaultlibs",
14+
"-lc++",
15+
"-lc",
16+
"-lm",
17+
"-lclang_rt.builtins",
18+
"-Wl,--exclude-libs=libc++.a",
19+
]
20+
}
1721

1822
if (sysroot != "") {
1923
cflags = [ "--sysroot=" + sysroot ]

0 commit comments

Comments
 (0)