-
Notifications
You must be signed in to change notification settings - Fork 252
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
add the TIClang compiler, which is supported as of cmake 3.29.0. #622
base: develop2
Are you sure you want to change the base?
Conversation
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 your contribution @sotten
@@ -239,6 +239,10 @@ function(detect_compiler COMPILER COMPILER_VERSION COMPILER_RUNTIME COMPILER_RUN | |||
set(_COMPILER "clang") | |||
string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION}) | |||
list(GET VERSION_LIST 0 _COMPILER_VERSION) | |||
elseif(_COMPILER MATCHES TIClang) | |||
set(_COMPILER "ticlang") |
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 would be an issue. As the ticlang
is not a built-in settings.yml
, it will fail for Conan users. Maybe it should be added first there? Or why not just assimilating it to clang
? Is it binary incompatible to clang
? Different versioning? A bit of scope and extra info about this compiler would be nice
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.
the settings.yml is generated by this script, right? https://github.com/conan-io/conan/blob/develop2/conans/client/conf/__init__.py
The TIClang, Texas Instruments (TI) calls it tiarmclang (ARM-CGT-CLANG), is used for embedded systems and is usually executed as cross-compiled. The compiler is based on clang currently clang 16, but uses its own version number (currently 3.2.2, it uses Semver). TI has enhanced the clang with its own features for improved debugging, smaller code size and so on.
I use cmake and the TI compiler to create Conan package with jfrog artifactory. Until now, a lot of manual work had to be done in cmake so that cmake could handle the compiler. Now that it is natively supported, I hope that conan will soon recognize the compiler and I can simplify my process.
This is the product page: https://www.ti.com/tool/ARM-CGT
The documentation for the compiler can be found here: https://software-dl.ti.com/codegen/docs/tiarmclang/compiler_tools_user_guide/
The pull request in cmake can be found here: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9228
CMake version 3.29 adds the TIClang compiler natively. Since it behaves similarly to the Clang compiler, supporting in conan is easy.
https://cmake.org/cmake/help/latest/release/3.29.html#compilers