blob: 18eb678dedb840ab435d7bc285ad4ed9f4582dc8 [file] [log] [blame]
# Copyright 2020 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/package.gni")
import("//build/rust/rustc_library.gni")
import("//build/test/test_package.gni")
rustc_library("surpass") {
name = "surpass"
with_unit_tests = true
version = "0.1.0"
edition = "2018"
deps = [
"//third_party/rust_crates:rayon",
"//third_party/rust_crates:rustc-hash",
]
# TODO(fxbug.dev/56138): Fix the leaks and remove this.
test_deps = [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ]
configs += [ ":surpass-performance" ]
sources = [
"src/extend.rs",
"src/layer.rs",
"src/lib.rs",
"src/painter/buffer_layout.rs",
"src/painter/mod.rs",
"src/point.rs",
"src/rasterizer/mod.rs",
"src/rasterizer/raster_segment.rs",
"src/segment.rs",
"src/simd.rs",
"src/uninitialized.rs",
]
}
config("surpass-performance") {
rustflags = [ "-Copt-level=3" ]
if (board_name == "chromebook-x64") {
rustflags += [ "-Ctarget-cpu=skylake" ]
}
if (board_name == "astro" || board_name == "sherlock") {
rustflags += [ "-Ctarget-cpu=cortex-a53" ]
}
}
unittest_package("surpass-tests") {
deps = [ ":surpass_test" ]
tests = [
{
name = "surpass_lib_test"
environments = basic_envs
},
]
}