-
Notifications
You must be signed in to change notification settings - Fork 4.2k
GH-50449: [C++] Invalid version script argument supplied to MSVC linker #50450
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -362,6 +362,10 @@ if(CMAKE_VERSION VERSION_LESS 3.18) | |||||
| else() | ||||||
| set(CXX_LINKER_SUPPORTS_VERSION_SCRIPT TRUE) | ||||||
| endif() | ||||||
| elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I let this be the more restrictive condition as I wasn't sure if any "MSVC like" compilers would support the version file, I'm not aware of any that do, so I think this suggestion is probably fine, but I'm not aware of the scope of Arrow's deployment, and just wanted to point out there are side effects from changing this check beyond terseness, just to be safe.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All MSVC like compilers behave like #50450 (comment) , right? (All symbols are hidden by default.) If so, can we use |
||||||
| # msvc does not support version scripts, but check_linker_flag won't return false | ||||||
|
johnwparent marked this conversation as resolved.
Outdated
|
||||||
| # due to how msvc's linker reports unrecognized arguments | ||||||
|
johnwparent marked this conversation as resolved.
Outdated
|
||||||
| set(CXX_LINKER_SUPPORTS_VERSION_SCRIPT FALSE) | ||||||
| else() | ||||||
| include(CheckLinkerFlag) | ||||||
| check_linker_flag(CXX | ||||||
|
|
||||||
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.
Could you remove this because we require CMake 3.25 or later now?