blob: 0a55344f312338d8683c372038eb2a9177744f2f [file] [log] [blame] [edit]
# 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/rust/rustc_library.gni")
import("//src/sys/build/components.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/painter/style.rs",
"src/point.rs",
"src/rasterizer/mod.rs",
"src/rasterizer/raster_segment.rs",
"src/segment.rs",
"src/simd/auto.rs",
"src/simd/avx.rs",
"src/simd/mod.rs",
"src/uninitialized.rs",
]
}
config("surpass-performance") {
rustflags = [ "-Copt-level=3" ]
if (target_cpu == "x64") {
rustflags += [ "-Ctarget-cpu=haswell" ]
}
if (target_cpu == "arm64") {
rustflags += [ "-Ctarget-cpu=cortex-a53" ]
}
}
fuchsia_unittest_package("surpass-tests") {
deps = [ ":surpass_test" ]
}