Fix issue 892 (#893)
This commit is contained in:
Родитель
0563059bda
Коммит
6ffa84854d
|
@ -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",
|
||||
|
|
Загрузка…
Ссылка в новой задаче