[vcpkg_configure_make] Fix handling of link flags#22798
[vcpkg_configure_make] Fix handling of link flags#22798BillyONeal merged 7 commits intomicrosoft:masterfrom
Conversation
This is not recommended during the normal build process https://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
|
cc @Neumann-A for review this changes. |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
colmap:x64-osx regression will be fixed in another PR. |
|
@Neumann-A Any other suggestions? |
|
i already left all my comments and the bugs are fixed. so no? |
|
Thanks for fixing what looks like it was a very tricky ball of wax to dig through! I can't believe the I hate that this is messing with |
| if(EXISTS "${Z_VCPKG_INSTALLED}${path_suffix}/lib") | ||
| string(APPEND LDFLAGS_${cmake_buildtype} " -L${Z_VCPKG_INSTALLED}${path_suffix}/lib") | ||
| endif() | ||
| if(EXISTS "${Z_VCPKG_INSTALLED}${path_suffix}/lib/manual-link") | ||
| string(APPEND LDFLAGS_${cmake_buildtype} " -L${Z_VCPKG_INSTALLED}${path_suffix}/lib/manual-link") | ||
| endif() |
There was a problem hiding this comment.
This is clearly an improvement vs. the status quo so I'm merging it, however, shouldn't this be:
| if(EXISTS "${Z_VCPKG_INSTALLED}${path_suffix}/lib") | |
| string(APPEND LDFLAGS_${cmake_buildtype} " -L${Z_VCPKG_INSTALLED}${path_suffix}/lib") | |
| endif() | |
| if(EXISTS "${Z_VCPKG_INSTALLED}${path_suffix}/lib/manual-link") | |
| string(APPEND LDFLAGS_${cmake_buildtype} " -L${Z_VCPKG_INSTALLED}${path_suffix}/lib/manual-link") | |
| endif() | |
| if(EXISTS "${Z_VCPKG_INSTALLED}${path_suffix}/lib") | |
| string(APPEND LDFLAGS_${cmake_buildtype} " -L\"${Z_VCPKG_INSTALLED}${path_suffix}/lib\"") | |
| endif() | |
| if(EXISTS "${Z_VCPKG_INSTALLED}${path_suffix}/lib/manual-link") | |
| string(APPEND LDFLAGS_${cmake_buildtype} " -L\"${Z_VCPKG_INSTALLED}${path_suffix}/lib/manual-link"") | |
| endif() | |
or something like that? (I'm not sure what syntax is is strictly speaking correct here but I suspect we should be defending against spaces)
There was a problem hiding this comment.
It looks like the diff is confused. All I did was add quotes, changing:
"-L${Z_VCPKG_INSTALLED}${path_suffix}/lib/manual-link"
to
"-L\"${Z_VCPKG_INSTALLED}${path_suffix}/lib/manual-link\""
This fixes the handling of link flags for Autotools ports, a prerequisite for #22516
What does your PR fix?
Which triplets are supported/not supported? Have you updated the CI baseline?
No change
Does your PR follow the maintainer guide?
YesIf you have added/updated a port: Have you run
./vcpkg x-add-version --alland committed the result?not required