brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.2 KiB · f3f01c1 Raw
266 lines · plain
1function(add_proxy_header_library target_name)2  cmake_parse_arguments(3    "ADD_PROXY_HEADER"4    "" # Optional arguments5    "" # Single value arguments6    "DEPENDS;FULL_BUILD_DEPENDS" # Multi-value arguments7    ${ARGN}8  )9 10  set(deps "")11  if(ADD_PROXY_HEADER_DEPENDS)12    list(APPEND deps ${ADD_PROXY_HEADER_DEPENDS})13  endif()14 15  if(LLVM_LIBC_FULL_BUILD AND ADD_PROXY_HEADER_FULL_BUILD_DEPENDS)16    list(APPEND deps ${ADD_PROXY_HEADER_FULL_BUILD_DEPENDS})17  endif()18 19  add_header_library(20    ${target_name}21    ${ADD_PROXY_HEADER_UNPARSED_ARGUMENTS}22    DEPENDS ${deps}23  )24endfunction()25 26add_proxy_header_library(27  math_macros28  HDRS29    math_macros.h30  FULL_BUILD_DEPENDS31    libc.include.llvm-libc-macros.math_macros32    libc.include.math33)34 35add_proxy_header_library(36  math_function_macros37  HDRS38    math_function_macros.h39  FULL_BUILD_DEPENDS40    libc.include.llvm-libc-macros.math_function_macros41    libc.include.math42)43 44add_proxy_header_library(45  errno_macros46  HDRS47    errno_macros.h48  FULL_BUILD_DEPENDS49    libc.include.errno50    libc.include.llvm-libc-macros.error_number_macros51    libc.include.llvm-libc-macros.generic_error_number_macros52)53 54add_header_library(fcntl_overlay HDRS fcntl_overlay.h)55add_proxy_header_library(56  fcntl_macros57  HDRS58    fcntl_macros.h59  DEPENDS60    .fcntl_overlay61  FULL_BUILD_DEPENDS62    libc.include.llvm-libc-macros.fcntl_macros63    libc.include.fcntl64)65 66add_proxy_header_library(67  fenv_macros68  HDRS69    fenv_macros.h70  FULL_BUILD_DEPENDS71    libc.include.llvm-libc-macros.fenv_macros72    libc.include.fenv73)74 75add_proxy_header_library(76  pthread_macros77  HDRS78    pthread_macros.h79  FULL_BUILD_DEPENDS80    libc.include.llvm-libc-macros.pthread_macros81    libc.include.pthread82)83 84add_proxy_header_library(85  sched_macros86  HDRS87    sched_macros.h88  FULL_BUILD_DEPENDS89    libc.include.sched90    libc.include.llvm-libc-macros.sched_macros91)92 93add_proxy_header_library(94  signal_macros95  HDRS96    signal_macros.h97  FULL_BUILD_DEPENDS98    libc.include.llvm-libc-macros.signal_macros99    libc.include.signal100)101 102add_header_library(stdlib_overlay HDRS stdlib_overlay.h)103 104add_proxy_header_library(105  stdlib_macros106  HDRS107    stdlib_macros.h108  DEPENDS109    .stdlib_overlay110  FULL_BUILD_DEPENDS111    libc.include.stdlib112    libc.include.llvm-libc-macros.stdlib_macros113)114 115add_header_library(stdio_overlay HDRS stdio_overlay.h)116 117add_proxy_header_library(118  stdio_macros119  HDRS120    stdio_macros.h121  DEPENDS122    .stdio_overlay123  FULL_BUILD_DEPENDS124    libc.include.stdio125    libc.include.llvm-libc-macros.stdio_macros126    libc.include.llvm-libc-macros.file_seek_macros127)128 129add_proxy_header_library(130  sys_epoll_macros131  HDRS132    sys_epoll_macros.h133  FULL_BUILD_DEPENDS134    libc.include.sys_epoll135    libc.include.llvm-libc-macros.sys_epoll_macros136)137 138add_proxy_header_library(139  sys_ioctl_macros140  HDRS141    sys_ioctl_macros.h142  FULL_BUILD_DEPENDS143    libc.include.sys_ioctl144    libc.include.llvm-libc-macros.sys_ioctl_macros145)146 147add_proxy_header_library(148  sys_stat_macros149  HDRS150    sys_stat_macros.h151  FULL_BUILD_DEPENDS152    libc.include.sys_stat153    libc.include.llvm-libc-macros.sys_stat_macros154)155 156add_header_library(unistd_overlay HDRS unistd_overlay.h)157add_proxy_header_library(158  unistd_macros159  HDRS160    unistd_macros.h161  DEPENDS162    .unistd_overlay163  FULL_BUILD_DEPENDS164    libc.include.unistd165    libc.include.llvm-libc-macros.unistd_macros166)167 168if (WIN32)169  set(windows_addtional_time_macros libc.include.llvm-libc-macros.windows.time_macros_ext)170else()171  set(windows_addtional_time_macros "")172endif()173 174add_proxy_header_library(175  time_macros176  HDRS177    time_macros.h178  DEPENDS179    ${windows_addtional_time_macros}180  FULL_BUILD_DEPENDS181    libc.include.time182    libc.include.llvm-libc-macros.time_macros183)184 185add_proxy_header_library(186  float_macros187  HDRS188    float_macros.h189  DEPENDS190    libc.include.llvm-libc-macros.float_macros191  FULL_BUILD_DEPENDS192    libc.include.float193)194 195add_proxy_header_library(196  limits_macros197  HDRS198    limits_macros.h199  FULL_BUILD_DEPENDS200    libc.include.limits201    libc.include.llvm-libc-macros.limits_macros202)203 204add_proxy_header_library(205  link_macros206  HDRS207    link_macros.h208  FULL_BUILD_DEPENDS209    libc.include.llvm-libc-macros.link_macros210    libc.include.link211)212 213add_proxy_header_library(214  locale_macros215  HDRS216    locale_macros.h217  FULL_BUILD_DEPENDS218    libc.include.llvm-libc-macros.locale_macros219    libc.include.locale220)221 222add_proxy_header_library(223  sys_auxv_macros224  HDRS225    sys_auxv_macros.h226  FULL_BUILD_DEPENDS227    libc.include.llvm-libc-macros.sys_auxv_macros228    libc.include.sys_auxv229)230 231add_header_library(wchar_overlay HDRS wchar_overlay.h)232 233add_header_library(uchar_overlay HDRS uchar_overlay.h)234 235add_proxy_header_library(236  wchar_macros237  HDRS238    wchar_macros.h239  DEPENDS240    .wchar_overlay241  FULL_BUILD_DEPENDS242    libc.include.llvm-libc-macros.wchar_macros243    libc.include.wchar244)245 246# offsetof is a macro inside compiler resource header stddef.h247add_proxy_header_library(248  offsetof_macros249  HDRS250    offsetof_macros.h251  FULL_BUILD_DEPENDS252    libc.include.llvm-libc-macros.offsetof_macro253)254 255# stdint.h header.256add_proxy_header_library(257  stdint_proxy258  HDRS259    stdint_proxy.h260  FULL_BUILD_DEPENDS261    libc.include.stdint262)263 264add_subdirectory(types)265add_subdirectory(func)266