-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[boost-modular-build-helper] Bugfix/boost arm64 ios #18124
Changes from 4 commits
ef00875
b9a8813
94f9511
21c8181
2186fa2
fd750d5
778c474
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 |
---|---|---|
|
@@ -8,9 +8,24 @@ if "@VCPKG_PLATFORM_TOOLSET@" != "external" | |
@TOOLSET_OPTIONS@ | ||
; | ||
} | ||
else if "@VCPKG_TARGET_ARCHITECTURE@" = "arm64" && "@VCPKG_CMAKE_SYSTEM_NAME@" = "iOS" | ||
{ | ||
using gcc : 12.0.0 : @CMAKE_CXX_COMPILER@ | ||
: | ||
<ranlib>@CMAKE_RANLIB@ | ||
<archiver>@CMAKE_AR@ | ||
@CXXFLAGS@ | ||
@CFLAGS@ | ||
@LDFLAGS@ | ||
# MINGW here causes b2 to not run cygpath | ||
<flavor>mingw | ||
<compileflags>"-std=c++14 -stdlib=libc++ -DNDEBUG -arch arm64 -fembed-bitcode -Wno-unused-local-typedef -Wno-nullability-completeness -mmacosx-version-min=10.12 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk" | ||
; | ||
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. This compilerflag is needed to compile arm64 for iOS 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. There's a way to specify the iOS target via the
For iOS, that would be It would also be nice to make this work for both arm64 iOS and macOS builds, i.e. the
and
Boosts's b2 doesn't natively support
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 have tried adding these compilerflags to CMakeLists.txt but it keeps outputting x86-64 library files so unfortunately it does not work. I tried this change using both unix_build and the second builder. If you know how to get this to work to cross-compile on an Apple PC/laptop with Intel chip to arm64 by adjusting the CMakeLists file, please share. |
||
} | ||
|
||
else | ||
{ | ||
using gcc : 5.4.1 : @CMAKE_CXX_COMPILER@ | ||
using gcc : 12.0.0 : @CMAKE_CXX_COMPILER@ | ||
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. Updating to the latest gcc. |
||
: | ||
<ranlib>@CMAKE_RANLIB@ | ||
<archiver>@CMAKE_AR@ | ||
|
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.
To compile arm64 for ios, we need to skip this builder and use the one below which allows the use of the user-config.jam file
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 may need to limit to ios?
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.
Ok agreed, I will check for VCPKG_TARGET_ARCHITECTURE.
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.
@StefAviator, thank you for this PR! The code path below seems to be tailored specifically for Windows, e.g., it doesn't seem to copy over any
.dylib
files as opposed to theCMakeLists.txt
file. Theunix_build
function goes through theCMakeLists.txt
file which does seem to use theuser-config.jam
file:Were there any errors using the the unix build?
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.
Thanks for the feedback, I will try out your suggestions.