--- ./build/config/linux/BUILD.gn.orig +++ ./build/config/linux/BUILD.gn @@ -13,14 +13,9 @@ ldflags += [ "-Wl,--exclude-libs=libc++.a" ] } - # Explicitly use static linking for libstdc++ and libgcc to minimize - # dependencies. - if (!use_flutter_cxx) { - ldflags += [ - "-static-libgcc", - "-static-libstdc++", - ] - } + ldflags += [ "-L/lib", "-fuse-ld=lld" ] + ldflags += string_split(getenv("LDFLAGS"), " ") + cflags += string_split(getenv("CFLAGS"), " ") if (sysroot != "") { cflags += [ "--sysroot=" + sysroot ]