diff --git a/engine/src/flutter/sky/tools/sky_snapshot/BUILD.gn b/engine/src/flutter/sky/tools/sky_snapshot/BUILD.gn index 7cd6974270..37af75ea8d 100644 --- a/engine/src/flutter/sky/tools/sky_snapshot/BUILD.gn +++ b/engine/src/flutter/sky/tools/sky_snapshot/BUILD.gn @@ -23,4 +23,12 @@ executable("sky_snapshot") { "//sky/engine/bindings:snapshot_cc", "//third_party/zlib", ] + + ldflags = [ + # libgcc_s is not a DT_NEEDED library; it normally gets loaded implicitly. + # This flag ensures that rpath is referenced when searching for + # the so, which in turn gets the resulting sky_snapshot binary + # closer to being able to run in Google's production environment. + "-lgcc_s", + ] }