github.com/prysmaticlabs/prysm@v1.4.4/third_party/in_gopkg_confluentinc_confluent_kafka_go_v1.patch (about) 1 diff --git a/kafka/BUILD.bazel b/kafka/BUILD.bazel 2 index bc46110..367c9f6 100644 3 --- a/kafka/BUILD.bazel 4 +++ b/kafka/BUILD.bazel 5 @@ -29,19 +29,20 @@ go_library( 6 "testhelpers.go", 7 "time.go", 8 ], 9 + cdeps = ["//kafka/librdkafka:precompiled"], 10 cgo = True, 11 clinkopts = select({ 12 "@io_bazel_rules_go//go/platform:android": [ 13 - "kafka/librdkafka/librdkafka_glibc_linux.a -lm -ldl -lpthread -lrt", 14 + "-lm -ldl -lpthread -lrt", 15 ], 16 "@io_bazel_rules_go//go/platform:darwin": [ 17 - "kafka/librdkafka/librdkafka_darwin.a -lm -lsasl2 -lz -ldl -lpthread", 18 + "-lm -lsasl2 -lz -ldl -lpthread", 19 ], 20 "@io_bazel_rules_go//go/platform:ios": [ 21 - "kafka/librdkafka/librdkafka_darwin.a -lm -lsasl2 -lz -ldl -lpthread", 22 + "-lm -lsasl2 -lz -ldl -lpthread", 23 ], 24 "@io_bazel_rules_go//go/platform:linux": [ 25 - "kafka/librdkafka/librdkafka_glibc_linux.a -lm -ldl -lpthread -lrt", 26 + "-lm -ldl -lpthread -lrt", 27 ], 28 "//conditions:default": [], 29 }), 30 diff --git a/kafka/librdkafka/BUILD.bazel b/kafka/librdkafka/BUILD.bazel 31 index 2ced242..9c06d83 100644 32 --- a/kafka/librdkafka/BUILD.bazel 33 +++ b/kafka/librdkafka/BUILD.bazel 34 @@ -8,4 +8,26 @@ go_library( 35 ], 36 importpath = "gopkg.in/confluentinc/confluent-kafka-go.v1/kafka/librdkafka", 37 visibility = ["//visibility:public"], 38 + cgo = True, 39 + cdeps = [":precompiled"], 40 +) 41 + 42 +cc_library( 43 + name = "precompiled", 44 + srcs = select({ 45 + "@io_bazel_rules_go//go/platform:android": [ 46 + "librdkafka_glibc_linux.a", 47 + ], 48 + "@io_bazel_rules_go//go/platform:darwin": [ 49 + "librdkafka_darwin.a", 50 + ], 51 + "@io_bazel_rules_go//go/platform:ios": [ 52 + "librdkafka_darwin.a", 53 + ], 54 + "@io_bazel_rules_go//go/platform:linux": [ 55 + "librdkafka_glibc_linux.a", 56 + ], 57 + }), 58 + visibility = ["//visibility:public"], 59 + hdrs = ["rdkafka.h"], 60 )