1 if(NOT LLVM_LIBC_INCLUDE_SCUDO)
5 # We use a special library consisting of only the SCUDO allocator
6 # functions to link to the integration tests below. We could instead
7 # link to libllvmlibc.a directly, but since libllvmlibc.a contains
8 # functions which depend on the LLVM libc startup system, the integration
9 # test will have to link to the LLVM libc startup system. LLVM libc's startup
10 # system is not complete enough to allow this. It is also desireable to
11 # keep the dependencies as minimal as possible.
13 add_entrypoint_library(
14 libc_for_scudo_integration_test
18 libc.src.sched.__sched_getcpucount
19 libc.src.stdlib.aligned_alloc
20 libc.src.stdlib.calloc
22 libc.src.stdlib.malloc
23 libc.src.stdlib.realloc
24 libc.src.sys.auxv.getauxval
25 libc.src.sys.mman.mmap
26 libc.src.sys.mman.munmap
27 libc.src.sys.prctl.prctl
28 libc.src.unistd.__llvm_libc_syscall
31 libc.src.unistd.sysconf
36 libc-scudo-integration-test
41 libc-scudo-integration-test
46 target_link_libraries(libc-scudo-integration-test
48 libc_for_scudo_integration_test
52 libc-gwp-asan-uaf-should-crash
53 gwp_asan_should_crash.cpp
57 libc-gwp-asan-uaf-should-crash
62 target_link_libraries(libc-gwp-asan-uaf-should-crash
64 libc_for_scudo_integration_test
67 add_custom_command(TARGET libc-scudo-integration-test
69 COMMAND $<TARGET_FILE:libc-scudo-integration-test>
70 COMMENT "Run the test after it is built."