Add ChromeOS EC related targets

ChromeOS EC and ChromeOS Zephyr EC are the open source software for
embedded controllers (EC) used in recent ARM and x86 based Chromebooks.

https://chromium.googlesource.com/chromiumos/platform/ec/+/HEAD/README.md
https://chromium.googlesource.com/chromiumos/platform/ec/+/HEAD/docs/zephyr/README.md

Bug: 629
Change-Id: If07bd77135fc28f5321643c568784c05bbe390f4
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/61865
Reviewed-by: Bob Beck <bbe@google.com>
Commit-Queue: Bob Beck <bbe@google.com>
diff --git a/include/openssl/target.h b/include/openssl/target.h
index f830c14..53d7f15 100644
--- a/include/openssl/target.h
+++ b/include/openssl/target.h
@@ -117,6 +117,30 @@
 #define OPENSSL_NO_THREADS_CORRUPT_MEMORY_AND_LEAK_SECRETS_IF_THREADED
 #endif
 
+// CROS_EC is an embedded target for ChromeOS Embedded Controller. Defining
+// this on any other platform is not supported. Other embedded platforms must
+// introduce their own defines.
+//
+// https://chromium.googlesource.com/chromiumos/platform/ec/+/HEAD/README.md
+#if defined(CROS_EC)
+#define OPENSSL_NO_FILESYSTEM
+#define OPENSSL_NO_POSIX_IO
+#define OPENSSL_NO_SOCK
+#define OPENSSL_NO_THREADS_CORRUPT_MEMORY_AND_LEAK_SECRETS_IF_THREADED
+#endif
+
+// CROS_ZEPHYR is an embedded target for ChromeOS Zephyr Embedded Controller.
+// Defining this on any other platform is not supported. Other embedded
+// platforms must introduce their own defines.
+//
+// https://chromium.googlesource.com/chromiumos/platform/ec/+/HEAD/docs/zephyr/README.md
+#if defined(CROS_ZEPHYR)
+#define OPENSSL_NO_FILESYSTEM
+#define OPENSSL_NO_POSIX_IO
+#define OPENSSL_NO_SOCK
+#define OPENSSL_NO_THREADS_CORRUPT_MEMORY_AND_LEAK_SECRETS_IF_THREADED
+#endif
+
 #if defined(__ANDROID_API__)
 #define OPENSSL_ANDROID
 #endif