Announcement: TiFlash drop support for Apple Clang #57069
Lloyd-Pottiger
started this conversation in
General
Replies: 2 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear Developers,
We would like to address an ongoing issue with TiFlash macOS builds, which have been failing frequently.
Root Cause
The root reason for these failures is the compiler we are currently using on macOS, which is Apple Clang. Apple Clang is tightly bound to the macOS version. To maintain compatibility with older versions of TiFlash, we can not upgrade the macOS version, which remains at macOS 12 with Apple Clang 14. Consequently, any new features supported by Clang 17 but not by Apple Clang 14 (or features not supported by the macOS SDK) cause the macOS release builds to fail. This setup is particularly challenging to maintain, especially since developers typically use Linux machines for their work.
Proposed Solution
To address this issue, we have proposed a change in our build process. Specifically, we plan to switch to using LLVM Clang, aligning it with our Linux build environment. This change will be implemented through PR #9572.
To install LLVM Clang 17, use the following command:
Set the necessary environment variables:
In the future, upgrading the Clang version will simply require installing the updated version of LLVM. Since the build script is part of the TiFlash repository, it will be version-bound, allowing for consistent builds across different versions using a fixed command.
To build a specific version of TiFlash, use the following commands:
Additional Changes
make
withNinja
for faster and more efficient builds.LD
) withLLD
for improved linking performance.Impact
Developers will need to download and use LLVM Clang to compile TiFlash.
If you have any questions or concerns, please feel free to reach out to us on issue pingcap/tiflash. Thank you for your attention and happy coding!
Best regards,
@Lloyd-Pottiger
Beta Was this translation helpful? Give feedback.
All reactions