Repair Linux-with-sysroot build after clang update Clang switched to libc++ by default (apparently?) so force back to libstdc++ and libgcc_s when building in the limited-minspec-sysroot environment, as is done on Linux bots. Carefully selected artisinal flags from https://clang.llvm.org/docs/Toolchain.html. Bug: crashpad:30 Change-Id: I2f4251853199e5b0c6950c288aac5e2947ad5c9c Reviewed-on: https://chromium-review.googlesource.com/996452 Reviewed-by: Mark Mentovai <mark@chromium.org>
diff --git a/build/BUILD.gn b/build/BUILD.gn index 0d75fc5..e9ff6ee 100644 --- a/build/BUILD.gn +++ b/build/BUILD.gn
@@ -166,7 +166,12 @@ # against a local copy of libc++ instead. As this build file only affects # the standalone Crashpad build, when this flag is set link libstdc++ # statically to avoid the problem on the bots. - ldflags += [ "-static-libstdc++" ] + cflags += [ "-stdlib=libstdc++" ] + ldflags += [ + "-rtlib=libgcc", + "-static-libstdc++", + "-stdlib=libstdc++", + ] } }