-
Notifications
You must be signed in to change notification settings - Fork 129
Option to link MIGraphX to MVSC Runtime Library statically or dynamically #4839
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
Open
apwojcik
wants to merge
24
commits into
develop
Choose a base branch
from
protobuf-v30
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
7edb162
upgrade for protobuf v30 on Windows
apwojcik 3cba518
update licenses
apwojcik 76b408e
Merge branch 'develop' into protobuf-v30
causten 7b72158
Merge branch 'develop' into protobuf-v30
apwojcik c063a85
upgrade to use clang-cl
apwojcik 374d2f2
update licenses
apwojcik 3bf5a82
Merge branch 'develop' into protobuf-v30
apwojcik 9d035ca
add missing PRIVATE
apwojcik 872bc70
add missing setup functions
apwojcik 1fb8cea
incorporate review feedback
apwojcik 6de38aa
Merge branch 'develop' into protobuf-v30
apwojcik 7bb41fe
Revert "update licenses"
apwojcik b913f89
Revert "add missing setup functions"
apwojcik 4915986
revert changes
apwojcik 57e39cc
revert more changes
apwojcik 27b9335
revert even more changes
apwojcik c676017
the last revert of changes
apwojcik bd5129c
update licenses
apwojcik a252dfc
Merge branch 'develop' into protobuf-v30
apwojcik 9863ffc
Merge branch 'develop' into protobuf-v30
apwojcik 80a8abc
incorporate review feedback
apwojcik d58875f
revert update licenses
apwojcik 150dc52
Merge branch 'develop' into protobuf-v30
apwojcik 63f7267
change to MIGRAPHX_MSVC_STATIC_RUNTIME
apwojcik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a cached variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
CMAKE_MSVC_RUNTIME_LIBRARYvariable is a CMake variable and not a cache variable. Please see its documentation and usage example here: https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.htmlPlease see how it is being used, for example, by protobuf, abseil-cpp, boost, and more: https://github.com/protocolbuffers/protobuf/blob/c616b4becd58b9e85bbb3488d38be0d31ab5447f/CMakeLists.txt#L207
https://github.com/abseil/abseil-cpp/blob/33bbc266097fea4cd23b7611a3c9e4c697751719/CMakeLists.txt#L65
https://github.com/boostorg/cmake/blob/7bce8efdc57134dc86e70ac3cd914e390a6cf30d/include/BoostRoot.cmake#L130
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For command-line usage, the PR defines the
MIGRAPHX_MSVC_STATIC_RUNTIMEcached variable instead. Similar to other 3rd-party projects (i.e.,protobuf_MSVC_STATIC_RUNTIME,ONNX_MSVC_STATIC_RUNTIME,ABSL_MSVC_STATIC_RUNTIME, etc.) that control the value of theCMAKE_MSVC_RUNTIME_LIBRARYvariable accordingly.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats not the way cmake variables work. Its a cached variable when the user sets from the command-line or in the toolchain or superproject.
Ok so abseil and protobuf dont set it correctly. Its completely broken when users set
CMAKE_MSVC_RUNTIME_LIBRARYeither in the toolchain or from the command-line.Boost does set it correctly and we can follow what they did. Instead of a cache variable, we need to check
if(NOT CMAKE_MSVC_RUNTIME_LIBRARY)before setting this flag.Users should be able to use standard cmake variables instead of trying to figure out the custom flags for each project. Especially for something like this where it needs to be the same across all projects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.