From 0ecee00696695e8ca3b6b2000bb5dc39aefdc261 Mon Sep 17 00:00:00 2001 From: Todd Volkert Date: Sat, 6 Feb 2016 15:55:48 -0800 Subject: [PATCH] Fix sky_snapshot build to only link libgcc_s if on Linux --- sky/tools/sky_snapshot/BUILD.gn | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/sky/tools/sky_snapshot/BUILD.gn b/sky/tools/sky_snapshot/BUILD.gn index 37af75ea8d2..81d20a68f62 100644 --- a/sky/tools/sky_snapshot/BUILD.gn +++ b/sky/tools/sky_snapshot/BUILD.gn @@ -24,11 +24,13 @@ executable("sky_snapshot") { "//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", - ] + if (!is_ios && !is_mac) { + 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", + ] + } }