[layers] Statically link c++ stdlib into core layers

Some layers wish to internally use parts of the C++ standard library,
but this shouldn't be exposed to users of the layer. This statically
links in the parts of the library that each layer needs into the shared
library statically.

This increases the .text segment of libVkLayer_core_validation.so by
about 55kb (50%) in a release x64 build, from 990336 bytes to 1541277
bytes.

MA-475 #comment

Change-Id: Ibb6337673d1be889dbb37af584b915f2724ef487
diff --git a/layers/BUILD.gn b/layers/BUILD.gn
index f3b3e40..7adbee4 100644
--- a/layers/BUILD.gn
+++ b/layers/BUILD.gn
@@ -66,8 +66,16 @@
   ]
 }
 
+config("static_stdlib") {
+  visibility = [ ":layer_common" ]
+  ldflags = [ "-static-libstdc++" ]
+}
+
 source_set("layer_common") {
-  public_configs = [ ":layer_include_config" ]
+  public_configs = [
+    ":layer_include_config",
+    ":static_stdlib",
+  ]
   sources = [
     "vk_layer_config.cpp",
     "vk_layer_extension_utils.cpp",