# Copyright Materialize, Inc. and contributors. All rights reserved. # # Use of this software is governed by the Business Source License # included in the LICENSE file at the root of this repository. # # As of the Change Date specified in that file, in accordance with # the Business Source License, use of this software will be governed # by the Apache License, Version 2.0. """Additive BUILD file for the decimal-sys Rust crate.""" cc_library( name = "decnumber", srcs = [ "decnumber/decContext.c", "decnumber/decDouble.c", "decnumber/decNumber.c", "decnumber/decPacked.c", "decnumber/decQuad.c", "decnumber/decSingle.c", "decnumber/decimal128.c", "decnumber/decimal32.c", "decnumber/decimal64.c", ], hdrs = [ "decnumber/decContext.h", "decnumber/decDPD.h", "decnumber/decDouble.h", "decnumber/decNumber.h", "decnumber/decNumberLocal.h", "decnumber/decPacked.h", "decnumber/decQuad.h", "decnumber/decSingle.h", "decnumber/decimal128.h", "decnumber/decimal32.h", "decnumber/decimal64.h", ], # libdecimal strongly recommends always enabling optimizations. # # See: copts = ["-O3"] + select({ "//conditions:default": ["-Wno-unused-but-set-variable"], }), defines = ["DECLITEND=1"], target_compatible_with = select({ "@//misc/bazel/platforms:linux_arm": [], "@//misc/bazel/platforms:linux_x86_64": [], "@//misc/bazel/platforms:macos_arm": [], "@//misc/bazel/platforms:macos_x86_64": [], # We can support more platforms but we'll need to take care to # correctly define `DECLITEND`. "//conditions:default": ["@platforms//:incompatible"], }), textual_hdrs = [ # The ordering of these is important. "decnumber/decCommon.c", "decnumber/decBasic.c", ], visibility = ["//visibility:public"], )