mirror of
https://github.com/dart-lang/sdk
synced 2024-10-06 12:57:42 +00:00
[vm/linux] Don't expose symbols from statically-linked libc++.
Issue https://github.com/dart-lang/sdk/issues/38141 On Windows and OSX, we dynamically link against libc++, so there is no issue. On Android we already hide symbols from libc++. Change-Id: I17debc4d0efec3cebc203672333afb44390b0e0b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115403 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Samir Jindel <sjindel@google.com>
This commit is contained in:
parent
ec6c6542a2
commit
be66176534
|
@ -247,8 +247,6 @@ config("compiler") {
|
|||
# Linux-specific compiler flags setup.
|
||||
# ------------------------------------
|
||||
if (is_linux) {
|
||||
cflags += [ "-pthread" ]
|
||||
ldflags += [ "-pthread" ]
|
||||
if (is_clang) {
|
||||
if (current_cpu == "arm") {
|
||||
cflags += [ "--target=armv7-linux-gnueabihf" ]
|
||||
|
|
|
@ -5,9 +5,19 @@
|
|||
import("//build/config/sysroot.gni")
|
||||
|
||||
config("sdk") {
|
||||
# Don't allow visible symbols from libc++ to be re-exported.
|
||||
ldflags = [
|
||||
"-nodefaultlibs",
|
||||
"-lc++",
|
||||
"-lc",
|
||||
"-lm",
|
||||
"-lclang_rt.builtins",
|
||||
"-Wl,--exclude-libs=libc++.a",
|
||||
]
|
||||
|
||||
if (sysroot != "") {
|
||||
cflags = [ "--sysroot=" + sysroot ]
|
||||
ldflags = [ "--sysroot=" + sysroot ]
|
||||
ldflags += [ "--sysroot=" + sysroot ]
|
||||
|
||||
# Need to get some linker flags out of the sysroot.
|
||||
ldflags += [ exec_script("sysroot_ld_path.py",
|
||||
|
|
Loading…
Reference in a new issue