/ sys / BUILD
BUILD
 1  # Copyright 2023 Harmoniis Inc.
 2  # 
 3  # Licensed under the Apache License, Version 2.0 (the "License");
 4  # you may not use this file except in compliance with the License.
 5  # You may obtain a copy of the License at
 6  # 
 7  #     http://www.apache.org/licenses/LICENSE-2.0
 8  # 
 9  # Unless required by applicable law or agreed to in writing, software
10  # distributed under the License is distributed on an "AS IS" BASIS,
11  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  # See the License for the specific language governing permissions and
13  # limitations under the License.
14  
15  
16  cc_library(
17      name = "sys",
18      srcs = select({
19          ":freebsd-x86_64": ["sys.h"],
20          ":android_aarch64": ["source_android_aarch64.cpp"],
21          ":ios_aarch64": ["source_ios_aarch64.cpp"],
22          ":macos_aarch64": ["source_macos_aarch64.cpp"],
23          "//conditions:default": ["source_default.cpp"],
24      }),
25      srcs = ["sys.h"],
26  )
27  
28  rust_bindgen_library(
29      name = "sys_bindgen",
30      bindgen_flags = [
31          "--allowlist-var=sys_.*",
32      ],
33      cc_lib = ":sys",
34      header = "sys.h",
35  )