[pthreads] support ARM arch and UWP platform#16348
[pthreads] support ARM arch and UWP platform#16348vicroms merged 9 commits intomicrosoft:masterfrom luncliff:port/pthreads
Conversation
* arm: enable macro __PTW32_PROGCTR * uwp: LINK option /APPCONTAINER * uwp: link with 'kernel32', 'windowsapp'
|
cc @strega-nil for review this PR again. poppler regression is not related to this PR. |
|
Poppler regression is fixing in #16356. |
|
@luncliff please use patches instead of this; it'll be much clearer to future maintainers. if you need any help setting that up, please ask :) (and the way you'd do that is via |
|
So I just extracted code changes to a single patch ( I think explicitly specifying # portfile.cmake
if(VCPKG_TARGET_IS_UWP)
vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES add-uwp-pragma.patch)
# https://docs.microsoft.com/en-us/cpp/build/reference/linker-options
# https://docs.microsoft.com/en-us/cpp/build/reference/linking#link-environment-variables
set(ENV{LINK} "/APPCONTAINER")
endif()
# ... |
|
For future visitors who are using NMAKE, You can find well known Win32 API functions are there. And be aware of the |
|
fwiw, in the future you can do: if(VCPKG_TARGET_IS_UWP)
set(platform_patches fix-arm-uwp.patch)
endif()
vcpkg_from_sourceforge(
OUT_SOURCE_PATH SOURCE_PATH
REPO pthreads4w
FILENAME "pthreads4w-code-v${PTHREADS4W_VERSION}.zip"
SHA512 49e541b66c26ddaf812edb07b61d0553e2a5816ab002edc53a38a897db8ada6d0a096c98a9af73a8f40c94283df53094f76b429b09ac49862465d8697ed20013
PATCHES
${platform_patches}
) |
|
Please add the following codes to |
|
Fixed some collisions with #17011. |
|
Please add |
Thanks for the check, @JackBoosY. Applied in 34d4f9e :) |
What does your PR fix?
Check
TRIPLET_SYSTEM_ARCHcontainsarm.If so, replace macro function
PTW32_PROGCTRto__PTW32_PROGCTRso the build step can advance from preprocessing.If
VCPKG_TARGET_IS_UWP, place#pragmato link withkernel32.libandwindowsapp.lib.Also, inject linker option
/APPCONTAINERwithLINKenvironment variable.Migrate
CONTROLtovcpkg.jsonWhich triplets are supported/not supported? Have you updated the CI baseline?
All
armtriplets for Windows (includinguwp) should become available.arm64-windowsarm-windowsarm64-uwpx64-uwpDoes your PR follow the maintainer guide?
Wish the change followed the guide well.
I usedvcpkg_replace_stringinstead of adding a new.patchsince the source code change is trivial (3 lines in total).Any suggestions will be welcomed :)