This commit is contained in:
WenTao Ou 2021-07-07 17:11:20 +08:00 коммит произвёл GitHub
Родитель 0563059bda
Коммит 6ffa84854d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
5 изменённых файлов: 23 добавлений и 15 удалений

Просмотреть файл

@ -6,13 +6,17 @@ package(features = ["no_copts_tokenization"])
config_setting(
name = "windows",
values = {"cpu": "x64_windows"},
constraint_values = [
"@bazel_tools//platforms:windows",
],
visibility = ["//visibility:private"],
)
config_setting(
name = "osx",
values = {"cpu": "darwin"},
constraint_values = [
"@bazel_tools//platforms:osx",
],
visibility = ["//visibility:private"],
)
@ -27,11 +31,26 @@ cc_library(
]),
copts = CURL_COPTS + [
"-DOS=\"os\"",
"-DCURL_EXTERN_SYMBOL=__attribute__((__visibility__(\"default\")))",
],
defines = ["CURL_STATICLIB"],
includes = [
"include/",
"lib/",
],
linkopts = select({
"//:windows": [
"-DEFAULTLIB:ws2_32.lib",
"-DEFAULTLIB:advapi32.lib",
"-DEFAULTLIB:crypt32.lib",
"-DEFAULTLIB:Normaliz.lib",
],
"//:osx": [
"-framework SystemConfiguration",
"-lpthread",
],
"//conditions:default": [
"-lpthread",
],
}),
visibility = ["//visibility:public"],
)
)

Просмотреть файл

@ -4,9 +4,7 @@ cc_binary(
"client.cc",
"tracer_common.h",
],
# TODO: Move copts/linkopts for static CURL usage into shared bzl file.
copts = [
"-DCURL_STATICLIB",
"-DWITH_CURL",
],
linkopts = select({

Просмотреть файл

@ -9,9 +9,6 @@ cc_library(
"include/opentelemetry/exporters/elasticsearch/es_log_exporter.h",
"include/opentelemetry/exporters/elasticsearch/es_log_recordable.h",
],
copts = [
"-DCURL_STATICLIB",
],
linkopts = select({
"//bazel:windows": [
"-DEFAULTLIB:advapi32.lib",

Просмотреть файл

@ -6,9 +6,7 @@ cc_library(
"http_client_curl.cc",
"http_client_factory_curl.cc",
],
# TODO: Move copts/linkopts for static CURL usage into shared bzl file.
copts = [
"-DCURL_STATICLIB",
"-DWITH_CURL",
],
include_prefix = "src/http/client/curl",

Просмотреть файл

@ -3,10 +3,6 @@ cc_binary(
srcs = [
"main.cc",
],
# TODO: Move copts/linkopts for static CURL usage into shared bzl file.
copts = [
"-DCURL_STATICLIB",
],
linkopts = select({
"//bazel:windows": [
"-DEFAULTLIB:advapi32.lib",