[icu] fix mac os x64 build on apple arm#16433
[icu] fix mac os x64 build on apple arm#16433autoantwort wants to merge 3 commits intomicrosoft:masterfrom
Conversation
|
I could image that another solution is to cross build from arm to x64 on mac, but than you need icu installed for the host triplet, so that solution is only possible when #15424 gets merged. |
|
Can you rerun the pipeline? The mac machine was offline. |
|
Commenter does not have sufficient privileges for PR 16433 in repo microsoft/vcpkg |
ras0219-msft
left a comment
There was a problem hiding this comment.
Let me know what path you'd like to take with this PR.
| LOGNAME "configure-${RELEASE_TRIPLET}") | ||
| if(VCPKG_TARGET_IS_OSX AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") | ||
| file(READ "${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET}/icudefs.mk" FILE_CONTENTS) | ||
| string(REPLACE "CC = clang" "CC = clang -arch x86_64" FILE_CONTENTS ${FILE_CONTENTS}) |
There was a problem hiding this comment.
It seems like -arch x86_64 should be part of the target CFLAGS. We might want to look at using
to compute the right flags. Otherwise, this PR looks like an acceptable incremental improvement.
I think the host triplet way is a better one. It will also make cross compiling from linux -> windows possible and other cross compiling scenarios. The only downside to my understanding is that you build the port twice if you are using for example the triplet |
|
Ok currently #16504 prevents a solution with host triplets on macs. |
|
@autoantwort It looks like we have to fix issue #16504 first. |
|
From #16504 (comment):
|
|
While we would need to build the port "twice":
|
Some of the tools are needed to cross compile and I don't know if you can only build the tools needed for cross compiling. I think this can be closed in favour of #16577 |
Describe the pull request
That was the only successful way to generate x64 binaries on an arm mac. I tried many different approaches but that one was the only successful one. See here.