Skip to content

Commit d2dc053

Browse files
sjindel-googlecommit-bot@chromium.org
authored andcommitted
Corrections to "[vm] Fix ASAN build."
Change-Id: I83c78b18e25847edb6c8cc8256245667f1483619 Cq-Include-Trybots: luci.dart.try:vm-kernel-asan-linux-release-x64-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115711 Commit-Queue: Samir Jindel <[email protected]> Auto-Submit: Samir Jindel <[email protected]> Reviewed-by: Martin Kustermann <[email protected]>
1 parent 592914f commit d2dc053

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

build/config/linux/BUILD.gn

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

77
config("sdk") {
8-
ldflags = []
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+
]
917

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",
18+
if (is_asan) {
19+
ldflags += [
20+
"-lpthread",
21+
"-lrt",
1922
]
2023
}
2124

0 commit comments

Comments
 (0)