This patch adds LLVM_LIBC_INCLUDE_SCUDO as a flag. When enabled it
should link in the standalone version of SCUDO as the allocator for LLVM
libc.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
As a follow up to this patch, we should add some kind of integration test to make sure that what is getting packaged is actually usable and works as expected.
libc/cmake/modules/LLVMLibCLibraryRules.cmake | ||
---|---|---|
82 | Before we extract the objects from the dep, we should verify that the dep is an object library. Else, report a failure. One way could be to use the TYPE property to decide if the dep is an OBJECT_LIBRARY: https://cmake.org/cmake/help/v3.13/prop_tgt/TYPE.html Most of this is already done in the code above from lines 65 to 78. So, we might just be able make use of the DEPENDS option with small adjustments. |
added a comment explaining EXT_DEPS.
libc/cmake/modules/LLVMLibCLibraryRules.cmake | ||
---|---|---|
82 | We can't check the properties of the dep since it may not be defined yet. The libc cmake scripts are evaluated before the compiler-rt scripts. This means we can't check the type of anything in EXT_DEPS, which means that combining EXT_DEPS and DEPENDS wouldn't work. |
libc/CMakeLists.txt | ||
---|---|---|
74 | What about set this option ON by default? |
@cryptoad - This adds a build level dependency across projects. Do you see any problems which this arrangement? We will also start testing this arrangement via integration tests on the LLVM libc buildbot workers.
libc/CMakeLists.txt | ||
---|---|---|
74 | Not sure if ON or OFF is the correct default value while LLVM libc is not complete. When it is complete enough, I think default ON makes more sense. That said, if you have a reason to make it ON do share here. |
libc/CMakeLists.txt | ||
---|---|---|
74 | I like OFF as a default value, so that if someone is trying to build LLVM libc for the first time they don't get unexpected errors due to not including compiler-rt. |
libc/CMakeLists.txt | ||
---|---|---|
74 | Agree. I have no other reasons. |
What about set this option ON by default?