blob: 526c5598e1e21fbf0c5ab219dbf810577d2c3dfe [file] [log] [blame]
# Copyright 2021 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/rust/rustc_library.gni")
import("//src/starnix/build/args.gni")
rustc_library("linux_uapi") {
edition = "2024"
sources = [
"src/lib.rs",
"src/macros.rs",
"src/manual.rs",
"src/types.rs",
]
if (current_cpu == "x64") {
sources += [ "src/x86_64.rs" ]
} else if (current_cpu == "arm64") {
sources += [
"src/arm.rs",
"src/arm64.rs",
"src/arm_manual.rs",
"src/arm_manual_kgsl.rs",
]
} else if (current_cpu == "riscv64") {
sources += [ "src/riscv64.rs" ]
} else {
assert(false, "Need uapi definition for the '$current_cpu` architecture")
}
if (current_cpu != "arm64") {
sources += [ "src/arch32_stub.rs" ]
}
deps = [
"//third_party/rust_crates:static_assertions",
"//third_party/rust_crates:zerocopy",
]
configs += [ "//src/starnix/build:kernel_library_config" ]
disable_clippy = true
}