From 2afe1ab04b135835bca247289e6f95585bf36f9a Mon Sep 17 00:00:00 2001 From: Dionna Glaze Date: Mon, 10 Dec 2018 14:41:20 -0800 Subject: [PATCH] Add Asylo platform support. This patch enables the open source portable enclave framework [Asylo](https://github.com/google/asylo) to use gRPC within its toolchain. The Asylo EKEP handshaker does its own end-to-end testing by reusing gRPC's own end2end testing targets. To do so, it requires those targets to be visible. Signed-off-by: Dionna Amalie Glaze --- include/grpc/impl/codegen/port_platform.h | 20 ++++++++++++++++++++ test/core/end2end/generate_tests.bzl | 1 + 2 files changed, 21 insertions(+) diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index d7294d59d41..69193fc45ad 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -186,6 +186,26 @@ #else /* musl libc */ #define GPR_MUSL_LIBC_COMPAT 1 #endif +#elif defined(__ASYLO__) +#define GPR_ARCH_64 1 +#define GPR_CPU_POSIX 1 +#define GPR_GCC_TLS 1 +#define GPR_PLATFORM_STRING "asylo" +#define GPR_GCC_SYNC 1 +#define GPR_POSIX_SYNC 1 +#define GPR_POSIX_STRING 1 +#define GPR_POSIX_LOG 1 +#define GPR_POSIX_TIME 1 +#define GPR_POSIX_ENV 1 +#define GPR_ASYLO 1 +#define GRPC_POSIX_SOCKET 1 +#define GRPC_POSIX_SOCKETADDR +#define GRPC_POSIX_SOCKETUTILS 1 +#define GRPC_TIMER_USE_GENERIC 1 +#define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1 +#define GRPC_POSIX_WAKEUP_FD 1 +#define GRPC_ARES 0 +#define GPR_NO_AUTODETECT_PLATFORM 1 #elif defined(__APPLE__) #include #include diff --git a/test/core/end2end/generate_tests.bzl b/test/core/end2end/generate_tests.bzl index 85faca16364..453c973fbc2 100755 --- a/test/core/end2end/generate_tests.bzl +++ b/test/core/end2end/generate_tests.bzl @@ -380,6 +380,7 @@ def grpc_end2end_tests(): "end2end_tests.h", ], language = "C++", + visibility = ["//visibility:public"], deps = [ ":cq_verifier", ":ssl_test_data",