-
Notifications
You must be signed in to change notification settings - Fork 986
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
[question] Unable to disable bitcode for visionOS #16988
Comments
Hi @shiena Thanks for your question. What conan does with that set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "YES")
set(CMAKE_XCODE_ATTRIBUTE_BITCODE_GENERATION_MODE "bitcode") Can you please verify, in the Conan cache folder where If they are not, then it would be someone else, some other toolchain, script or configuration that is defining such value? Do you have any link about the way to determine if a binary was built with bitcode, you use |
@memsharded ~/.conan2/profiles/visionOS
conan install . -pr=visionOS --build=missing % grep -i bit /Users/shiena/.conan2/p/b/joltp948e1b67e51b2/b/build/generators/conan_toolchain.cmake
# Define Apple architectures, sysroot, deployment target, bitcode, etc
set(BITCODE "")
# Bitcode OFF
set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO")
string(APPEND CONAN_C_FLAGS " ${BITCODE} ${VISIBILITY} ${FOBJC_ARC}")
string(APPEND CONAN_CXX_FLAGS " ${BITCODE} ${VISIBILITY} ${FOBJC_ARC}") |
Interesting. I don't have a Mac, so I'd need someone else from the team to check and investigate what could be happening. |
@memsharded conan install . -pr visionOS --build=missing -s build_type=Debug |
I am curious, does it also happens with other libs? |
I built and checked with |
Very strange. I have checked the library source code and build scripts, and I cannot see anything that could be overwriting the bitcode definition. You might try to do a verbose build for the built of
And we might have a look to the compilation commands of the different objects. As I don't have a Mac, @uilianries might be able to do this on Monday, no rush. Thanks for the feedback! |
The bitcode is disabled even if build_type is RelWithDebInfo or MinSizeRel. For some reason, bitcode is enabled only when build_type is Release. |
The following is part of the release build log. The
|
Good research! That would explain it. It is very likely that LTO relies on having the IR available (the bitcode), and that LTO only happens at Depending on what you need there could be different approaches:
|
Thank you very much. |
What is your question?
I am building joltphysics for visionOS and bitcode is enabled. is there any way to disable bitcode?
What I have done
profile
conanfile.py
conan --version Conan version 2.7.1 conan install . -s os=visionOS -s os.version=1.2 -s os.sdk=xros --build=missing
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: