[BUILD] Fix exported definitions when building DLL with STL#2387
[BUILD] Fix exported definitions when building DLL with STL#2387lalitb merged 9 commits intoopen-telemetry:mainfrom
Conversation
Signed-off-by: Harish Shan <[email protected]>
Signed-off-by: Harish Shan <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #2387 +/- ##
=======================================
Coverage 87.43% 87.43%
=======================================
Files 199 199
Lines 6030 6030
=======================================
Hits 5272 5272
Misses 758 758
|
marcalff
left a comment
There was a problem hiding this comment.
Thanks for the analysis and fix, see comments.
Signed-off-by: Harish Shan <[email protected]>
marcalff
left a comment
There was a problem hiding this comment.
LGTM, thanks for the fix.
Waiting for approval from @ThomsonTan who owns this area.
|
I think it is better to change the MeterSelector (and so also MeterSelectorFactory) to take Edit - Same for InstrumentSelector. |
Thanks @lalitb Agreed, this is a much better solution. |
…d of nostd::string_view Signed-off-by: Harish Shan <[email protected]>
541c9d6 to
1f9ac98
Compare
Signed-off-by: Harish Shan <[email protected]>
marcalff
left a comment
There was a problem hiding this comment.
Excellent, thanks for revising the patch.
Please add a section in the CHANGELOG, for breaking changes,
listing the APIs affected by the change to const std::string&.
| @@ -5,7 +5,6 @@ | |||
|
|
|||
| #include <memory> | |||
There was a problem hiding this comment.
Do we need the string header as well ?
Same for every header file touched.
lalitb
left a comment
There was a problem hiding this comment.
Thanks. LGTM once the string header is included in modified header files.
Signed-off-by: Harish Shan <[email protected]>
Signed-off-by: Harish Shan <[email protected]>
Partially Fixes #2202
Changes
The function definitions for MeterSelectorFactory::Create and InstrumentSelectorFactory::Create are different for the nostd and stl builds, which causes linker errors when trying to build the DLL.
Cmake build WITH_STL=OFF:
CMake build WITH_STL=ON:
Introduced a compile definition
OPENTELEMETRY_STL_VERSIONto the DLL build process to export the correct definitions.For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes