Skip to content

Commit

Permalink
[bazel] Fixes for 7f37b34, 0165e33 and 3c64f86
Browse files Browse the repository at this point in the history
  • Loading branch information
slackito committed Jan 28, 2025
1 parent a4d17c4 commit b108fbe
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,32 @@ cc_library(
),
)

libc_support_library(
name = "mp_common",
srcs = ["MPCommon.cpp"],
hdrs = ["MPCommon.h"],
# Disable layering check when using mpfr_system.
features = select(
{
"//conditions:default": [],
"//libc:mpfr_system": ["-layering_check"],
},
),
deps = [
"//libc:__support_common",
"//libc:__support_cpp_string",
"//libc:__support_cpp_string_view",
"//libc:__support_cpp_type_traits",
"//libc:__support_fputil_cast",
"//libc:__support_fputil_fp_bits",
"//libc:__support_macros_config",
"//libc:__support_macros_properties_types",
"//libc/test/UnitTest:fp_test_helpers",
"//libc/utils/MPFRWrapper:mpfr_impl",
"@gmp//:gmp_",
],
)

libc_support_library(
name = "mpfr_wrapper",
srcs = ["MPFRUtils.cpp"],
Expand All @@ -38,6 +64,7 @@ libc_support_library(
},
),
deps = [
":mp_common",
"//libc:__support_common",
"//libc:__support_cpp_array",
"//libc:__support_cpp_bit",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,7 @@ cc_test(
"//llvm:Support",
"//llvm:TargetParser",
"//llvm:TestingSupport",
"//third-party/unittest:gmock",
"//third-party/unittest:gtest",
"//third-party/unittest:gtest_main",
],
Expand Down
27 changes: 26 additions & 1 deletion utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,36 @@ exports_files(glob(["include/**/*.td"]))
deps = [":OpBaseTdFiles"],
)
for name in [
"OpAsmInterface",
"RegionKindInterface",
"SymbolInterfaces",
]
]

gentbl_cc_library(
name = "OpAsmInterfaceIncGen",
tbl_outs = [
(
["-gen-op-interface-decls"],
"include/mlir/IR/OpAsmOpInterface.h.inc",
),
(
["-gen-op-interface-defs"],
"include/mlir/IR/OpAsmOpInterface.cpp.inc",
),
(
["-gen-type-interface-decls"],
"include/mlir/IR/OpAsmTypeInterface.h.inc",
),
(
["-gen-type-interface-defs"],
"include/mlir/IR/OpAsmTypeInterface.cpp.inc",
),
],
tblgen = ":mlir-tblgen",
td_file = "include/mlir/IR/OpAsmInterface.td",
deps = [":OpBaseTdFiles"],
)

gentbl_cc_library(
name = "TensorEncodingIncGen",
tbl_outs = [
Expand Down Expand Up @@ -356,6 +380,7 @@ cc_library(
hdrs = glob([
"include/mlir/IR/*.h",
]) + [
"include/mlir/IR/OpAsmOpInterface.h.inc",
"include/mlir/Interfaces/FoldInterfaces.h",
],
includes = ["include"],
Expand Down

0 comments on commit b108fbe

Please sign in to comment.