Skip to content

Commit 7acb584

Browse files
committed
Disabled OPT:ICF and enabled Gy
1 parent 0dbf114 commit 7acb584

File tree

6 files changed

+64
-32
lines changed

6 files changed

+64
-32
lines changed

.bazelrc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ test --test_tag_filters=-jaeger,-opentracing,-opentracing_shim
2626
build --experimental_convenience_symlinks=clean
2727

2828
build:windows --copt="/Brepro" --copt="/guard:cf" --copt="/guard:ehcont" --copt="/Z7" --copt="/JMC-" --copt="/sdl"
29-
build:windows --linkopt="/Brepro" --linkopt="/guard:cf" --linkopt="/guard:ehcont" --linkopt="/DEBUG:FULL" --linkopt="/CETCOMPAT" --linkopt="/SWAPRUN:NET,CD" --linkopt="/OPT:REF,ICF" --linkopt="/RELEASE" --linkopt="/DEBUGTYPE:CV,PDATA,FIXUP"
29+
build:windows --linkopt="/Brepro" --linkopt="/guard:cf" --linkopt="/guard:ehcont" --linkopt="/DEBUG:FULL" --linkopt="/CETCOMPAT" --linkopt="/SWAPRUN:NET,CD" --linkopt="/OPT:REF,NOICF" --linkopt="/RELEASE" --linkopt="/DEBUGTYPE:CV,PDATA,FIXUP"
3030
build:windows --copt="/Zc:strictStrings"
31+
build:windows --copt="/Gy"
3132
build:windows --host_linkopt="shell32.lib"
3233
# Requires Visual Studio 2019 Build Tools installed in default location with the latest compiler (14.29.30133) for x64
3334
build:windows --action_env=BAZEL_VC_FULL_VERSION=14.29.30133 --action_env=BAZEL_WINSDK_FULL_VERSION=10.0.22621.0
@@ -128,12 +129,9 @@ build:windows --config=clang-cl
128129
build:clang-cl --host_copt=-Wno-dynamic-class-memaccess --copt=-Wno-dynamic-class-memaccess
129130
build:clang-cl --host_copt=-Wno-microsoft-cast --copt=-Wno-microsoft-cast
130131
build:clang-cl --host_copt=-Wno-invalid-offsetof --copt=-Wno-invalid-offsetof
132+
131133
build:clang-cl --host_platform=@otel_sdk//:x64_windows-clang-cl
132134
build:clang-cl --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl
133-
build:clang-cl --per_file_copt="protobuf\\+/.*@-Wno-invalid-offsetof"
134-
build:clang-cl --host_per_file_copt="protobuf\\+/.*@-Wno-invalid-offsetof"
135-
build:clang-cl --per_file_copt="c-ares\\+/.*@-Wno-macro-redefined"
136-
build:clang-cl --host_per_file_copt="c-ares\\+/.*@-Wno-macro-redefined"
137135

138136
common --experimental_enable_android_migration_apis
139137

