File tree 5 files changed +23
-15
lines changed
test/w3c_tracecontext_test
5 files changed +23
-15
lines changed Original file line number Diff line number Diff line change @@ -6,13 +6,17 @@ package(features = ["no_copts_tokenization"])
6
6
7
7
config_setting(
8
8
name = "windows",
9
- values = {"cpu": "x64_windows"},
9
+ constraint_values = [
10
+ "@bazel_tools//platforms:windows",
11
+ ],
10
12
visibility = ["//visibility:private"],
11
13
)
12
14
13
15
config_setting(
14
16
name = "osx",
15
- values = {"cpu": "darwin"},
17
+ constraint_values = [
18
+ "@bazel_tools//platforms:osx",
19
+ ],
16
20
visibility = ["//visibility:private"],
17
21
)
18
22
@@ -27,11 +31,26 @@ cc_library(
27
31
]),
28
32
copts = CURL_COPTS + [
29
33
"-DOS=\"os\"",
30
- "-DCURL_EXTERN_SYMBOL=__attribute__((__visibility__(\"default\")))",
31
34
],
35
+ defines = ["CURL_STATICLIB"],
32
36
includes = [
33
37
"include/",
34
38
"lib/",
35
39
],
40
+ linkopts = select({
41
+ "//:windows": [
42
+ "-DEFAULTLIB:ws2_32.lib",
43
+ "-DEFAULTLIB:advapi32.lib",
44
+ "-DEFAULTLIB:crypt32.lib",
45
+ "-DEFAULTLIB:Normaliz.lib",
46
+ ],
47
+ "//:osx": [
48
+ "-framework SystemConfiguration",
49
+ "-lpthread",
50
+ ],
51
+ "//conditions:default": [
52
+ "-lpthread",
53
+ ],
54
+ }),
36
55
visibility = ["//visibility:public"],
37
- )
56
+ )
Original file line number Diff line number Diff line change @@ -4,9 +4,7 @@ cc_binary(
4
4
"client.cc" ,
5
5
"tracer_common.h" ,
6
6
],
7
- # TODO: Move copts/linkopts for static CURL usage into shared bzl file.
8
7
copts = [
9
- "-DCURL_STATICLIB" ,
10
8
"-DWITH_CURL" ,
11
9
],
12
10
linkopts = select ({
Original file line number Diff line number Diff line change @@ -9,9 +9,6 @@ cc_library(
9
9
"include/opentelemetry/exporters/elasticsearch/es_log_exporter.h" ,
10
10
"include/opentelemetry/exporters/elasticsearch/es_log_recordable.h" ,
11
11
],
12
- copts = [
13
- "-DCURL_STATICLIB" ,
14
- ],
15
12
linkopts = select ({
16
13
"//bazel:windows" : [
17
14
"-DEFAULTLIB:advapi32.lib" ,
Original file line number Diff line number Diff line change @@ -6,9 +6,7 @@ cc_library(
6
6
"http_client_curl.cc" ,
7
7
"http_client_factory_curl.cc" ,
8
8
],
9
- # TODO: Move copts/linkopts for static CURL usage into shared bzl file.
10
9
copts = [
11
- "-DCURL_STATICLIB" ,
12
10
"-DWITH_CURL" ,
13
11
],
14
12
include_prefix = "src/http/client/curl" ,
Original file line number Diff line number Diff line change @@ -3,10 +3,6 @@ cc_binary(
3
3
srcs = [
4
4
"main.cc" ,
5
5
],
6
- # TODO: Move copts/linkopts for static CURL usage into shared bzl file.
7
- copts = [
8
- "-DCURL_STATICLIB" ,
9
- ],
10
6
linkopts = select ({
11
7
"//bazel:windows" : [
12
8
"-DEFAULTLIB:advapi32.lib" ,
You can’t perform that action at this time.
0 commit comments