1*7c3d14c8STreehugger Robotadd_custom_target(scudo) 2*7c3d14c8STreehugger Robotset_target_properties(scudo PROPERTIES FOLDER "Compiler-RT Misc") 3*7c3d14c8STreehugger Robot 4*7c3d14c8STreehugger Robotinclude_directories(..) 5*7c3d14c8STreehugger Robot 6*7c3d14c8STreehugger Robotset(SCUDO_CFLAGS ${SANITIZER_COMMON_CFLAGS}) 7*7c3d14c8STreehugger Robotappend_rtti_flag(OFF SCUDO_CFLAGS) 8*7c3d14c8STreehugger Robotlist(APPEND SCUDO_CFLAGS -msse4.2 -mcx16) 9*7c3d14c8STreehugger Robot 10*7c3d14c8STreehugger Robotset(SCUDO_SOURCES 11*7c3d14c8STreehugger Robot scudo_allocator.cpp 12*7c3d14c8STreehugger Robot scudo_flags.cpp 13*7c3d14c8STreehugger Robot scudo_interceptors.cpp 14*7c3d14c8STreehugger Robot scudo_new_delete.cpp 15*7c3d14c8STreehugger Robot scudo_termination.cpp 16*7c3d14c8STreehugger Robot scudo_utils.cpp) 17*7c3d14c8STreehugger Robot 18*7c3d14c8STreehugger Robotif(COMPILER_RT_HAS_SCUDO) 19*7c3d14c8STreehugger Robot foreach(arch ${SCUDO_SUPPORTED_ARCH}) 20*7c3d14c8STreehugger Robot add_compiler_rt_runtime(clang_rt.scudo 21*7c3d14c8STreehugger Robot STATIC 22*7c3d14c8STreehugger Robot ARCHS ${arch} 23*7c3d14c8STreehugger Robot SOURCES ${SCUDO_SOURCES} 24*7c3d14c8STreehugger Robot $<TARGET_OBJECTS:RTInterception.${arch}> 25*7c3d14c8STreehugger Robot $<TARGET_OBJECTS:RTSanitizerCommonNoTermination.${arch}> 26*7c3d14c8STreehugger Robot $<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}> 27*7c3d14c8STreehugger Robot CFLAGS ${SCUDO_CFLAGS} 28*7c3d14c8STreehugger Robot PARENT_TARGET scudo) 29*7c3d14c8STreehugger Robot endforeach() 30*7c3d14c8STreehugger Robotendif() 31*7c3d14c8STreehugger Robot 32*7c3d14c8STreehugger Robotadd_dependencies(compiler-rt scudo) 33*7c3d14c8STreehugger Robot 34