-
Notifications
You must be signed in to change notification settings - Fork 0
/
0001-Get-GRPC-to-build.patch
1070 lines (1040 loc) · 40.5 KB
/
0001-Get-GRPC-to-build.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
From da583884cbde6aa1793ebda92fca2ded679461ea Mon Sep 17 00:00:00 2001
From: radhikaj <[email protected]>
Date: Tue, 25 Jun 2019 22:11:16 +0000
Subject: [PATCH] Get GRPC to build
Build grpc in debug mode and turn on some options and gettid returns 0
---
CMakeLists.txt | 811 ++++++++++++++++++++++++++----
Makefile | 5 +-
examples/cpp/helloworld/Makefile | 10 +-
include/grpc/impl/codegen/port_platform.h | 5 +-
src/core/lib/gpr/log_linux.cc | 12 +-
src/core/lib/gpr/log_posix.cc | 6 +-
src/core/lib/iomgr/ev_epollex_linux.cc | 4 +-
7 files changed, 740 insertions(+), 113 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dc8a5a7..5af85e8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,6 +50,17 @@ endif()
set(gRPC_INSTALL ${gRPC_INSTALL_default} CACHE BOOL
"Generate installation target: gRPC_ZLIB_PROVIDER, gRPC_CARES_PROVIDER, gRPC_SSL_PROVIDER and gRPC_PROTOBUF_PROVIDER must all be \"package\"")
+
+if (NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type" FORCE)
+endif ()
+set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug;Release;RelWithDebInfo")
+
+string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_SUFFIX)
+if (NOT DEFINED CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE_SUFFIX})
+ message(FATAL_ERROR "Unknown CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
+endif ()
+
# Providers for third-party dependencies (gRPC_*_PROVIDER properties):
# "module": build the dependency using sources from git submodule (under third_party)
# "package": use cmake's find_package functionality to locate a pre-installed dependency
@@ -791,6 +802,57 @@ if (gRPC_INSTALL)
)
endif()
+
+add_library(address_sorting_oe_enclave
+ third_party/address_sorting/address_sorting.c
+ third_party/address_sorting/address_sorting_posix.c
+ third_party/address_sorting/address_sorting_windows.c
+)
+
+if(WIN32 AND MSVC)
+ set_target_properties(address_sorting_oe_enclave PROPERTIES COMPILE_PDB_NAME "address_sorting_oe_enclave"
+ COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
+ )
+ if (gRPC_INSTALL)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/address_sorting_oe_enclave.pdb
+ DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
+ )
+ endif()
+endif()
+
+
+target_include_directories(address_sorting_oe_enclave
+ PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
+ PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
+ PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
+ PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
+ PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
+ PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
+ PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
+ PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
+ PRIVATE ${_gRPC_NANOPB_INCLUDE_DIR}
+)
+ # avoid dependency on libstdc++
+ if (_gRPC_CORE_NOSTDCXX_FLAGS)
+ set_target_properties(address_sorting PROPERTIES LINKER_LANGUAGE C)
+ # only use the flags for C++ source files
+ target_compile_options(address_sorting_oe_enclave PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${_gRPC_CORE_NOSTDCXX_FLAGS}>)
+ endif()
+target_link_libraries(address_sorting_oe_enclave
+ openenclave::oeenclave
+ openenclave::libcxx
+)
+
+
+
+if (gRPC_INSTALL)
+ install(TARGETS address_sorting_oe_enclave EXPORT gRPCTargets
+ RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
+ )
+endif()
if (gRPC_BUILD_TESTS)
add_library(alts_test_util
@@ -968,6 +1030,136 @@ if (gRPC_INSTALL)
)
endif()
+add_library(gpr_oe_enclave
+ src/core/lib/gpr/alloc.cc
+ src/core/lib/gpr/atm.cc
+ src/core/lib/gpr/cpu_iphone.cc
+ src/core/lib/gpr/cpu_linux.cc
+ src/core/lib/gpr/cpu_posix.cc
+ src/core/lib/gpr/cpu_windows.cc
+ src/core/lib/gpr/env_linux.cc
+ src/core/lib/gpr/env_posix.cc
+ src/core/lib/gpr/env_windows.cc
+ src/core/lib/gpr/host_port.cc
+ src/core/lib/gpr/log.cc
+ src/core/lib/gpr/log_android.cc
+ src/core/lib/gpr/log_linux.cc
+ src/core/lib/gpr/log_posix.cc
+ src/core/lib/gpr/log_windows.cc
+ src/core/lib/gpr/mpscq.cc
+ src/core/lib/gpr/murmur_hash.cc
+ src/core/lib/gpr/string.cc
+ src/core/lib/gpr/string_posix.cc
+ src/core/lib/gpr/string_util_windows.cc
+ src/core/lib/gpr/string_windows.cc
+ src/core/lib/gpr/sync.cc
+ src/core/lib/gpr/sync_posix.cc
+ src/core/lib/gpr/sync_windows.cc
+ src/core/lib/gpr/time.cc
+ src/core/lib/gpr/time_posix.cc
+ src/core/lib/gpr/time_precise.cc
+ src/core/lib/gpr/time_windows.cc
+ src/core/lib/gpr/tls_pthread.cc
+ src/core/lib/gpr/tmpfile_msys.cc
+ src/core/lib/gpr/tmpfile_posix.cc
+ src/core/lib/gpr/tmpfile_windows.cc
+ src/core/lib/gpr/wrap_memcpy.cc
+ src/core/lib/gprpp/arena.cc
+ src/core/lib/gprpp/fork.cc
+ src/core/lib/gprpp/thd_posix.cc
+ src/core/lib/gprpp/thd_windows.cc
+ src/core/lib/profiling/basic_timers.cc
+ src/core/lib/profiling/stap_timers.cc
+)
+
+if(WIN32 AND MSVC)
+ set_target_properties(gpr_oe_enclave PROPERTIES COMPILE_PDB_NAME "gpr_oe_enclave"
+ COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
+ )
+ if (gRPC_INSTALL)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gpr_oe_enclave.pdb
+ DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
+ )
+ endif()
+endif()
+
+find_package(OpenEnclave CONFIG REQUIRED)
+
+target_include_directories(gpr_oe_enclave
+ PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
+ PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
+ PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
+ PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
+ PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
+ PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
+ PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
+ PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
+ PRIVATE ${_gRPC_NANOPB_INCLUDE_DIR}
+)
+ # avoid dependency on libstdc++
+ if (_gRPC_CORE_NOSTDCXX_FLAGS)
+ set_target_properties(gpr_oe_enclave PROPERTIES LINKER_LANGUAGE C)
+ # only use the flags for C++ source files
+ target_compile_options(gpr_oe_enclave PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${_gRPC_CORE_NOSTDCXX_FLAGS}>)
+ endif()
+target_link_libraries(gpr_oe_enclave
+# ${_gRPC_ALLTARGETS_LIBRARIES}
+ PUBLIC
+ openenclave::oeenclave
+ openenclave::oelibcxx
+
+)
+
+
+foreach(_hdr
+ include/grpc/support/alloc.h
+ include/grpc/support/atm.h
+ include/grpc/support/atm_gcc_atomic.h
+ include/grpc/support/atm_gcc_sync.h
+ include/grpc/support/atm_windows.h
+ include/grpc/support/cpu.h
+ include/grpc/support/log.h
+ include/grpc/support/log_windows.h
+ include/grpc/support/port_platform.h
+ include/grpc/support/string_util.h
+ include/grpc/support/sync.h
+ include/grpc/support/sync_custom.h
+ include/grpc/support/sync_generic.h
+ include/grpc/support/sync_posix.h
+ include/grpc/support/sync_windows.h
+ include/grpc/support/thd_id.h
+ include/grpc/support/time.h
+ include/grpc/impl/codegen/atm.h
+ include/grpc/impl/codegen/atm_gcc_atomic.h
+ include/grpc/impl/codegen/atm_gcc_sync.h
+ include/grpc/impl/codegen/atm_windows.h
+ include/grpc/impl/codegen/fork.h
+ include/grpc/impl/codegen/gpr_slice.h
+ include/grpc/impl/codegen/gpr_types.h
+ include/grpc/impl/codegen/log.h
+ include/grpc/impl/codegen/port_platform.h
+ include/grpc/impl/codegen/sync.h
+ include/grpc/impl/codegen/sync_custom.h
+ include/grpc/impl/codegen/sync_generic.h
+ include/grpc/impl/codegen/sync_posix.h
+ include/grpc/impl/codegen/sync_windows.h
+)
+ string(REPLACE "include/" "" _path ${_hdr})
+ get_filename_component(_path ${_path} PATH)
+ install(FILES ${_hdr}
+ DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
+ )
+endforeach()
+
+
+if (gRPC_INSTALL)
+ install(TARGETS gpr EXPORT gRPCTargets
+ RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
+ )
+endif()
add_library(grpc
src/core/lib/surface/init.cc
@@ -2655,14 +2847,14 @@ add_library(grpc_unsecure
third_party/nanopb/pb_encode.c
src/core/ext/transport/inproc/inproc_plugin.cc
src/core/ext/transport/inproc/inproc_transport.cc
- src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc
+# src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
+# src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc
+# src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc
+# src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc
+# src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
+# src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc
+# src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc
+# src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc
src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc
src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc
src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
@@ -2781,92 +2973,444 @@ if (gRPC_INSTALL)
)
endif()
-if (gRPC_BUILD_TESTS)
-
-add_library(reconnect_server
- test/core/util/reconnect_server.cc
-)
-
-if(WIN32 AND MSVC)
- set_target_properties(reconnect_server PROPERTIES COMPILE_PDB_NAME "reconnect_server"
- COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
- )
- if (gRPC_INSTALL)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/reconnect_server.pdb
- DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
- )
- endif()
-endif()
-
-
-target_include_directories(reconnect_server
- PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
- PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
- PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
- PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
- PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
- PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
- PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
- PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
- PRIVATE ${_gRPC_NANOPB_INCLUDE_DIR}
-)
- # avoid dependency on libstdc++
- if (_gRPC_CORE_NOSTDCXX_FLAGS)
- set_target_properties(reconnect_server PROPERTIES LINKER_LANGUAGE C)
- # only use the flags for C++ source files
- target_compile_options(reconnect_server PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${_gRPC_CORE_NOSTDCXX_FLAGS}>)
- endif()
-target_link_libraries(reconnect_server
- ${_gRPC_ALLTARGETS_LIBRARIES}
- test_tcp_server
- grpc_test_util
- grpc
- gpr
-)
-
-
-endif (gRPC_BUILD_TESTS)
-if (gRPC_BUILD_TESTS)
-
-add_library(test_tcp_server
- test/core/util/test_tcp_server.cc
-)
-
-if(WIN32 AND MSVC)
- set_target_properties(test_tcp_server PROPERTIES COMPILE_PDB_NAME "test_tcp_server"
- COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
- )
- if (gRPC_INSTALL)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/test_tcp_server.pdb
- DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
- )
- endif()
-endif()
-
-target_include_directories(test_tcp_server
- PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
- PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
- PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
- PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
- PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
- PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
- PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
- PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
- PRIVATE ${_gRPC_NANOPB_INCLUDE_DIR}
-)
- # avoid dependency on libstdc++
- if (_gRPC_CORE_NOSTDCXX_FLAGS)
- set_target_properties(test_tcp_server PROPERTIES LINKER_LANGUAGE C)
- # only use the flags for C++ source files
- target_compile_options(test_tcp_server PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${_gRPC_CORE_NOSTDCXX_FLAGS}>)
- endif()
-target_link_libraries(test_tcp_server
- ${_gRPC_ALLTARGETS_LIBRARIES}
- grpc_test_util
- grpc
+add_library(grpc_unsecure_oe_enclave
+ src/core/lib/surface/init.cc
+ src/core/lib/surface/init_unsecure.cc
+ src/core/lib/avl/avl.cc
+ src/core/lib/backoff/backoff.cc
+ src/core/lib/channel/channel_args.cc
+ src/core/lib/channel/channel_stack.cc
+ src/core/lib/channel/channel_stack_builder.cc
+ src/core/lib/channel/channel_trace.cc
+ src/core/lib/channel/channelz.cc
+ src/core/lib/channel/channelz_registry.cc
+ src/core/lib/channel/connected_channel.cc
+ src/core/lib/channel/handshaker.cc
+ src/core/lib/channel/handshaker_registry.cc
+ src/core/lib/channel/status_util.cc
+ src/core/lib/compression/compression.cc
+ src/core/lib/compression/compression_args.cc
+ src/core/lib/compression/compression_internal.cc
+ src/core/lib/compression/message_compress.cc
+ src/core/lib/compression/stream_compression.cc
+ src/core/lib/compression/stream_compression_gzip.cc
+ src/core/lib/compression/stream_compression_identity.cc
+ src/core/lib/debug/stats.cc
+ src/core/lib/debug/stats_data.cc
+ src/core/lib/http/format_request.cc
+ src/core/lib/http/httpcli.cc
+ src/core/lib/http/parser.cc
+ src/core/lib/iomgr/buffer_list.cc
+ src/core/lib/iomgr/call_combiner.cc
+ src/core/lib/iomgr/combiner.cc
+ src/core/lib/iomgr/endpoint.cc
+ src/core/lib/iomgr/endpoint_pair_posix.cc
+ src/core/lib/iomgr/endpoint_pair_uv.cc
+ src/core/lib/iomgr/endpoint_pair_windows.cc
+ src/core/lib/iomgr/error.cc
+ src/core/lib/iomgr/ev_epoll1_linux.cc
+ src/core/lib/iomgr/ev_epollex_linux.cc
+ src/core/lib/iomgr/ev_poll_posix.cc
+ src/core/lib/iomgr/ev_posix.cc
+ src/core/lib/iomgr/ev_windows.cc
+ src/core/lib/iomgr/exec_ctx.cc
+ src/core/lib/iomgr/executor.cc
+ src/core/lib/iomgr/fork_posix.cc
+ src/core/lib/iomgr/fork_windows.cc
+ src/core/lib/iomgr/gethostname_fallback.cc
+ src/core/lib/iomgr/gethostname_host_name_max.cc
+ src/core/lib/iomgr/gethostname_sysconf.cc
+ src/core/lib/iomgr/grpc_if_nametoindex_posix.cc
+ src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc
+ src/core/lib/iomgr/internal_errqueue.cc
+ src/core/lib/iomgr/iocp_windows.cc
+ src/core/lib/iomgr/iomgr.cc
+ src/core/lib/iomgr/iomgr_custom.cc
+ src/core/lib/iomgr/iomgr_internal.cc
+ src/core/lib/iomgr/iomgr_posix.cc
+ src/core/lib/iomgr/iomgr_uv.cc
+ src/core/lib/iomgr/iomgr_windows.cc
+ src/core/lib/iomgr/is_epollexclusive_available.cc
+ src/core/lib/iomgr/load_file.cc
+ src/core/lib/iomgr/lockfree_event.cc
+ src/core/lib/iomgr/polling_entity.cc
+ src/core/lib/iomgr/pollset.cc
+ src/core/lib/iomgr/pollset_custom.cc
+ src/core/lib/iomgr/pollset_set.cc
+ src/core/lib/iomgr/pollset_set_custom.cc
+ src/core/lib/iomgr/pollset_set_windows.cc
+ src/core/lib/iomgr/pollset_uv.cc
+ src/core/lib/iomgr/pollset_windows.cc
+ src/core/lib/iomgr/resolve_address.cc
+ src/core/lib/iomgr/resolve_address_custom.cc
+ src/core/lib/iomgr/resolve_address_posix.cc
+ src/core/lib/iomgr/resolve_address_windows.cc
+ src/core/lib/iomgr/resource_quota.cc
+ src/core/lib/iomgr/sockaddr_utils.cc
+ src/core/lib/iomgr/socket_factory_posix.cc
+ src/core/lib/iomgr/socket_mutator.cc
+ src/core/lib/iomgr/socket_utils_common_posix.cc
+ src/core/lib/iomgr/socket_utils_linux.cc
+ src/core/lib/iomgr/socket_utils_posix.cc
+ src/core/lib/iomgr/socket_utils_uv.cc
+ src/core/lib/iomgr/socket_utils_windows.cc
+ src/core/lib/iomgr/socket_windows.cc
+ src/core/lib/iomgr/tcp_client.cc
+ src/core/lib/iomgr/tcp_client_custom.cc
+ src/core/lib/iomgr/tcp_client_posix.cc
+ src/core/lib/iomgr/tcp_client_windows.cc
+ src/core/lib/iomgr/tcp_custom.cc
+ src/core/lib/iomgr/tcp_posix.cc
+ src/core/lib/iomgr/tcp_server.cc
+ src/core/lib/iomgr/tcp_server_custom.cc
+ src/core/lib/iomgr/tcp_server_posix.cc
+ src/core/lib/iomgr/tcp_server_utils_posix_common.cc
+ src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc
+ src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc
+ src/core/lib/iomgr/tcp_server_windows.cc
+ src/core/lib/iomgr/tcp_uv.cc
+ src/core/lib/iomgr/tcp_windows.cc
+ src/core/lib/iomgr/time_averaged_stats.cc
+ src/core/lib/iomgr/timer.cc
+ src/core/lib/iomgr/timer_custom.cc
+ src/core/lib/iomgr/timer_generic.cc
+ src/core/lib/iomgr/timer_heap.cc
+ src/core/lib/iomgr/timer_manager.cc
+ src/core/lib/iomgr/timer_uv.cc
+ src/core/lib/iomgr/udp_server.cc
+ src/core/lib/iomgr/unix_sockets_posix.cc
+ src/core/lib/iomgr/unix_sockets_posix_noop.cc
+ src/core/lib/iomgr/wakeup_fd_eventfd.cc
+ src/core/lib/iomgr/wakeup_fd_nospecial.cc
+ src/core/lib/iomgr/wakeup_fd_pipe.cc
+ src/core/lib/iomgr/wakeup_fd_posix.cc
+ src/core/lib/json/json.cc
+ src/core/lib/json/json_reader.cc
+ src/core/lib/json/json_string.cc
+ src/core/lib/json/json_writer.cc
+ src/core/lib/slice/b64.cc
+ src/core/lib/slice/percent_encoding.cc
+ src/core/lib/slice/slice.cc
+ src/core/lib/slice/slice_buffer.cc
+ src/core/lib/slice/slice_intern.cc
+ src/core/lib/slice/slice_string_helpers.cc
+ src/core/lib/surface/api_trace.cc
+ src/core/lib/surface/byte_buffer.cc
+ src/core/lib/surface/byte_buffer_reader.cc
+ src/core/lib/surface/call.cc
+ src/core/lib/surface/call_details.cc
+ src/core/lib/surface/call_log_batch.cc
+ src/core/lib/surface/channel.cc
+ src/core/lib/surface/channel_init.cc
+ src/core/lib/surface/channel_ping.cc
+ src/core/lib/surface/channel_stack_type.cc
+ src/core/lib/surface/completion_queue.cc
+ src/core/lib/surface/completion_queue_factory.cc
+ src/core/lib/surface/event_string.cc
+ src/core/lib/surface/lame_client.cc
+ src/core/lib/surface/metadata_array.cc
+ src/core/lib/surface/server.cc
+ src/core/lib/surface/validate_metadata.cc
+ src/core/lib/surface/version.cc
+ src/core/lib/transport/bdp_estimator.cc
+ src/core/lib/transport/byte_stream.cc
+ src/core/lib/transport/connectivity_state.cc
+ src/core/lib/transport/error_utils.cc
+ src/core/lib/transport/metadata.cc
+ src/core/lib/transport/metadata_batch.cc
+ src/core/lib/transport/pid_controller.cc
+ src/core/lib/transport/static_metadata.cc
+ src/core/lib/transport/status_conversion.cc
+ src/core/lib/transport/status_metadata.cc
+ src/core/lib/transport/timeout_encoding.cc
+ src/core/lib/transport/transport.cc
+ src/core/lib/transport/transport_op_string.cc
+ src/core/lib/uri/uri_parser.cc
+ src/core/lib/debug/trace.cc
+ src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc
+ src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc
+ src/core/ext/transport/chttp2/transport/bin_decoder.cc
+ src/core/ext/transport/chttp2/transport/bin_encoder.cc
+ src/core/ext/transport/chttp2/transport/chttp2_plugin.cc
+ src/core/ext/transport/chttp2/transport/chttp2_transport.cc
+ src/core/ext/transport/chttp2/transport/context_list.cc
+ src/core/ext/transport/chttp2/transport/flow_control.cc
+ src/core/ext/transport/chttp2/transport/frame_data.cc
+ src/core/ext/transport/chttp2/transport/frame_goaway.cc
+ src/core/ext/transport/chttp2/transport/frame_ping.cc
+ src/core/ext/transport/chttp2/transport/frame_rst_stream.cc
+ src/core/ext/transport/chttp2/transport/frame_settings.cc
+ src/core/ext/transport/chttp2/transport/frame_window_update.cc
+ src/core/ext/transport/chttp2/transport/hpack_encoder.cc
+ src/core/ext/transport/chttp2/transport/hpack_parser.cc
+ src/core/ext/transport/chttp2/transport/hpack_table.cc
+ src/core/ext/transport/chttp2/transport/http2_settings.cc
+ src/core/ext/transport/chttp2/transport/huffsyms.cc
+ src/core/ext/transport/chttp2/transport/incoming_metadata.cc
+ src/core/ext/transport/chttp2/transport/parsing.cc
+ src/core/ext/transport/chttp2/transport/stream_lists.cc
+ src/core/ext/transport/chttp2/transport/stream_map.cc
+ src/core/ext/transport/chttp2/transport/varint.cc
+ src/core/ext/transport/chttp2/transport/writing.cc
+ src/core/ext/transport/chttp2/alpn/alpn.cc
+ src/core/ext/filters/http/client/http_client_filter.cc
+ src/core/ext/filters/http/http_filters_plugin.cc
+ src/core/ext/filters/http/message_compress/message_compress_filter.cc
+ src/core/ext/filters/http/server/http_server_filter.cc
+ src/core/ext/transport/chttp2/server/chttp2_server.cc
+ src/core/ext/transport/chttp2/client/insecure/channel_create.cc
+ src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc
+ src/core/ext/transport/chttp2/client/authority.cc
+ src/core/ext/transport/chttp2/client/chttp2_connector.cc
+ src/core/ext/filters/client_channel/backup_poller.cc
+ src/core/ext/filters/client_channel/channel_connectivity.cc
+ src/core/ext/filters/client_channel/client_channel.cc
+ src/core/ext/filters/client_channel/client_channel_channelz.cc
+ src/core/ext/filters/client_channel/client_channel_factory.cc
+ src/core/ext/filters/client_channel/client_channel_plugin.cc
+ src/core/ext/filters/client_channel/connector.cc
+ src/core/ext/filters/client_channel/global_subchannel_pool.cc
+ src/core/ext/filters/client_channel/health/health_check_client.cc
+ src/core/ext/filters/client_channel/http_connect_handshaker.cc
+ src/core/ext/filters/client_channel/http_proxy.cc
+ src/core/ext/filters/client_channel/lb_policy.cc
+ src/core/ext/filters/client_channel/lb_policy_registry.cc
+ src/core/ext/filters/client_channel/local_subchannel_pool.cc
+ src/core/ext/filters/client_channel/parse_address.cc
+ src/core/ext/filters/client_channel/proxy_mapper.cc
+ src/core/ext/filters/client_channel/proxy_mapper_registry.cc
+ src/core/ext/filters/client_channel/resolver.cc
+ src/core/ext/filters/client_channel/resolver_registry.cc
+ src/core/ext/filters/client_channel/resolver_result_parsing.cc
+ src/core/ext/filters/client_channel/resolving_lb_policy.cc
+ src/core/ext/filters/client_channel/retry_throttle.cc
+ src/core/ext/filters/client_channel/server_address.cc
+ src/core/ext/filters/client_channel/service_config.cc
+ src/core/ext/filters/client_channel/subchannel.cc
+ src/core/ext/filters/client_channel/subchannel_pool_interface.cc
+ src/core/ext/filters/deadline/deadline_filter.cc
+ src/core/ext/filters/client_channel/health/health.pb.c
+ third_party/nanopb/pb_common.c
+ third_party/nanopb/pb_decode.c
+ third_party/nanopb/pb_encode.c
+ src/core/ext/transport/inproc/inproc_plugin.cc
+ src/core/ext/transport/inproc/inproc_transport.cc
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc
+ src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc
+ src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc
+ src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
+ src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc
+ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
+ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc
+ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc
+ src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc
+ src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.c
+ src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.c
+ src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c
+ src/core/ext/filters/client_channel/lb_policy/xds/xds.cc
+ src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.cc
+ src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc
+ src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc
+ src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc
+ src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc
+ src/core/ext/filters/census/grpc_context.cc
+ src/core/ext/filters/max_age/max_age_filter.cc
+ src/core/ext/filters/message_size/message_size_filter.cc
+ src/core/ext/filters/http/client_authority_filter.cc
+ src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc
+ src/core/ext/filters/workarounds/workaround_utils.cc
+ src/core/plugin_registry/grpc_unsecure_plugin_registry.cc
+)
+
+if(WIN32 AND MSVC)
+ set_target_properties(grpc_unsecure_oe_enclave PROPERTIES COMPILE_PDB_NAME "grpc_unsecure_oe_enclave"
+ COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
+ )
+ if (gRPC_INSTALL)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_unsecure_oe_enclave.pdb
+ DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
+ )
+ endif()
+endif()
+
+
+target_include_directories(grpc_unsecure_oe_enclave
+ PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
+ PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
+ PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
+ PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
+ PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
+ PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
+ PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
+ PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
+ PRIVATE ${_gRPC_NANOPB_INCLUDE_DIR}
+)
+ # avoid dependency on libstdc++
+ #if (_gRPC_CORE_NOSTDCXX_FLAGS)
+ # set_target_properties(grpc_unsecure PROPERTIES LINKER_LANGUAGE C)
+ # target_compile_options(grpc_unsecure PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${_gRPC_CORE_NOSTDCXX_FLAGS}>)
+ #endif()
+target_link_libraries(grpc_unsecure_oe_enclave PUBLIC
+ ${_gRPC_BASELIB_LIBRARIES}
+ #${_gRPC_ZLIB_LIBRARIES}
+ #${_gRPC_CARES_LIBRARIES}
+ #${_gRPC_ADDRESS_SORTING_LIBRARIES}
+ #${_gRPC_ALLTARGETS_LIBRARIES}
+ #gpr
+)
+target_link_libraries(grpc_unsecure_oe_enclave PUBLIC
+ openenclave::oeenclave
+ openenclave::oelibcxx
+ gpr_oe_enclave)
+
+foreach(_hdr
+ include/grpc/impl/codegen/byte_buffer.h
+ include/grpc/impl/codegen/byte_buffer_reader.h
+ include/grpc/impl/codegen/compression_types.h
+ include/grpc/impl/codegen/connectivity_state.h
+ include/grpc/impl/codegen/grpc_types.h
+ include/grpc/impl/codegen/propagation_bits.h
+ include/grpc/impl/codegen/slice.h
+ include/grpc/impl/codegen/status.h
+ include/grpc/impl/codegen/atm.h
+ include/grpc/impl/codegen/atm_gcc_atomic.h
+ include/grpc/impl/codegen/atm_gcc_sync.h
+ include/grpc/impl/codegen/atm_windows.h
+ include/grpc/impl/codegen/fork.h
+ include/grpc/impl/codegen/gpr_slice.h
+ include/grpc/impl/codegen/gpr_types.h
+ include/grpc/impl/codegen/log.h
+ include/grpc/impl/codegen/port_platform.h
+ include/grpc/impl/codegen/sync.h
+ include/grpc/impl/codegen/sync_custom.h
+ include/grpc/impl/codegen/sync_generic.h
+ include/grpc/impl/codegen/sync_posix.h
+ include/grpc/impl/codegen/sync_windows.h
+ include/grpc/byte_buffer.h
+ include/grpc/byte_buffer_reader.h
+ include/grpc/compression.h
+ include/grpc/fork.h
+ include/grpc/grpc.h
+ include/grpc/grpc_posix.h
+ include/grpc/grpc_security_constants.h
+ include/grpc/load_reporting.h
+ include/grpc/slice.h
+ include/grpc/slice_buffer.h
+ include/grpc/status.h
+ include/grpc/support/workaround_list.h
+ include/grpc/census.h
+)
+ string(REPLACE "include/" "" _path ${_hdr})
+ get_filename_component(_path ${_path} PATH)
+ install(FILES ${_hdr}
+ DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
+ )
+endforeach()
+
+
+if (gRPC_INSTALL)
+ install(TARGETS grpc_unsecure grpc_unsecure_oe_enclave EXPORT gRPCTargets
+ RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
+ )
+endif()
+
+if (gRPC_BUILD_TESTS)
+
+add_library(reconnect_server
+ test/core/util/reconnect_server.cc
+)
+
+if(WIN32 AND MSVC)
+ set_target_properties(reconnect_server PROPERTIES COMPILE_PDB_NAME "reconnect_server"
+ COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
+ )
+ if (gRPC_INSTALL)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/reconnect_server.pdb
+ DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
+ )
+ endif()
+endif()
+
+
+target_include_directories(reconnect_server
+ PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
+ PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
+ PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
+ PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
+ PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
+ PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
+ PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
+ PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
+ PRIVATE ${_gRPC_NANOPB_INCLUDE_DIR}
+)
+ # avoid dependency on libstdc++
+ if (_gRPC_CORE_NOSTDCXX_FLAGS)
+ set_target_properties(reconnect_server PROPERTIES LINKER_LANGUAGE C)
+ # only use the flags for C++ source files
+ target_compile_options(reconnect_server PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${_gRPC_CORE_NOSTDCXX_FLAGS}>)
+ endif()
+target_link_libraries(reconnect_server
+ ${_gRPC_ALLTARGETS_LIBRARIES}
+ test_tcp_server
+ grpc_test_util
+ grpc
+ gpr
+)
+
+
+endif (gRPC_BUILD_TESTS)
+if (gRPC_BUILD_TESTS)
+
+add_library(test_tcp_server
+ test/core/util/test_tcp_server.cc
+)
+
+if(WIN32 AND MSVC)
+ set_target_properties(test_tcp_server PROPERTIES COMPILE_PDB_NAME "test_tcp_server"
+ COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
+ )
+ if (gRPC_INSTALL)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/test_tcp_server.pdb
+ DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
+ )
+ endif()
+endif()
+
+
+target_include_directories(test_tcp_server
+ PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
+ PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
+ PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
+ PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
+ PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
+ PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
+ PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
+ PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
+ PRIVATE ${_gRPC_NANOPB_INCLUDE_DIR}
+)
+ # avoid dependency on libstdc++
+ if (_gRPC_CORE_NOSTDCXX_FLAGS)
+ set_target_properties(test_tcp_server PROPERTIES LINKER_LANGUAGE C)
+ # only use the flags for C++ source files
+ target_compile_options(test_tcp_server PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${_gRPC_CORE_NOSTDCXX_FLAGS}>)
+ endif()
+target_link_libraries(test_tcp_server
+ ${_gRPC_ALLTARGETS_LIBRARIES}
+ grpc_test_util
+ grpc
gpr
)
@@ -4545,6 +5089,85 @@ target_link_libraries(grpc++_unsecure
grpc_unsecure
)
+add_library(grpc++_unsecure_oe_enclave
+ src/cpp/client/insecure_credentials.cc
+ src/cpp/common/insecure_create_auth_context.cc
+ src/cpp/server/insecure_server_credentials.cc
+ src/cpp/client/channel_cc.cc
+ src/cpp/client/client_context.cc
+ src/cpp/client/client_interceptor.cc
+ src/cpp/client/create_channel.cc
+ src/cpp/client/create_channel_internal.cc
+ src/cpp/client/create_channel_posix.cc
+ src/cpp/client/credentials_cc.cc
+ src/cpp/client/generic_stub.cc
+ src/cpp/common/alarm.cc
+ src/cpp/common/channel_arguments.cc
+ src/cpp/common/channel_filter.cc
+ src/cpp/common/completion_queue_cc.cc
+ src/cpp/common/core_codegen.cc
+ src/cpp/common/resource_quota_cc.cc
+ src/cpp/common/rpc_method.cc
+ src/cpp/common/version_cc.cc
+ src/cpp/server/async_generic_service.cc
+ src/cpp/server/channel_argument_option.cc
+ src/cpp/server/create_default_thread_pool.cc
+ src/cpp/server/dynamic_thread_pool.cc
+ src/cpp/server/health/default_health_check_service.cc
+ src/cpp/server/health/health_check_service.cc
+ src/cpp/server/health/health_check_service_server_builder_option.cc
+ src/cpp/server/server_builder.cc
+ src/cpp/server/server_cc.cc
+ src/cpp/server/server_context.cc
+ src/cpp/server/server_credentials.cc
+ src/cpp/server/server_posix.cc
+ src/cpp/thread_manager/thread_manager.cc
+ src/cpp/util/byte_buffer_cc.cc
+ src/cpp/util/status.cc
+ src/cpp/util/string_ref.cc
+ src/cpp/util/time_cc.cc
+ src/core/ext/filters/client_channel/health/health.pb.c
+ third_party/nanopb/pb_common.c
+ third_party/nanopb/pb_decode.c
+ third_party/nanopb/pb_encode.c
+ src/cpp/codegen/codegen_init.cc
+)
+
+if(WIN32 AND MSVC)
+ set_target_properties(grpc++_unsecure_oe_enclave PROPERTIES COMPILE_PDB_NAME "grpc++_unsecure_oe_enclave"
+ COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
+ )
+ if (gRPC_INSTALL)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_unsecure_oe_enclave.pdb
+ DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
+ )
+ endif()
+endif()
+
+
+target_include_directories(grpc++_unsecure_oe_enclave
+ PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
+ PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
+ PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
+ PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
+ PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
+ PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
+ PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
+ PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
+ PRIVATE ${_gRPC_NANOPB_INCLUDE_DIR}
+ PRIVATE ${_gRPC_PROTO_GENS_DIR}
+)
+target_link_libraries(grpc++_unsecure_oe_enclave PUBLIC
+ #${_gRPC_BASELIB_LIBRARIES}
+ #${_gRPC_PROTOBUF_LIBRARIES}
+ #${_gRPC_ALLTARGETS_LIBRARIES}
+ openenclave::oeenclave
+ openenclave::oelibcxx
+ gpr_oe_enclave
+ grpc_unsecure_oe_enclave
+)
+
foreach(_hdr
include/grpc++/alarm.h
include/grpc++/channel.h
@@ -4790,7 +5413,7 @@ endforeach()
if (gRPC_INSTALL)
- install(TARGETS grpc++_unsecure EXPORT gRPCTargets
+ install(TARGETS grpc++_unsecure grpc++_unsecure_oe_enclave EXPORT gRPCTargets
RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
diff --git a/Makefile b/Makefile
index fe25078..c622c26 100644
--- a/Makefile
+++ b/Makefile
@@ -353,7 +353,7 @@ ifeq ($(SYSTEM),Darwin)
CXXFLAGS += -stdlib=libc++
endif
CXXFLAGS += -Wnon-virtual-dtor
-CPPFLAGS += -g -Wall -Wextra -Werror -Wno-long-long -Wno-unused-parameter -DOSATOMIC_USE_INLINED=1 -Wno-deprecated-declarations -Ithird_party/nanopb -DPB_FIELD_32BIT
+CPPFLAGS += -g -Wall -Wextra -Werror -Wno-long-long -Wno-unused-parameter -DOSATOMIC_USE_INLINED=1 -Wno-deprecated-declarations -Ithird_party/nanopb -DPB_FIELD_32BIT -Wno-unused-variable
COREFLAGS += -fno-rtti -fno-exceptions
LDFLAGS += -g
@@ -862,10 +862,11 @@ endif
LIBS_PROTOBUF = protobuf
LIBS_PROTOC = protoc protobuf
+HOST_LDLIBS_PROTOC += $(shell $(PKG_CONFIG) --libs protobuf)
HOST_LDLIBS_PROTOC += $(addprefix -l, $(LIBS_PROTOC))
ifeq ($(PROTOBUF_PKG_CONFIG),true)
-LDLIBS_PROTOBUF += $(shell $(PKG_CONFIG) --libs-only-l protobuf)
+LDLIBS_PROTOBUF += $(shell $(PKG_CONFIG) --libs protobuf)
else
LDLIBS_PROTOBUF += $(addprefix -l, $(LIBS_PROTOBUF))
endif
diff --git a/examples/cpp/helloworld/Makefile b/examples/cpp/helloworld/Makefile
index 6af9234..36e3067 100644
--- a/examples/cpp/helloworld/Makefile
+++ b/examples/cpp/helloworld/Makefile
@@ -20,12 +20,11 @@ CXX = g++
CPPFLAGS += `pkg-config --cflags protobuf grpc`
CXXFLAGS += -std=c++11
ifeq ($(SYSTEM),Darwin)
-LDFLAGS += -L/usr/local/lib `pkg-config --libs protobuf grpc++ grpc`\
- -lgrpc++_reflection\
+LDFLAGS += -L/usr/local/lib `pkg-config --libs protobuf`\
-ldl
else
-LDFLAGS += -L/usr/local/lib `pkg-config --libs protobuf grpc++ grpc`\
- -Wl,--no-as-needed -lgrpc++_reflection -Wl,--as-needed\
+LDFLAGS += `pkg-config --libs protobuf `\
+ -Wl,--no-as-needed -Wl,--as-needed\
-ldl
endif
PROTOC = protoc
@@ -39,7 +38,8 @@ vpath %.proto $(PROTOS_PATH)
all: system-check greeter_client greeter_server greeter_async_client greeter_async_client2 greeter_async_server
greeter_client: helloworld.pb.o helloworld.grpc.pb.o greeter_client.o
- $(CXX) $^ $(LDFLAGS) -o $@
+ $(CXX) $^ ~/grpc/libs/opt/libgrpc++_unsecure.a ~/grpc/libs/opt/libgrpc_unsecure.a ~/grpc/third_party/zlib/bui/libz.a /opt/protobuf/lib/libprotobuf.a -lpthread -o $@
+
greeter_server: helloworld.pb.o helloworld.grpc.pb.o greeter_server.o
$(CXX) $^ $(LDFLAGS) -o $@
diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h
index d7294d5..328f043 100644
--- a/include/grpc/impl/codegen/port_platform.h
+++ b/include/grpc/impl/codegen/port_platform.h
@@ -101,6 +101,7 @@
#elif defined(GPR_MANYLINUX1)
// TODO(atash): manylinux1 is just another __linux__ but with ancient
// libraries; it should be integrated with the `__linux__` definitions below.
+#define GRPC_ARES 0
#define GPR_PLATFORM_STRING "manylinux"
#define GPR_POSIX_CRASH_HANDLER 1
#define GPR_CPU_POSIX 1
@@ -159,6 +160,7 @@
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
+#define GRPC_ARES 0
#include <features.h>
#define GPR_CPU_LINUX 1
#define GPR_GCC_ATOMIC 1
@@ -502,6 +504,7 @@ typedef unsigned __int64 uint64_t;
#define GRPC_ARES 1
#endif
+#define GRPC_IF_NAMETOINDEX 0
#ifndef GRPC_IF_NAMETOINDEX
#define GRPC_IF_NAMETOINDEX 1
#endif
@@ -645,5 +648,5 @@ typedef unsigned __int64 uint64_t;
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif
-
+#define GRPC_ARES 0
#endif /* GRPC_IMPL_CODEGEN_PORT_PLATFORM_H */
diff --git a/src/core/lib/gpr/log_linux.cc b/src/core/lib/gpr/log_linux.cc
index 561276f..53b76e0 100644
--- a/src/core/lib/gpr/log_linux.cc
+++ b/src/core/lib/gpr/log_linux.cc
@@ -40,12 +40,12 @@
#include <time.h>
#include <unistd.h>
-static long gettid(void) { return syscall(__NR_gettid); }
+//static long gettid(void) { return syscall(__NR_gettid); }
void gpr_log(const char* file, int line, gpr_log_severity severity,
const char* format, ...) {
/* Avoid message construction if gpr_log_message won't log */
- if (gpr_should_log(severity) == 0) {
+ /*if (gpr_should_log(severity) == 0) {
return;
}
char* message = nullptr;
@@ -56,13 +56,13 @@ void gpr_log(const char* file, int line, gpr_log_severity severity,
return;
}
va_end(args);
- gpr_log_message(file, line, severity, message);
+ gpr_log_message(file, line, severity, message);*/
/* message has been allocated by vasprintf above, and needs free */
- free(message);
+ //free(message);