multitool.lock.json

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -60,33 +60,33 @@
6060
"binaries": [
6161
{
6262
"kind": "archive",
63-
"url": "https://github.com/perses/perses/releases/download/v0.50.2/perses_0.50.2_linux_amd64.tar.gz",
63+
"url": "https://github.com/perses/perses/releases/download/v0.50.3/perses_0.50.3_linux_amd64.tar.gz",
6464
"file": "percli",
65-
"sha256": "0fd3568381e98e07f1c947d9874d5722ea8713b695a1439a25ff6bb43e497c5e",
65+
"sha256": "c018b2e1381ced3a30faaea01bcc2dbefa4172cc872828f792fdde6dd48dddd0",
6666
"os": "linux",
6767
"cpu": "x86_64"
6868
},
6969
{
7070
"kind": "archive",
71-
"url": "https://github.com/perses/perses/releases/download/v0.50.2/perses_0.50.2_darwin_arm64.tar.gz",
71+
"url": "https://github.com/perses/perses/releases/download/v0.50.3/perses_0.50.3_darwin_arm64.tar.gz",
7272
"file": "percli",
73-
"sha256": "a2397fa3007af7521c528cc2751c00e00aa5b62abbf8c99873957808f210e02b",
73+
"sha256": "55b83e96d90793264935de7f65f0018fc6128afa0bb91cc015da2192bddb6ea6",
7474
"os": "macos",
7575
"cpu": "arm64"
7676
},
7777
{
7878
"kind": "archive",
79-
"url": "https://github.com/perses/perses/releases/download/v0.50.2/perses_0.50.2_darwin_amd64.tar.gz",
79+
"url": "https://github.com/perses/perses/releases/download/v0.50.3/perses_0.50.3_darwin_amd64.tar.gz",
8080
"file": "percli",
81-
"sha256": "e7f0ac3291bb6b2cdebefd6f42c641f49a07b84f4f455d09ac0905c172278388",
81+
"sha256": "cc6fa2c48c60e8d680fa65284e565b8aac5e2ecc4dcc6797b8dead758ca0b38d",
8282
"os": "macos",
8383
"cpu": "x86_64"
8484
},
8585
{
8686
"kind": "archive",
87-
"url": "https://github.com/perses/perses/releases/download/v0.50.2/perses_0.50.2_windows_amd64.tar.gz",
87+
"url": "https://github.com/perses/perses/releases/download/v0.50.3/perses_0.50.3_windows_amd64.tar.gz",
8888
"file": "percli.exe",
89-
"sha256": "a5d78a4ffc4723462371725e56135a3b8daacda0c86eb38bc6338e14b8a0a77b",
89+
"sha256": "39addb4f76aa2402e5566e643751d851e78283bdd7ab8c73db97f897081b4458",
9090
"os": "windows",
9191
"cpu": "x86_64"
9292
}
@@ -96,33 +96,33 @@
9696
"binaries": [
9797
{
9898
"kind": "archive",
99-
"url": "https://github.com/perses/perses/releases/download/v0.50.2/perses_0.50.2_linux_amd64.tar.gz",
99+
"url": "https://github.com/perses/perses/releases/download/v0.50.3/perses_0.50.3_linux_amd64.tar.gz",
100100
"file": "perses",
101-
"sha256": "0fd3568381e98e07f1c947d9874d5722ea8713b695a1439a25ff6bb43e497c5e",
101+
"sha256": "c018b2e1381ced3a30faaea01bcc2dbefa4172cc872828f792fdde6dd48dddd0",
102102
"os": "linux",
103103
"cpu": "x86_64"
104104
},
105105
{
106106
"kind": "archive",
107-
"url": "https://github.com/perses/perses/releases/download/v0.50.2/perses_0.50.2_darwin_arm64.tar.gz",
107+
"url": "https://github.com/perses/perses/releases/download/v0.50.3/perses_0.50.3_darwin_arm64.tar.gz",
108108
"file": "perses",
109-
"sha256": "a2397fa3007af7521c528cc2751c00e00aa5b62abbf8c99873957808f210e02b",
109+
"sha256": "55b83e96d90793264935de7f65f0018fc6128afa0bb91cc015da2192bddb6ea6",
110110
"os": "macos",
111111
"cpu": "arm64"
112112
},
113113
{
114114
"kind": "archive",
115-
"url": "https://github.com/perses/perses/releases/download/v0.50.2/perses_0.50.2_darwin_amd64.tar.gz",
115+
"url": "https://github.com/perses/perses/releases/download/v0.50.3/perses_0.50.3_darwin_amd64.tar.gz",
116116
"file": "perses",
117-
"sha256": "e7f0ac3291bb6b2cdebefd6f42c641f49a07b84f4f455d09ac0905c172278388",
117+
"sha256": "cc6fa2c48c60e8d680fa65284e565b8aac5e2ecc4dcc6797b8dead758ca0b38d",
118118
"os": "macos",
119119
"cpu": "x86_64"
120120
},
121121
{
122122
"kind": "archive",
123-
"url": "https://github.com/perses/perses/releases/download/v0.50.2/perses_0.50.2_windows_amd64.tar.gz",
123+
"url": "https://github.com/perses/perses/releases/download/v0.50.3/perses_0.50.3_windows_amd64.tar.gz",
124124
"file": "perses.exe",
125-
"sha256": "a5d78a4ffc4723462371725e56135a3b8daacda0c86eb38bc6338e14b8a0a77b",
125+
"sha256": "39addb4f76aa2402e5566e643751d851e78283bdd7ab8c73db97f897081b4458",
126126
"os": "windows",
127127
"cpu": "x86_64"
128128
}
@@ -132,36 +132,36 @@
132132
"binaries": [
133133
{
134134
"kind": "file",
135-
"url": "https://github.com/getsentry/sentry-cli/releases/download/2.42.4/sentry-cli-Linux-aarch64",
136-
"sha256": "134c9e2b21d341a19710c90eaadb6dc817230f13edbb11a3ec9e41f04d118066",
135+
"url": "https://github.com/getsentry/sentry-cli/releases/download/2.42.5/sentry-cli-Linux-aarch64",
136+
"sha256": "2d4f9df6e567ffaf90aab1a6dd892b1ba9fd580edd8b9ffe7d8484e5530263eb",
137137
"os": "linux",
138138
"cpu": "arm64"
139139
},
140140
{
141141
"kind": "file",
142-
"url": "https://github.com/getsentry/sentry-cli/releases/download/2.42.4/sentry-cli-Linux-x86_64",
143-
"sha256": "6d61432bc47f78fcfeb615302a58796e5d135f1471d5b9bc7dde576b1ac956b6",
142+
"url": "https://github.com/getsentry/sentry-cli/releases/download/2.42.5/sentry-cli-Linux-x86_64",
143+
"sha256": "ece674996d051b3d236bb3b3e2ae4c315d0aa55373fa3bcde2d6d474b7c6ba96",
144144
"os": "linux",
145145
"cpu": "x86_64"
146146
},
147147
{
148148
"kind": "file",
149-
"url": "https://github.com/getsentry/sentry-cli/releases/download/2.42.4/sentry-cli-Darwin-arm64",
150-
"sha256": "9dc0dbcce902f615a5d5b859ac8ebfcf580eb34eadf9fe0dd31048534bf05216",
149+
"url": "https://github.com/getsentry/sentry-cli/releases/download/2.42.5/sentry-cli-Darwin-arm64",
150+
"sha256": "833a7a87be13f4b28f52928b3890b1112684a8b3d148a3c0cdc0d1e3b65e80f7",
151151
"os": "macos",
152152
"cpu": "arm64"
153153
},
154154
{
155155
"kind": "file",
156-
"url": "https://github.com/getsentry/sentry-cli/releases/download/2.42.4/sentry-cli-Darwin-x86_64",
157-
"sha256": "f63f0539ebb6dbc8b410393813536893104cd74c66c50e192da51fde24d55674",
156+
"url": "https://github.com/getsentry/sentry-cli/releases/download/2.42.5/sentry-cli-Darwin-x86_64",
157+
"sha256": "5110eb2e6568d836901c3f8f0c02cc596fa36663fab37e2d5f995207e878f8aa",
158158
"os": "macos",
159159
"cpu": "x86_64"
160160
},
161161
{
162162
"kind": "file",
163-
"url": "https://github.com/getsentry/sentry-cli/releases/download/2.42.4/sentry-cli-Windows-x86_64.exe",
164-
"sha256": "051aa138fa192b3cbe7ddeb3d682c3acab54fc0bfa21a27fed7ebef8b646cf05",
163+
"url": "https://github.com/getsentry/sentry-cli/releases/download/2.42.5/sentry-cli-Windows-x86_64.exe",
164+
"sha256": "ea1f5a9ad24ed1ac43c238166857490772fb823d868997e874517648cace13d7",
165165
"os": "windows",
166166
"cpu": "x86_64"
167167
}

x/.bazelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ common:devenv --run_under='"c:/windows/system32/cmd.exe" /D /C start /wait deven
1010
# Make sure XCode is started first, then this works, otherwise fails the first time.
1111
common:xcode --run_under='/usr/bin/xcdebug'
1212

13-
#test:devenv --run_under='"c:/windows/system32/cmd.exe" /c start /wait devenv /debugexe '
13+
test:devenv --run_under='"c:/windows/system32/cmd.exe" /c start /wait devenv /debugexe '
1414
#common:slrun --run_under='sudo -E --inline q:/superluminal/SuperluminalCmd.exe run windows --symbol-location q:/symbols --resolve --symbol-cache-dir q:/symcache '
1515
#common:test1 --run_under='"c:/windows/system32/cmd.exe" /k set 1>d:\\1.txt 2>d:\\2.txt && echo a '
1616

x/haydoggo/BUILD.bazel

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
cc_test(
2+
name = "hang",
3+
srcs = ["hang.cc"],
4+
deps = ["@otel_sdk//:dll"],
5+
)

x/haydoggo/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
https://github.com/open-telemetry/opentelemetry-cpp/issues/3317
2+
3+
# thread_local TracerProvider with BatchSpanProcessorFactory causes thread to hang
4+

x/haydoggo/hang.cc

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#include <iostream>
2+
#include <thread>
3+
#include <opentelemetry/exporters/ostream/span_exporter_factory.h>
4+
#include <opentelemetry/sdk/trace/batch_span_processor_factory.h>
5+
#include <opentelemetry/sdk/trace/tracer_provider_factory.h>
6+
7+
namespace trace = opentelemetry::sdk::trace;
8+
/* thread_local */
9+
10+
std::unique_ptr<trace::TracerProvider> provider;
11+
12+
void workerThread() {
13+
auto exporter = opentelemetry::exporter::trace::OStreamSpanExporterFactory::Create(std::cout);
14+
trace::BatchSpanProcessorOptions processorOptions;
15+
auto processor = trace::BatchSpanProcessorFactory::Create(std::move(exporter), processorOptions);
16+
provider = trace::TracerProviderFactory::Create(std::move(processor));
17+
std::cout << "Provider created\n";
18+
}
19+
20+
int main()
21+
{
22+
auto thread = std::thread(workerThread);
23+
thread.join();
24+
std::cout << "Thread joined\n"; //Execution never reaches this point
25+
}

0 commit comments

Comments
 (0)