-
Notifications
You must be signed in to change notification settings - Fork 449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
POC fix for GCC/Clang under Linux for header only singletons #1594
Conversation
This the minimal change that will work for GCC with Linux. This approach won't work for Windows. MacOS is unknown but might work.
I have created this PR because this is the patch that is going to be used by the Fedora/RHEL rpm packages until this issue is resolved in an official release of opentelemetry-cpp. I think this is a fine approach for Linux etc. and it is about the minimal change I could find. I'm completely fine with this not being merged though if there is a better approach that might work for Windows/Visual Studio too. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1594 +/- ##
==========================================
+ Coverage 84.96% 85.00% +0.05%
==========================================
Files 156 156
Lines 4977 4977
==========================================
+ Hits 4228 4230 +2
+ Misses 749 747 -2
|
Is this duplicated of #1595 ? |
PR #1595 tests the api fix from this branch, with unit tests implemented by PR #1525 In general, the fix works for gcc and clang, with the exception of a crash seen when using the STL. See CI / CMake C++20 test Update: the fix works with gcc and clang, verified by the unit test. |
Thanks for also testing on your side. The change for gcc and clang is the similar in PR#1595 and here, with added unit tests in 1595, PR#1595 contains more code for windows, but if this can not be made to work I will cleanup the extra ifdef when merging, so it will look like this PR here if only the gcc/clang fix is merged. |
Closing this in favor of #1595 |
Changes
This the minimal change that will work for GCC with Linux. This approach
won't work for Windows. MacOS is unknown but might work.
Fixes #1520
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes