Austin Schuh | 63909e1 | 2021-04-07 21:43:27 -0700 | [diff] [blame^] | 1 | load("@//tools/build_rules:select.bzl", "compiler_select") |
| 2 | |
James Kuszmaul | bc02ff4 | 2021-01-15 20:41:30 -0800 | [diff] [blame] | 3 | cc_library( |
Austin Schuh | 63909e1 | 2021-04-07 21:43:27 -0700 | [diff] [blame^] | 4 | name = "usrsctp", |
| 5 | srcs = [ |
| 6 | "usrsctplib/netinet/sctp_asconf.c", |
| 7 | "usrsctplib/netinet/sctp_auth.c", |
| 8 | "usrsctplib/netinet/sctp_bsd_addr.c", |
| 9 | "usrsctplib/netinet/sctp_callout.c", |
| 10 | "usrsctplib/netinet/sctp_cc_functions.c", |
| 11 | "usrsctplib/netinet/sctp_crc32.c", |
| 12 | "usrsctplib/netinet/sctp_indata.c", |
| 13 | "usrsctplib/netinet/sctp_input.c", |
| 14 | "usrsctplib/netinet/sctp_output.c", |
| 15 | "usrsctplib/netinet/sctp_pcb.c", |
| 16 | "usrsctplib/netinet/sctp_peeloff.c", |
| 17 | "usrsctplib/netinet/sctp_sha1.c", |
| 18 | "usrsctplib/netinet/sctp_ss_functions.c", |
| 19 | "usrsctplib/netinet/sctp_sysctl.c", |
| 20 | "usrsctplib/netinet/sctp_timer.c", |
| 21 | "usrsctplib/netinet/sctp_userspace.c", |
| 22 | "usrsctplib/netinet/sctp_usrreq.c", |
| 23 | "usrsctplib/netinet/sctputil.c", |
| 24 | "usrsctplib/netinet6/sctp6_usrreq.c", |
| 25 | "usrsctplib/user_environment.c", |
| 26 | "usrsctplib/user_mbuf.c", |
| 27 | "usrsctplib/user_recv_thread.c", |
| 28 | "usrsctplib/user_socket.c", |
| 29 | ], |
James Kuszmaul | bc02ff4 | 2021-01-15 20:41:30 -0800 | [diff] [blame] | 30 | hdrs = glob(["usrsctplib/**/*.h"]), |
| 31 | copts = [ |
| 32 | "-Wno-cast-qual", |
| 33 | "-Wno-cast-align", |
| 34 | "-Wno-unused-parameter", |
| 35 | "-Wno-incompatible-pointer-types-discards-qualifiers", |
Austin Schuh | 63909e1 | 2021-04-07 21:43:27 -0700 | [diff] [blame^] | 36 | "-D__Userspace_os_Linux", |
| 37 | "-D__Userspace__", |
| 38 | "-D_GNU_SOURCE", |
| 39 | "-DSCTP_DEBUG", |
| 40 | "-DSCTP_SIMPLE_ALLOCATOR", |
| 41 | "-DINET", |
| 42 | "-DINET6", |
| 43 | "-DSCTP_PROCESS_LEVEL_LOCKS", |
| 44 | "-DHAVE_SYS_QUEUE_H", |
| 45 | "-DHAVE_STDATOMIC_H", |
| 46 | "-DHAVE_NETINET_IP_ICMP_H", |
| 47 | "-DHAVE_LINUX_RTNETLINK_H", |
| 48 | "-DHAVE_LINUX_IF_ADDR_H", |
| 49 | "-Wno-address-of-packed-member", |
| 50 | ] + compiler_select({ |
| 51 | "clang": [], |
| 52 | "gcc": [ |
| 53 | "-Wno-discarded-qualifiers", |
| 54 | ], |
| 55 | }), |
| 56 | includes = [ |
| 57 | "usrsctplib/", |
| 58 | "usrsctplib/netinet", |
| 59 | "usrsctplib/netinet6", |
James Kuszmaul | bc02ff4 | 2021-01-15 20:41:30 -0800 | [diff] [blame] | 60 | ], |
James Kuszmaul | bc02ff4 | 2021-01-15 20:41:30 -0800 | [diff] [blame] | 61 | target_compatible_with = ["@platforms//os:linux"], |
| 62 | visibility = ["//visibility:public"], |
| 63 | ) |