comparison libc/examples/examples.cmake @ 252:1f2b6ac9f198 llvm-original

LLVM16-1
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Fri, 18 Aug 2023 09:04:13 +0900
parents
children
comparison
equal deleted inserted replaced
237:c80f45b162ad 252:1f2b6ac9f198
1 function(add_example name)
2 add_executable(
3 ${name}
4 ${ARGN}
5 )
6
7 if(LIBC_FULLBUILD)
8 target_link_options(${name} PRIVATE -static -rtlib=compiler-rt -fuse-ld=lld)
9 elseif(LIBC_OVERLAY_ARCHIVE_DIR)
10 target_link_directories(${name} PRIVATE ${LIBC_OVERLAY_ARCHIVE_DIR})
11 target_link_options(${name} PRIVATE -l:libllvmlibc.a)
12 else()
13 message(FATAL_ERROR "Either LIBC_FULLBUILD should be on or "
14 "LIBC_OVERLAY_ARCHIVE_DIR should be set.")
15 endif()
16 endfunction()