[sdk] Verify that C/C++ libraries abide by -Wnewline-eof.

Bug: DX-1289 #done
Bug: DX-1535 #done
Change-Id: I02929655a0cc4a93acf087fb82413d8dc2122269
diff --git a/scripts/sdk/bazel/templates/crosstool_in.mako b/scripts/sdk/bazel/templates/crosstool_in.mako
index 9f7a17a..b828b55 100644
--- a/scripts/sdk/bazel/templates/crosstool_in.mako
+++ b/scripts/sdk/bazel/templates/crosstool_in.mako
@@ -92,6 +92,7 @@
         flag: "-Wall"
         flag: "-Werror"
         flag: "-Wextra-semi"
+        flag: "-Wnewline-eof"
         flag: "-Wshadow"
       }
     }
diff --git a/sdk/docs/compilation.md b/sdk/docs/compilation.md
index ab3c2be..dcf9c71 100644
--- a/sdk/docs/compilation.md
+++ b/sdk/docs/compilation.md
@@ -29,7 +29,9 @@
 ### Warning flags
 
 The following flags are guaranteed to not generate any warning:
-- `-Wsemi-extra`
+- `-Wall`
+- `-Wextra-semi`
+- `-Wnewline-eof`
 - `-Wshadow`
 
 The following flags may generate warnings: