sw/vec_iree: Add GCC compilation options in sparrow_ops.cmake

Add GCC compilation options at sparrow_ops.cmake, which is needed for
compiling targets in vec_iree and ml_models.

We still need C_NO_WARNING_FLAGS at riscv_iree_gcc.cmake for now, which
controls compilation of IREE. In future we may propose PR to move these flags to IREE code base.

Change-Id: I966a99a7525616bbf6d06d7e538d57f2d57350c8
diff --git a/cmake/riscv_iree_gcc.cmake b/cmake/riscv_iree_gcc.cmake
index ef219e6..39716ea 100644
--- a/cmake/riscv_iree_gcc.cmake
+++ b/cmake/riscv_iree_gcc.cmake
@@ -53,7 +53,7 @@
   "-L${RISCV_TOOLCHAIN_ROOT}/riscv32-unknown-elf/lib/newlib-nano/ -specs=nano.specs"
 )
 
-# TODO(lundong): Move no_warning_flags to sparrow_ops.cmake
+# TODO(lundong): Move no_warning_flags to IREE code base
 set(C_NO_WARNING_FLAGS "-Wno-char-subscripts -Wno-format -Wno-incompatible-pointer-types -Wno-int-to-pointer-cast -Wstrict-aliasing=0 -Wno-pointer-to-int-cast")
 
 set(CMAKE_C_FLAGS             "${RISCV_COMPILER_FLAGS} ${CMAKE_C_FLAGS} ${C_NO_WARNING_FLAGS}")
diff --git a/cmake/sparrow_ops.cmake b/cmake/sparrow_ops.cmake
index 7456694..23a7359 100644
--- a/cmake/sparrow_ops.cmake
+++ b/cmake/sparrow_ops.cmake
@@ -74,6 +74,14 @@
   "-Wthread-safety-beta"
   "-Wunused-comparison"
   "-Wvla"
+
+  # GCC diagnostics.
+  GCC
+  "-Werror"
+  "-Wall"
+  # Disable warnings we don't care about or that generally have a low
+  # signal/noise ratio.
+  "-Wno-missing-braces"
 )