@@ -94,6 +94,10 @@ libc_support_library(
94
94
libc_support_library (
95
95
name = "llvm_libc_types_float128" ,
96
96
hdrs = ["include/llvm-libc-types/float128.h" ],
97
+ target_compatible_with = select ({
98
+ "@platforms//os:linux" : [],
99
+ "//conditions:default" : ["@platforms//:incompatible" ],
100
+ }),
97
101
deps = [":llvm_libc_macros_float_macros" ],
98
102
)
99
103
@@ -972,11 +976,17 @@ libc_support_library(
972
976
libc_support_library (
973
977
name = "__support_osutil_syscall" ,
974
978
hdrs = ["src/__support/OSUtil/syscall.h" ],
975
- textual_hdrs = [
976
- "src/__support/OSUtil/linux/syscall.h" ,
977
- "src/__support/OSUtil/linux/aarch64/syscall.h" ,
978
- "src/__support/OSUtil/linux/x86_64/syscall.h" ,
979
- ],
979
+ textual_hdrs = select ({
980
+ "@platforms//os:macos" : [
981
+ "src/__support/OSUtil/darwin/syscall.h" ,
982
+ "src/__support/OSUtil/darwin/arm/syscall.h" ,
983
+ ],
984
+ "@platforms//os:linux" : [
985
+ "src/__support/OSUtil/linux/syscall.h" ,
986
+ "src/__support/OSUtil/linux/aarch64/syscall.h" ,
987
+ "src/__support/OSUtil/linux/x86_64/syscall.h" ,
988
+ ],
989
+ }),
980
990
deps = [
981
991
":__support_common" ,
982
992
":__support_cpp_bit" ,
@@ -986,9 +996,10 @@ libc_support_library(
986
996
libc_support_library (
987
997
name = "__support_osutil_io" ,
988
998
hdrs = ["src/__support/OSUtil/io.h" ],
989
- textual_hdrs = [
990
- "src/__support/OSUtil/linux/io.h" ,
991
- ],
999
+ textual_hdrs = select ({
1000
+ "@platforms//os:macos" : ["src/__support/OSUtil/darwin/io.h" ],
1001
+ "@platforms//os:linux" : ["src/__support/OSUtil/linux/io.h" ],
1002
+ }),
992
1003
deps = [
993
1004
":__support_common" ,
994
1005
":__support_cpp_string_view" ,
@@ -1001,6 +1012,10 @@ libc_support_library(
1001
1012
name = "__support_osutil_quick_exit" ,
1002
1013
srcs = ["src/__support/OSUtil/linux/quick_exit.cpp" ],
1003
1014
hdrs = ["src/__support/OSUtil/quick_exit.h" ],
1015
+ target_compatible_with = select ({
1016
+ "@platforms//os:linux" : [],
1017
+ "//conditions:default" : ["@platforms//:incompatible" ],
1018
+ }),
1004
1019
deps = [
1005
1020
":__support_osutil_syscall" ,
1006
1021
],
@@ -1019,6 +1034,10 @@ libc_support_library(
1019
1034
"src/__support/StringUtil/error_to_string.h" ,
1020
1035
"src/__support/StringUtil/signal_to_string.h" ,
1021
1036
],
1037
+ target_compatible_with = select ({
1038
+ "@platforms//os:linux" : [],
1039
+ "//conditions:default" : ["@platforms//:incompatible" ],
1040
+ }),
1022
1041
deps = [
1023
1042
":__support_cpp_array" ,
1024
1043
":__support_cpp_span" ,
@@ -1036,6 +1055,10 @@ libc_support_library(
1036
1055
"src/__support/threads/mutex.h" ,
1037
1056
"src/__support/threads/mutex_common.h" ,
1038
1057
],
1058
+ target_compatible_with = select ({
1059
+ "@platforms//os:linux" : [],
1060
+ "//conditions:default" : ["@platforms//:incompatible" ],
1061
+ }),
1039
1062
textual_hdrs = [
1040
1063
"src/__support/threads/linux/mutex.h" ,
1041
1064
"src/__support/threads/linux/futex_word.h" ,
@@ -1695,13 +1718,19 @@ libc_math_function(
1695
1718
)
1696
1719
1697
1720
libc_math_function (name = "fabs" )
1721
+
1698
1722
libc_math_function (name = "fabsf" )
1723
+
1699
1724
libc_math_function (name = "fabsl" )
1725
+
1700
1726
libc_math_function (name = "fabsf128" )
1701
1727
1702
1728
libc_math_function (name = "fdim" )
1729
+
1703
1730
libc_math_function (name = "fdimf" )
1731
+
1704
1732
libc_math_function (name = "fdiml" )
1733
+
1705
1734
libc_math_function (name = "fdimf128" )
1706
1735
1707
1736
libc_math_function (
@@ -1729,7 +1758,6 @@ libc_math_function(
1729
1758
1730
1759
libc_math_function (name = "ceilf128" )
1731
1760
1732
-
1733
1761
libc_math_function (
1734
1762
name = "floor" ,
1735
1763
specializations = [
@@ -1747,11 +1775,15 @@ libc_math_function(
1747
1775
)
1748
1776
1749
1777
libc_math_function (name = "floorl" )
1778
+
1750
1779
libc_math_function (name = "floorf128" )
1751
1780
1752
1781
libc_math_function (name = "ldexp" )
1782
+
1753
1783
libc_math_function (name = "ldexpf" )
1784
+
1754
1785
libc_math_function (name = "ldexpl" )
1786
+
1755
1787
libc_math_function (name = "ldexpf128" )
1756
1788
1757
1789
libc_math_function (
@@ -1771,6 +1803,7 @@ libc_math_function(
1771
1803
)
1772
1804
1773
1805
libc_math_function (name = "truncl" )
1806
+
1774
1807
libc_math_function (name = "truncf128" )
1775
1808
1776
1809
libc_math_function (
@@ -1790,6 +1823,7 @@ libc_math_function(
1790
1823
)
1791
1824
1792
1825
libc_math_function (name = "roundl" )
1826
+
1793
1827
libc_math_function (name = "roundf128" )
1794
1828
1795
1829
libc_math_function (
@@ -1807,8 +1841,11 @@ libc_math_function(
1807
1841
)
1808
1842
1809
1843
libc_math_function (name = "frexp" )
1844
+
1810
1845
libc_math_function (name = "frexpf" )
1846
+
1811
1847
libc_math_function (name = "frexpl" )
1848
+
1812
1849
libc_math_function (name = "frexpf128" )
1813
1850
1814
1851
libc_math_function (name = "hypot" )
@@ -1821,31 +1858,47 @@ libc_math_function(
1821
1858
)
1822
1859
1823
1860
libc_math_function (name = "logb" )
1861
+
1824
1862
libc_math_function (name = "logbf" )
1863
+
1825
1864
libc_math_function (name = "logbl" )
1865
+
1826
1866
libc_math_function (name = "logbf128" )
1827
1867
1828
1868
libc_math_function (name = "modf" )
1869
+
1829
1870
libc_math_function (name = "modff" )
1871
+
1830
1872
libc_math_function (name = "modfl" )
1873
+
1831
1874
libc_math_function (name = "modff128" )
1832
1875
1833
1876
libc_math_function (name = "remquo" )
1877
+
1834
1878
libc_math_function (name = "remquof" )
1879
+
1835
1880
libc_math_function (name = "remquol" )
1836
1881
1837
1882
libc_math_function (name = "remainder" )
1883
+
1838
1884
libc_math_function (name = "remainderf" )
1885
+
1839
1886
libc_math_function (name = "remainderl" )
1840
1887
1841
1888
libc_math_function (name = "fmin" )
1889
+
1842
1890
libc_math_function (name = "fminf" )
1891
+
1843
1892
libc_math_function (name = "fminl" )
1893
+
1844
1894
libc_math_function (name = "fminf128" )
1845
1895
1846
1896
libc_math_function (name = "fmax" )
1897
+
1847
1898
libc_math_function (name = "fmaxf" )
1899
+
1848
1900
libc_math_function (name = "fmaxl" )
1901
+
1849
1902
libc_math_function (name = "fmaxf128" )
1850
1903
1851
1904
libc_math_function (
@@ -1928,38 +1981,64 @@ libc_math_function(
1928
1981
)
1929
1982
1930
1983
libc_math_function (name = "copysign" )
1984
+
1931
1985
libc_math_function (name = "copysignf" )
1986
+
1932
1987
libc_math_function (name = "copysignl" )
1933
- libc_math_function (name = "copysignf128" )
1988
+
1989
+ libc_math_function (
1990
+ name = "copysignf128" ,
1991
+ additional_deps = [
1992
+ ":llvm_libc_types_float128" ,
1993
+ ],
1994
+ )
1934
1995
1935
1996
libc_math_function (name = "ilogb" )
1997
+
1936
1998
libc_math_function (name = "ilogbf" )
1999
+
1937
2000
libc_math_function (name = "ilogbl" )
2001
+
1938
2002
libc_math_function (name = "ilogbf128" )
1939
2003
1940
2004
libc_math_function (name = "rint" )
2005
+
1941
2006
libc_math_function (name = "rintf" )
2007
+
1942
2008
libc_math_function (name = "rintl" )
2009
+
1943
2010
libc_math_function (name = "rintf128" )
1944
2011
1945
2012
libc_math_function (name = "lrint" )
2013
+
1946
2014
libc_math_function (name = "lrintf" )
2015
+
1947
2016
libc_math_function (name = "lrintl" )
2017
+
1948
2018
libc_math_function (name = "lrintf128" )
1949
2019
1950
2020
libc_math_function (name = "llrint" )
2021
+
1951
2022
libc_math_function (name = "llrintf" )
2023
+
1952
2024
libc_math_function (name = "llrintl" )
2025
+
1953
2026
libc_math_function (name = "llrintf128" )
1954
2027
1955
2028
libc_math_function (name = "lround" )
2029
+
1956
2030
libc_math_function (name = "lroundf" )
2031
+
1957
2032
libc_math_function (name = "lroundl" )
2033
+
1958
2034
libc_math_function (name = "lroundf128" )
1959
2035
1960
2036
libc_math_function (name = "llround" )
2037
+
1961
2038
libc_math_function (name = "llroundf" )
2039
+
1962
2040
libc_math_function (name = "llroundl" )
2041
+
1963
2042
libc_math_function (name = "llroundf128" )
1964
2043
1965
2044
libc_math_function (
@@ -1995,20 +2074,29 @@ libc_math_function(
1995
2074
)
1996
2075
1997
2076
libc_math_function (name = "nearbyint" )
2077
+
1998
2078
libc_math_function (name = "nearbyintf" )
2079
+
1999
2080
libc_math_function (name = "nearbyintl" )
2000
2081
2001
2082
libc_math_function (name = "nextafter" )
2083
+
2002
2084
libc_math_function (name = "nextafterf" )
2085
+
2003
2086
libc_math_function (name = "nextafterl" )
2087
+
2004
2088
libc_math_function (name = "nextafterf128" )
2005
2089
2006
2090
libc_math_function (name = "nexttoward" )
2091
+
2007
2092
libc_math_function (name = "nexttowardf" )
2093
+
2008
2094
libc_math_function (name = "nexttowardl" )
2009
2095
2010
2096
libc_math_function (name = "scalbn" )
2097
+
2011
2098
libc_math_function (name = "scalbnf" )
2099
+
2012
2100
libc_math_function (name = "scalbnl" )
2013
2101
2014
2102
############################## inttypes targets ##############################
@@ -2590,6 +2678,10 @@ libc_function(
2590
2678
name = "open" ,
2591
2679
srcs = ["src/fcntl/linux/open.cpp" ],
2592
2680
hdrs = ["src/fcntl/open.h" ],
2681
+ target_compatible_with = select ({
2682
+ "@platforms//os:linux" : [],
2683
+ "//conditions:default" : ["@platforms//:incompatible" ],
2684
+ }),
2593
2685
deps = [
2594
2686
":__support_common" ,
2595
2687
":__support_osutil_syscall" ,
@@ -2601,6 +2693,10 @@ libc_function(
2601
2693
name = "openat" ,
2602
2694
srcs = ["src/fcntl/linux/openat.cpp" ],
2603
2695
hdrs = ["src/fcntl/openat.h" ],
2696
+ target_compatible_with = select ({
2697
+ "@platforms//os:linux" : [],
2698
+ "//conditions:default" : ["@platforms//:incompatible" ],
2699
+ }),
2604
2700
deps = [
2605
2701
":__support_common" ,
2606
2702
":__support_osutil_syscall" ,
@@ -2680,6 +2776,10 @@ libc_function(
2680
2776
name = "dup3" ,
2681
2777
srcs = ["src/unistd/linux/dup3.cpp" ],
2682
2778
hdrs = ["src/unistd/dup3.h" ],
2779
+ target_compatible_with = select ({
2780
+ "@platforms//os:linux" : [],
2781
+ "//conditions:default" : ["@platforms//:incompatible" ],
2782
+ }),
2683
2783
deps = [
2684
2784
":__support_common" ,
2685
2785
":__support_osutil_syscall" ,
@@ -2849,6 +2949,10 @@ libc_function(
2849
2949
name = "pread" ,
2850
2950
srcs = ["src/unistd/linux/pread.cpp" ],
2851
2951
hdrs = ["src/unistd/pread.h" ],
2952
+ target_compatible_with = select ({
2953
+ "@platforms//os:linux" : [],
2954
+ "//conditions:default" : ["@platforms//:incompatible" ],
2955
+ }),
2852
2956
deps = [
2853
2957
":__support_common" ,
2854
2958
":__support_osutil_syscall" ,
@@ -2860,6 +2964,10 @@ libc_function(
2860
2964
name = "pwrite" ,
2861
2965
srcs = ["src/unistd/linux/pwrite.cpp" ],
2862
2966
hdrs = ["src/unistd/pwrite.h" ],
2967
+ target_compatible_with = select ({
2968
+ "@platforms//os:linux" : [],
2969
+ "//conditions:default" : ["@platforms//:incompatible" ],
2970
+ }),
2863
2971
deps = [
2864
2972
":__support_common" ,
2865
2973
":__support_osutil_syscall" ,
@@ -3263,6 +3371,10 @@ libc_function(
3263
3371
name = "rename" ,
3264
3372
srcs = ["src/stdio/linux/rename.cpp" ],
3265
3373
hdrs = ["src/stdio/rename.h" ],
3374
+ target_compatible_with = select ({
3375
+ "@platforms//os:linux" : [],
3376
+ "//conditions:default" : ["@platforms//:incompatible" ],
3377
+ }),
3266
3378
deps = [
3267
3379
":__support_common" ,
3268
3380
":__support_osutil_syscall" ,
@@ -3301,6 +3413,10 @@ libc_function(
3301
3413
name = "epoll_wait" ,
3302
3414
srcs = ["src/sys/epoll/linux/epoll_wait.cpp" ],
3303
3415
hdrs = ["src/sys/epoll/epoll_wait.h" ],
3416
+ target_compatible_with = select ({
3417
+ "@platforms//os:linux" : [],
3418
+ "//conditions:default" : ["@platforms//:incompatible" ],
3419
+ }),
3304
3420
weak = True ,
3305
3421
deps = [
3306
3422
":__support_osutil_syscall" ,
@@ -3312,6 +3428,10 @@ libc_function(
3312
3428
name = "epoll_pwait" ,
3313
3429
srcs = ["src/sys/epoll/linux/epoll_pwait.cpp" ],
3314
3430
hdrs = ["src/sys/epoll/epoll_pwait.h" ],
3431
+ target_compatible_with = select ({
3432
+ "@platforms//os:linux" : [],
3433
+ "//conditions:default" : ["@platforms//:incompatible" ],
3434
+ }),
3315
3435
weak = True ,
3316
3436
deps = [
3317
3437
":__support_osutil_syscall" ,
0 commit comments