Skip to content

Fix libcmt/libcmtd.lib link warning#1338

Merged
antkmsft merged 3 commits intoAzure:masterfrom
antkmsft:libcmtd
Sep 29, 2020
Merged

Fix libcmt/libcmtd.lib link warning#1338
antkmsft merged 3 commits intoAzure:masterfrom
antkmsft:libcmtd

Conversation

@antkmsft
Copy link
Copy Markdown
Member

@antkmsft antkmsft commented Sep 22, 2020

Closes #1020

@ahsonkhan ahsonkhan added the EngSys This issue is impacting the engineering system. label Sep 22, 2020
@ahsonkhan ahsonkhan added this to the [2020] October milestone Sep 22, 2020
@antkmsft antkmsft changed the title Fix libcmt/libcmtd.lib link warning [not ready for review yet] Fix libcmt/libcmtd.lib link warning Sep 22, 2020
@antkmsft antkmsft changed the title [not ready for review yet] Fix libcmt/libcmtd.lib link warning Fix libcmt/libcmtd.lib link warning Sep 28, 2020
@antkmsft antkmsft merged commit 21a389d into Azure:master Sep 29, 2020
OSVmImage: 'windows-2019'
vcpkg.deps: 'curl[winssl] paho-mqtt cmocka'
VCPKG_DEFAULT_TRIPLET: 'x64-windows-static'
VCPKG_DEFAULT_TRIPLET: 'x64-windows-static-md'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does -md mean in this context and how does that fix the underlying issue?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't looked too closely, but this might be interesting to follow up to understand why:
microsoft/vcpkg#1131 (comment)

It is discouraged to use static-md triplet...

I wonder if the issue is with the static part or the -md part.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@barcharcraz - can you please take a look at this as well and share your thoughts.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That thread is from 2017. Probably there were issues back then. And also I can see that these triplets were added to the officiale vcpkg repo on February, so maybe there were other issues at a time. But now it is there. microsoft/vcpkg@71a9def. Right now, it seems permanent and I don't see why we can't use it.
The reason why we were getting the warning was that we built our SDK with dynamic runtime, but cmocka was built with a reference to static runtime, and we were inking them together, and that is what the warning was telling us. Now we build cmocka with the same runtime as our SDK, so now they are consistent, and there is no warning anymore.

OSVmImage: 'windows-2019'
vcpkg.deps: ''
VCPKG_DEFAULT_TRIPLET: 'x64-windows-static'
VCPKG_DEFAULT_TRIPLET: 'x64-windows-static-md'
Copy link
Copy Markdown
Contributor

@ahsonkhan ahsonkhan Sep 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to use -md even for the release leg (presumably -md refers to some debug runtime)?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not. -md stands for "multithreaded dynamic".

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@antkmsft antkmsft deleted the libcmtd branch October 3, 2020 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

EngSys This issue is impacting the engineering system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't suppress linker warning about libcmtd.lib

4 participants