-
Notifications
You must be signed in to change notification settings - Fork 38
[ATfE] Make use of baremetal compiler_rt profile library #648
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
base: arm-software
Are you sure you want to change the base?
Conversation
llvm/llvm-project#167998 enabled baremetal builds of compiler_rt profile runtime, so replace ATfE downstream minimal profile implementation (proflib.c) with compiler_rt one. proflib.c file is kept to provide the code needed to interface compiler_rt profile library to keep it clear in one place. This depends on adding supported Arm architecture in upstream LLVM runtimes CMake file.
| -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> | ||
| -DCMAKE_NM=${LLVM_BINARY_DIR}/bin/llvm-nm${CMAKE_EXECUTABLE_SUFFIX} | ||
| -DCMAKE_RANLIB=${LLVM_BINARY_DIR}/bin/llvm-ranlib${CMAKE_EXECUTABLE_SUFFIX} | ||
| -DCMAKE_SYSTEM_NAME=Generic |
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.
Where do all these options come from? Did you base it on something else?
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 is the same as compiler_rt invocation for builtins
| ExternalProject_Add( |
- it is named compiler-rt-profile
- it turns builtins OFF
- it turns profile library ON and baremetal profile ON
- it depends on builtins and C library
The profile library cannot be built in one go with builtins, because of dependencies: profile needs C library that needs builtins.
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.
I do not know if there is a sensible way to move common part out to avoid duplication - hopefully, someone with more CMake experience can advise.
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.
Maybe you could take all the common arguments and place them into another variable. It's not a major issue anyway, do it only if you want.
Example: the compiler_rt_cmake_args variable
llvm/llvm-project#167998 enabled baremetal builds of compiler_rt profile runtime, so replace ATfE downstream minimal profile implementation (proflib.c) with compiler_rt one.
proflib.c file is kept to provide the code needed to interface compiler_rt profile library to keep it clear in one place.
This depends on adding supported Arm architecture in upstream LLVM runtimes CMake file: llvm/llvm-project#172984