ya.make 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595
  1. # Generated by devtools/yamaker/ym2
  2. LIBRARY()
  3. LICENSE(
  4. Apache-2.0 AND
  5. Apache-2.0 WITH LLVM-exception AND
  6. MIT AND
  7. NCSA
  8. )
  9. LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
  10. VERSION(19.1.7)
  11. ORIGINAL_SOURCE(https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.7/compiler-rt-19.1.7.src.tar.xz)
  12. NO_COMPILER_WARNINGS()
  13. # Check MUSL before NO_PLATFORM() disables it.
  14. IF (MUSL)
  15. # We use C headers despite NO_PLATFORM, but we do not propagate
  16. # them with ADDINCL GLOBAL because we do not have an API, and we
  17. # can not propagate them because libcxx has to put its own
  18. # includes before musl includes for its include_next to work.
  19. IF (ARCH_X86_64)
  20. ADDINCL(
  21. contrib/libs/musl/arch/x86_64
  22. )
  23. ENDIF()
  24. IF (ARCH_AARCH64)
  25. ADDINCL(
  26. contrib/libs/musl/arch/aarch64
  27. )
  28. ENDIF()
  29. ADDINCL(
  30. contrib/libs/musl/arch/generic
  31. contrib/libs/musl/include
  32. contrib/libs/musl/extra
  33. )
  34. ENDIF()
  35. NO_UTIL()
  36. NO_RUNTIME()
  37. NO_PLATFORM()
  38. NO_COMPILER_WARNINGS()
  39. IF (GCC OR CLANG)
  40. # Clang (maybe GCC too) LTO code generator leaves the builtin calls unresolved
  41. # even if they are available. After the code generation pass is done
  42. # a linker is forced to select original object files from this library again
  43. # as they contain unresolved symbols. But code generation is already done,
  44. # object files actually are not ELFs but an LLVM bytecode and we get
  45. # "member at xxxxx is not an ELF object" errors from the linker.
  46. # Just generate native code from the beginning.
  47. NO_LTO()
  48. ENDIF()
  49. IF (OS_DARWIN OR OS_IOS)
  50. SRCS(
  51. atomic_flag_clear.c
  52. atomic_flag_clear_explicit.c
  53. atomic_flag_test_and_set.c
  54. atomic_flag_test_and_set_explicit.c
  55. atomic_signal_fence.c
  56. atomic_thread_fence.c
  57. )
  58. ENDIF()
  59. IF (ARCH_ARM64 OR ARCH_X86_64)
  60. # As of r25b, clang-for-android does not have bf16 support.
  61. # These can be built using r27 and above.
  62. IF (NOT OS_ANDROID)
  63. SRCS(
  64. # NB: sources that were commented out were added in llvm-20
  65. extendbfsf2.c
  66. truncdfbf2.c
  67. # truncxfbf2.c
  68. truncsfbf2.c
  69. # trunctfbf2.c
  70. )
  71. ENDIF()
  72. ENDIF()
  73. IF (ARCH_AARCH64)
  74. SRCS(
  75. aarch64/chkstk.S
  76. aarch64/fp_mode.c
  77. aarch64/sme-abi-init.c
  78. aarch64/sme-abi-vg.c
  79. aarch64/sme-abi.S
  80. aarch64/sme-libc-mem-routines.S
  81. absvdi2.c
  82. absvsi2.c
  83. absvti2.c
  84. adddf3.c
  85. addsf3.c
  86. addtf3.c
  87. addvdi3.c
  88. addvsi3.c
  89. addvti3.c
  90. apple_versioning.c
  91. ashldi3.c
  92. ashlti3.c
  93. ashrdi3.c
  94. ashrti3.c
  95. atomic.c
  96. bswapdi2.c
  97. bswapsi2.c
  98. clear_cache.c
  99. clzdi2.c
  100. clzsi2.c
  101. clzti2.c
  102. cmpdi2.c
  103. cmpti2.c
  104. comparedf2.c
  105. comparesf2.c
  106. comparetf2.c
  107. cpu_model/aarch64.c
  108. ctzdi2.c
  109. ctzsi2.c
  110. ctzti2.c
  111. divdc3.c
  112. divdf3.c
  113. divdi3.c
  114. divmoddi4.c
  115. divmodsi4.c
  116. divmodti4.c
  117. divsc3.c
  118. divsf3.c
  119. divsi3.c
  120. divtc3.c
  121. divtf3.c
  122. divti3.c
  123. emutls.c
  124. enable_execute_stack.c
  125. eprintf.c
  126. extenddftf2.c
  127. extendhfsf2.c
  128. extendhftf2.c
  129. extendsfdf2.c
  130. extendsftf2.c
  131. ffsdi2.c
  132. ffssi2.c
  133. ffsti2.c
  134. fixdfdi.c
  135. fixdfsi.c
  136. fixdfti.c
  137. fixsfdi.c
  138. fixsfsi.c
  139. fixsfti.c
  140. fixtfdi.c
  141. fixtfsi.c
  142. fixtfti.c
  143. fixunsdfdi.c
  144. fixunsdfsi.c
  145. fixunsdfti.c
  146. fixunssfdi.c
  147. fixunssfsi.c
  148. fixunssfti.c
  149. fixunstfdi.c
  150. fixunstfsi.c
  151. fixunstfti.c
  152. floatdidf.c
  153. floatdisf.c
  154. floatditf.c
  155. floatsidf.c
  156. floatsisf.c
  157. floatsitf.c
  158. floattidf.c
  159. floattisf.c
  160. floattitf.c
  161. floatundidf.c
  162. floatundisf.c
  163. floatunditf.c
  164. floatunsidf.c
  165. floatunsisf.c
  166. floatunsitf.c
  167. floatuntidf.c
  168. floatuntisf.c
  169. floatuntitf.c
  170. gcc_personality_v0.c
  171. int_util.c
  172. lshrdi3.c
  173. lshrti3.c
  174. moddi3.c
  175. modsi3.c
  176. modti3.c
  177. muldc3.c
  178. muldf3.c
  179. muldi3.c
  180. mulodi4.c
  181. mulosi4.c
  182. muloti4.c
  183. mulsc3.c
  184. mulsf3.c
  185. multc3.c
  186. multf3.c
  187. multi3.c
  188. mulvdi3.c
  189. mulvsi3.c
  190. mulvti3.c
  191. negdf2.c
  192. negdi2.c
  193. negsf2.c
  194. negti2.c
  195. negvdi2.c
  196. negvsi2.c
  197. negvti2.c
  198. os_version_check.c
  199. paritydi2.c
  200. paritysi2.c
  201. parityti2.c
  202. popcountdi2.c
  203. popcountsi2.c
  204. popcountti2.c
  205. powidf2.c
  206. powisf2.c
  207. powitf2.c
  208. subdf3.c
  209. subsf3.c
  210. subtf3.c
  211. subvdi3.c
  212. subvsi3.c
  213. subvti3.c
  214. trampoline_setup.c
  215. truncdfhf2.c
  216. truncdfsf2.c
  217. truncsfhf2.c
  218. trunctfdf2.c
  219. trunctfhf2.c
  220. trunctfsf2.c
  221. ucmpdi2.c
  222. ucmpti2.c
  223. udivdi3.c
  224. udivmoddi4.c
  225. udivmodsi4.c
  226. udivmodti4.c
  227. udivsi3.c
  228. udivti3.c
  229. umoddi3.c
  230. umodsi3.c
  231. umodti3.c
  232. )
  233. IF (NOT OS_DARWIN)
  234. SRCS(
  235. aarch64/sme-libc-routines.c
  236. )
  237. ENDIF()
  238. ELSEIF (ARCH_X86_64)
  239. SRCS(
  240. absvdi2.c
  241. absvsi2.c
  242. absvti2.c
  243. adddf3.c
  244. addsf3.c
  245. addtf3.c
  246. addvdi3.c
  247. addvsi3.c
  248. addvti3.c
  249. apple_versioning.c
  250. ashldi3.c
  251. ashlti3.c
  252. ashrdi3.c
  253. ashrti3.c
  254. atomic.c
  255. bswapdi2.c
  256. bswapsi2.c
  257. clear_cache.c
  258. clzdi2.c
  259. clzsi2.c
  260. clzti2.c
  261. cmpdi2.c
  262. cmpti2.c
  263. comparedf2.c
  264. comparesf2.c
  265. comparetf2.c
  266. cpu_model/x86.c
  267. ctzdi2.c
  268. ctzsi2.c
  269. ctzti2.c
  270. divdc3.c
  271. divdf3.c
  272. divdi3.c
  273. divmoddi4.c
  274. divmodsi4.c
  275. divmodti4.c
  276. divsc3.c
  277. divsf3.c
  278. divsi3.c
  279. divtc3.c
  280. divtf3.c
  281. divti3.c
  282. emutls.c
  283. enable_execute_stack.c
  284. eprintf.c
  285. extenddftf2.c
  286. extendhfsf2.c
  287. extendhftf2.c
  288. extendsfdf2.c
  289. extendsftf2.c
  290. ffsdi2.c
  291. ffssi2.c
  292. ffsti2.c
  293. fixdfdi.c
  294. fixdfsi.c
  295. fixdfti.c
  296. fixsfdi.c
  297. fixsfsi.c
  298. fixsfti.c
  299. fixtfdi.c
  300. fixtfsi.c
  301. fixtfti.c
  302. fixunsdfdi.c
  303. fixunsdfsi.c
  304. fixunsdfti.c
  305. fixunssfdi.c
  306. fixunssfsi.c
  307. fixunssfti.c
  308. fixunstfdi.c
  309. fixunstfsi.c
  310. fixunstfti.c
  311. floatditf.c
  312. floatsidf.c
  313. floatsisf.c
  314. floatsitf.c
  315. floattidf.c
  316. floattisf.c
  317. floattitf.c
  318. floatunditf.c
  319. floatunsidf.c
  320. floatunsisf.c
  321. floatunsitf.c
  322. floatuntidf.c
  323. floatuntisf.c
  324. floatuntitf.c
  325. fp_mode.c
  326. gcc_personality_v0.c
  327. int_util.c
  328. lshrdi3.c
  329. lshrti3.c
  330. moddi3.c
  331. modsi3.c
  332. modti3.c
  333. muldc3.c
  334. muldf3.c
  335. muldi3.c
  336. mulodi4.c
  337. mulosi4.c
  338. muloti4.c
  339. mulsc3.c
  340. mulsf3.c
  341. multc3.c
  342. multf3.c
  343. multi3.c
  344. mulvdi3.c
  345. mulvsi3.c
  346. mulvti3.c
  347. negdf2.c
  348. negdi2.c
  349. negsf2.c
  350. negti2.c
  351. negvdi2.c
  352. negvsi2.c
  353. negvti2.c
  354. os_version_check.c
  355. paritydi2.c
  356. paritysi2.c
  357. parityti2.c
  358. popcountdi2.c
  359. popcountsi2.c
  360. popcountti2.c
  361. powidf2.c
  362. powisf2.c
  363. powitf2.c
  364. subdf3.c
  365. subsf3.c
  366. subtf3.c
  367. subvdi3.c
  368. subvsi3.c
  369. subvti3.c
  370. trampoline_setup.c
  371. truncdfhf2.c
  372. truncdfsf2.c
  373. truncsfhf2.c
  374. trunctfdf2.c
  375. trunctfhf2.c
  376. trunctfsf2.c
  377. ucmpdi2.c
  378. ucmpti2.c
  379. udivdi3.c
  380. udivmoddi4.c
  381. udivmodsi4.c
  382. udivmodti4.c
  383. udivsi3.c
  384. udivti3.c
  385. umoddi3.c
  386. umodsi3.c
  387. umodti3.c
  388. x86_64/chkstk.S
  389. x86_64/floatdidf.c
  390. x86_64/floatdisf.c
  391. x86_64/floatundidf.S
  392. x86_64/floatundisf.S
  393. x86_64/floatundixf.S
  394. )
  395. IF (NOT OS_WINDOWS AND NOT OS_ANDROID)
  396. SRCS(
  397. x86_64/floatdixf.c
  398. divxc3.c
  399. extendxftf2.c
  400. fixunsxfdi.c
  401. fixunsxfsi.c
  402. fixunsxfti.c
  403. fixxfdi.c
  404. fixxfti.c
  405. floattixf.c
  406. floatuntixf.c
  407. mulxc3.c
  408. powixf2.c
  409. trunctfxf2.c
  410. )
  411. ENDIF()
  412. ELSE()
  413. SRCS(
  414. absvdi2.c
  415. absvsi2.c
  416. absvti2.c
  417. adddf3.c
  418. addsf3.c
  419. addtf3.c
  420. addvdi3.c
  421. addvsi3.c
  422. addvti3.c
  423. apple_versioning.c
  424. ashldi3.c
  425. ashlti3.c
  426. ashrdi3.c
  427. ashrti3.c
  428. atomic.c
  429. bswapdi2.c
  430. bswapsi2.c
  431. clzdi2.c
  432. clzsi2.c
  433. clzti2.c
  434. cmpdi2.c
  435. cmpti2.c
  436. comparedf2.c
  437. comparesf2.c
  438. comparetf2.c
  439. ctzdi2.c
  440. ctzsi2.c
  441. ctzti2.c
  442. divdc3.c
  443. divdf3.c
  444. divdi3.c
  445. divmoddi4.c
  446. divmodsi4.c
  447. divmodti4.c
  448. divsc3.c
  449. divsf3.c
  450. divsi3.c
  451. divtc3.c
  452. divtf3.c
  453. divti3.c
  454. extenddftf2.c
  455. extendhfsf2.c
  456. extendhftf2.c
  457. extendsfdf2.c
  458. extendsftf2.c
  459. ffsdi2.c
  460. ffssi2.c
  461. ffsti2.c
  462. fixdfdi.c
  463. fixdfsi.c
  464. fixdfti.c
  465. fixsfdi.c
  466. fixsfsi.c
  467. fixsfti.c
  468. fixtfdi.c
  469. fixtfsi.c
  470. fixtfti.c
  471. fixunsdfdi.c
  472. fixunsdfsi.c
  473. fixunsdfti.c
  474. fixunssfdi.c
  475. fixunssfsi.c
  476. fixunssfti.c
  477. fixunstfdi.c
  478. fixunstfsi.c
  479. fixunstfti.c
  480. floatdidf.c
  481. floatdisf.c
  482. floatditf.c
  483. floatsidf.c
  484. floatsisf.c
  485. floatsitf.c
  486. floattidf.c
  487. floattisf.c
  488. floattitf.c
  489. floatundidf.c
  490. floatundisf.c
  491. floatunditf.c
  492. floatunsidf.c
  493. floatunsisf.c
  494. floatunsitf.c
  495. floatuntidf.c
  496. floatuntisf.c
  497. floatuntitf.c
  498. fp_mode.c
  499. gcc_personality_v0.c
  500. int_util.c
  501. lshrdi3.c
  502. lshrti3.c
  503. moddi3.c
  504. modsi3.c
  505. modti3.c
  506. muldc3.c
  507. muldf3.c
  508. muldi3.c
  509. mulodi4.c
  510. mulosi4.c
  511. muloti4.c
  512. mulsc3.c
  513. mulsf3.c
  514. multc3.c
  515. multf3.c
  516. multi3.c
  517. mulvdi3.c
  518. mulvsi3.c
  519. mulvti3.c
  520. negdf2.c
  521. negdi2.c
  522. negsf2.c
  523. negti2.c
  524. negvdi2.c
  525. negvsi2.c
  526. negvti2.c
  527. os_version_check.c
  528. paritydi2.c
  529. paritysi2.c
  530. parityti2.c
  531. popcountdi2.c
  532. popcountsi2.c
  533. popcountti2.c
  534. powidf2.c
  535. powisf2.c
  536. powitf2.c
  537. subdf3.c
  538. subsf3.c
  539. subtf3.c
  540. subvdi3.c
  541. subvsi3.c
  542. subvti3.c
  543. trampoline_setup.c
  544. truncdfhf2.c
  545. truncdfsf2.c
  546. truncsfhf2.c
  547. trunctfdf2.c
  548. trunctfhf2.c
  549. trunctfsf2.c
  550. ucmpdi2.c
  551. ucmpti2.c
  552. udivdi3.c
  553. udivmoddi4.c
  554. udivmodsi4.c
  555. udivmodti4.c
  556. udivsi3.c
  557. udivti3.c
  558. umoddi3.c
  559. umodsi3.c
  560. umodti3.c
  561. )
  562. IF (NOT OS_EMSCRIPTEN)
  563. SRCS(
  564. clear_cache.c
  565. emutls.c
  566. enable_execute_stack.c
  567. eprintf.c
  568. )
  569. ENDIF()
  570. ENDIF()
  571. IF (OS_LINUX AND NOT WITH_MAPKIT)
  572. SRCS(
  573. crtbegin.c
  574. crtend.c
  575. )
  576. ENDIF()
  577. END()