@@ -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
@@ -622,12 +626,12 @@ libc_support_library(
622
626
name = "__support_fputil_basic_operations" ,
623
627
hdrs = ["src/__support/FPUtil/BasicOperations.h" ],
624
628
deps = [
625
- ":__support_fputil_fenv_impl" ,
626
- ":__support_macros_optimization" ,
627
- ":__support_uint128" ,
628
629
":__support_common" ,
629
630
":__support_cpp_type_traits" ,
631
+ ":__support_fputil_fenv_impl" ,
630
632
":__support_fputil_fp_bits" ,
633
+ ":__support_macros_optimization" ,
634
+ ":__support_uint128" ,
631
635
],
632
636
)
633
637
@@ -974,11 +978,17 @@ libc_support_library(
974
978
libc_support_library (
975
979
name = "__support_osutil_syscall" ,
976
980
hdrs = ["src/__support/OSUtil/syscall.h" ],
977
- textual_hdrs = [
978
- "src/__support/OSUtil/linux/syscall.h" ,
979
- "src/__support/OSUtil/linux/aarch64/syscall.h" ,
980
- "src/__support/OSUtil/linux/x86_64/syscall.h" ,
981
- ],
981
+ textual_hdrs = select ({
982
+ "@platforms//os:macos" : [
983
+ "src/__support/OSUtil/darwin/syscall.h" ,
984
+ "src/__support/OSUtil/darwin/arm/syscall.h" ,
985
+ ],
986
+ "//conditions:default" : [
987
+ "src/__support/OSUtil/linux/syscall.h" ,
988
+ "src/__support/OSUtil/linux/aarch64/syscall.h" ,
989
+ "src/__support/OSUtil/linux/x86_64/syscall.h" ,
990
+ ],
991
+ }),
982
992
deps = [
983
993
":__support_common" ,
984
994
":__support_cpp_bit" ,
@@ -988,9 +998,10 @@ libc_support_library(
988
998
libc_support_library (
989
999
name = "__support_osutil_io" ,
990
1000
hdrs = ["src/__support/OSUtil/io.h" ],
991
- textual_hdrs = [
992
- "src/__support/OSUtil/linux/io.h" ,
993
- ],
1001
+ textual_hdrs = select ({
1002
+ "@platforms//os:macos" : ["src/__support/OSUtil/darwin/io.h" ],
1003
+ "//conditions:default" : ["src/__support/OSUtil/linux/io.h" ],
1004
+ }),
994
1005
deps = [
995
1006
":__support_common" ,
996
1007
":__support_cpp_string_view" ,
@@ -1001,8 +1012,12 @@ libc_support_library(
1001
1012
1002
1013
libc_support_library (
1003
1014
name = "__support_osutil_quick_exit" ,
1004
- hdrs = ["src/__support/OSUtil/quick_exit.h" ],
1005
1015
srcs = ["src/__support/OSUtil/linux/quick_exit.cpp" ],
1016
+ hdrs = ["src/__support/OSUtil/quick_exit.h" ],
1017
+ target_compatible_with = select ({
1018
+ "@platforms//os:linux" : [],
1019
+ "//conditions:default" : ["@platforms//:incompatible" ],
1020
+ }),
1006
1021
deps = [
1007
1022
":__support_osutil_syscall" ,
1008
1023
],
@@ -1021,6 +1036,10 @@ libc_support_library(
1021
1036
"src/__support/StringUtil/error_to_string.h" ,
1022
1037
"src/__support/StringUtil/signal_to_string.h" ,
1023
1038
],
1039
+ target_compatible_with = select ({
1040
+ "@platforms//os:linux" : [],
1041
+ "//conditions:default" : ["@platforms//:incompatible" ],
1042
+ }),
1024
1043
deps = [
1025
1044
":__support_cpp_array" ,
1026
1045
":__support_cpp_span" ,
@@ -1038,6 +1057,10 @@ libc_support_library(
1038
1057
"src/__support/threads/mutex.h" ,
1039
1058
"src/__support/threads/mutex_common.h" ,
1040
1059
],
1060
+ target_compatible_with = select ({
1061
+ "@platforms//os:linux" : [],
1062
+ "//conditions:default" : ["@platforms//:incompatible" ],
1063
+ }),
1041
1064
textual_hdrs = [
1042
1065
"src/__support/threads/linux/mutex.h" ,
1043
1066
"src/__support/threads/linux/futex_word.h" ,
@@ -1934,7 +1957,12 @@ libc_math_function(name = "copysignf")
1934
1957
1935
1958
libc_math_function (name = "copysignl" )
1936
1959
1937
- libc_math_function (name = "copysignf128" )
1960
+ libc_math_function (
1961
+ name = "copysignf128" ,
1962
+ additional_deps = [
1963
+ ":llvm_libc_types_float128" ,
1964
+ ],
1965
+ )
1938
1966
1939
1967
libc_math_function (name = "ilogb" )
1940
1968
@@ -2600,6 +2628,10 @@ libc_function(
2600
2628
name = "open" ,
2601
2629
srcs = ["src/fcntl/linux/open.cpp" ],
2602
2630
hdrs = ["src/fcntl/open.h" ],
2631
+ target_compatible_with = select ({
2632
+ "@platforms//os:linux" : [],
2633
+ "//conditions:default" : ["@platforms//:incompatible" ],
2634
+ }),
2603
2635
deps = [
2604
2636
":__support_common" ,
2605
2637
":__support_osutil_syscall" ,
@@ -2611,6 +2643,10 @@ libc_function(
2611
2643
name = "openat" ,
2612
2644
srcs = ["src/fcntl/linux/openat.cpp" ],
2613
2645
hdrs = ["src/fcntl/openat.h" ],
2646
+ target_compatible_with = select ({
2647
+ "@platforms//os:linux" : [],
2648
+ "//conditions:default" : ["@platforms//:incompatible" ],
2649
+ }),
2614
2650
deps = [
2615
2651
":__support_common" ,
2616
2652
":__support_osutil_syscall" ,
@@ -2690,6 +2726,10 @@ libc_function(
2690
2726
name = "dup3" ,
2691
2727
srcs = ["src/unistd/linux/dup3.cpp" ],
2692
2728
hdrs = ["src/unistd/dup3.h" ],
2729
+ target_compatible_with = select ({
2730
+ "@platforms//os:linux" : [],
2731
+ "//conditions:default" : ["@platforms//:incompatible" ],
2732
+ }),
2693
2733
deps = [
2694
2734
":__support_common" ,
2695
2735
":__support_osutil_syscall" ,
@@ -2859,6 +2899,10 @@ libc_function(
2859
2899
name = "pread" ,
2860
2900
srcs = ["src/unistd/linux/pread.cpp" ],
2861
2901
hdrs = ["src/unistd/pread.h" ],
2902
+ target_compatible_with = select ({
2903
+ "@platforms//os:linux" : [],
2904
+ "//conditions:default" : ["@platforms//:incompatible" ],
2905
+ }),
2862
2906
deps = [
2863
2907
":__support_common" ,
2864
2908
":__support_osutil_syscall" ,
@@ -2870,6 +2914,10 @@ libc_function(
2870
2914
name = "pwrite" ,
2871
2915
srcs = ["src/unistd/linux/pwrite.cpp" ],
2872
2916
hdrs = ["src/unistd/pwrite.h" ],
2917
+ target_compatible_with = select ({
2918
+ "@platforms//os:linux" : [],
2919
+ "//conditions:default" : ["@platforms//:incompatible" ],
2920
+ }),
2873
2921
deps = [
2874
2922
":__support_common" ,
2875
2923
":__support_osutil_syscall" ,
@@ -3272,6 +3320,10 @@ libc_function(
3272
3320
name = "rename" ,
3273
3321
srcs = ["src/stdio/linux/rename.cpp" ],
3274
3322
hdrs = ["src/stdio/rename.h" ],
3323
+ target_compatible_with = select ({
3324
+ "@platforms//os:linux" : [],
3325
+ "//conditions:default" : ["@platforms//:incompatible" ],
3326
+ }),
3275
3327
deps = [
3276
3328
":__support_common" ,
3277
3329
":__support_osutil_syscall" ,
@@ -3310,6 +3362,10 @@ libc_function(
3310
3362
name = "epoll_wait" ,
3311
3363
srcs = ["src/sys/epoll/linux/epoll_wait.cpp" ],
3312
3364
hdrs = ["src/sys/epoll/epoll_wait.h" ],
3365
+ target_compatible_with = select ({
3366
+ "@platforms//os:linux" : [],
3367
+ "//conditions:default" : ["@platforms//:incompatible" ],
3368
+ }),
3313
3369
weak = True ,
3314
3370
deps = [
3315
3371
":__support_osutil_syscall" ,
@@ -3321,6 +3377,10 @@ libc_function(
3321
3377
name = "epoll_pwait" ,
3322
3378
srcs = ["src/sys/epoll/linux/epoll_pwait.cpp" ],
3323
3379
hdrs = ["src/sys/epoll/epoll_pwait.h" ],
3380
+ target_compatible_with = select ({
3381
+ "@platforms//os:linux" : [],
3382
+ "//conditions:default" : ["@platforms//:incompatible" ],
3383
+ }),
3324
3384
weak = True ,
3325
3385
deps = [
3326
3386
":__support_osutil_syscall" ,
0 commit comments