diff options
Diffstat (limited to 'utils/bazel')
6 files changed, 166 insertions, 5 deletions
diff --git a/utils/bazel/llvm-project-overlay/clang-tools-extra/clang-query/BUILD.bazel b/utils/bazel/llvm-project-overlay/clang-tools-extra/clang-query/BUILD.bazel new file mode 100644 index 0000000..05fcbf7 --- /dev/null +++ b/utils/bazel/llvm-project-overlay/clang-tools-extra/clang-query/BUILD.bazel @@ -0,0 +1,28 @@ +# This file is licensed under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +load("@rules_cc//cc:defs.bzl", "cc_library") + +package( + default_visibility = ["//visibility:public"], + features = ["layering_check"], +) + +licenses(["notice"]) + +cc_library( + name = "lib", + srcs = glob(["*.cpp"]), + hdrs = glob(["*.h"]), + deps = [ + "//clang:ast", + "//clang:ast_matchers", + "//clang:ast_matchers_dynamic", + "//clang:basic", + "//clang:frontend", + "//clang:serialization", + "//llvm:LineEditor", + "//llvm:Support", + ], +) diff --git a/utils/bazel/llvm-project-overlay/clang-tools-extra/clang-tidy/BUILD.bazel b/utils/bazel/llvm-project-overlay/clang-tools-extra/clang-tidy/BUILD.bazel index 2808288..baad2cf 100644 --- a/utils/bazel/llvm-project-overlay/clang-tools-extra/clang-tidy/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/clang-tools-extra/clang-tidy/BUILD.bazel @@ -23,6 +23,11 @@ bool_flag( build_setting_default = True, ) +bool_flag( + name = "enable_custom_checks", + build_setting_default = True, +) + config_setting( name = "static_analyzer_enabled", flag_values = { @@ -30,13 +35,25 @@ config_setting( }, ) +config_setting( + name = "custom_checks_enabled", + flag_values = { + ":enable_custom_checks": "true", + }, +) + expand_template( name = "config", out = "clang-tidy-config.h", substitutions = - { - "#cmakedefine01 CLANG_TIDY_ENABLE_QUERY_BASED_CUSTOM_CHECKS": "#define CLANG_TIDY_ENABLE_QUERY_BASED_CUSTOM_CHECKS 0", - } | select({ + select({ + ":custom_checks_enabled": { + "#cmakedefine01 CLANG_TIDY_ENABLE_QUERY_BASED_CUSTOM_CHECKS": "#define CLANG_TIDY_ENABLE_QUERY_BASED_CUSTOM_CHECKS 1", + }, + "//conditions:default": { + "#cmakedefine01 CLANG_TIDY_ENABLE_QUERY_BASED_CUSTOM_CHECKS": "#define CLANG_TIDY_ENABLE_QUERY_BASED_CUSTOM_CHECKS 0", + }, + }) | select({ ":static_analyzer_enabled": { "#cmakedefine01 CLANG_TIDY_ENABLE_STATIC_ANALYZER": "#define CLANG_TIDY_ENABLE_STATIC_ANALYZER 1", }, @@ -209,6 +226,15 @@ clang_tidy_library( ) clang_tidy_library( + name = "custom", + deps = [ + ":lib", + "//clang:ast_matchers_dynamic", + "//clang-tools-extra/clang-query:lib", + ], +) + +clang_tidy_library( name = "concurrency", deps = [":lib"], ) @@ -365,6 +391,9 @@ CHECKS = [ ] + select({ ":static_analyzer_enabled": [":mpi"], "//conditions:default": [], +}) + select({ + ":custom_checks_enabled": [":custom"], + "//conditions:default": [], }) cc_library( diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel index 936bc12..5d87e32 100644 --- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel @@ -1502,6 +1502,21 @@ libc_support_library( ) libc_support_library( + name = "__support_osutil_linux_auxv", + hdrs = ["src/__support/OSUtil/linux/auxv.h"], + target_compatible_with = select({ + "@platforms//os:linux": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + deps = [ + ":__support_common", + ":__support_osutil_syscall", + ":__support_threads_callonce", + ":hdr_fcntl_macros", + ], +) + +libc_support_library( name = "__support_osutil_vdso", hdrs = [ "src/__support/OSUtil/linux/vdso.h", @@ -2933,6 +2948,22 @@ libc_support_library( ) libc_support_library( + name = "__support_math_exp2m1f", + hdrs = ["src/__support/math/exp2m1f.h"], + deps = [ + ":__support_fputil_except_value_utils", + ":__support_fputil_fma", + ":__support_fputil_multiply_add", + ":__support_fputil_nearest_integer", + ":__support_fputil_polyeval", + ":__support_fputil_rounding_mode", + ":__support_macros_optimization", + ":__support_math_common_constants", + ":__support_math_exp10f_utils", + ], +) + +libc_support_library( name = "__support_math_exp10", hdrs = ["src/__support/math/exp10.h"], deps = [ @@ -3719,8 +3750,7 @@ libc_math_function( libc_math_function( name = "exp2m1f", additional_deps = [ - ":__support_fputil_polyeval", - ":__support_math_exp10f_utils", + ":__support_math_exp2m1f", ], ) @@ -6336,6 +6366,19 @@ libc_function( ], ) +# WARNING: NOT FULLY IMPLEMENTED, FOR TESTING USE ONLY +libc_function( + name = "sysconf", + srcs = ["src/unistd/linux/sysconf.cpp"], + hdrs = ["src/unistd/sysconf.h"], + deps = [ + ":__support_common", + ":__support_osutil_linux_auxv", + ":errno", + ":hdr_unistd_macros", + ], +) + libc_function( name = "write", srcs = ["src/unistd/linux/write.cpp"], diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/sys/mman/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/sys/mman/BUILD.bazel index e2c7f7a..6de76e2 100644 --- a/utils/bazel/llvm-project-overlay/libc/test/src/sys/mman/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/libc/test/src/sys/mman/BUILD.bazel @@ -30,6 +30,7 @@ libc_test( "//libc:mmap", "//libc:munlock", "//libc:munmap", + "//libc:sysconf", ], ) @@ -48,6 +49,7 @@ libc_test( "//libc:munlock", "//libc:munlockall", "//libc:munmap", + "//libc:sysconf", ], ) @@ -89,6 +91,7 @@ libc_test( "//libc:msync", "//libc:munlock", "//libc:munmap", + "//libc:sysconf", ], ) @@ -111,6 +114,7 @@ libc_test( "//libc:munmap", "//libc:open", "//libc:remap_file_pages", + "//libc:sysconf", ], ) diff --git a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel index 74d632b..086e571 100644 --- a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel @@ -713,6 +713,19 @@ mlir_c_api_cc_library( ) mlir_c_api_cc_library( + name = "CAPIShape", + srcs = ["lib/CAPI/Dialect/Shape.cpp"], + hdrs = ["include/mlir-c/Dialect/Shape.h"], + capi_deps = [ + ":CAPIIR", + ], + includes = ["include"], + deps = [ + ":ShapeDialect", + ], +) + +mlir_c_api_cc_library( name = "CAPITarget", srcs = ["lib/CAPI/Target/LLVMIR.cpp"], hdrs = ["include/mlir-c/Target/LLVMIR.h"], @@ -734,6 +747,19 @@ mlir_c_api_cc_library( ) mlir_c_api_cc_library( + name = "CAPITensor", + srcs = ["lib/CAPI/Dialect/Tensor.cpp"], + hdrs = ["include/mlir-c/Dialect/Tensor.h"], + capi_deps = [ + ":CAPIIR", + ], + includes = ["include"], + deps = [ + ":TensorDialect", + ], +) + +mlir_c_api_cc_library( name = "CAPIGPU", srcs = [ "lib/CAPI/Dialect/GPU.cpp", @@ -7040,6 +7066,7 @@ cc_library( ]), includes = ["include"], deps = [ + ":AMDGPUUtils", ":ConversionPassIncGen", ":DialectUtils", ":FuncDialect", @@ -7053,6 +7080,7 @@ cc_library( ":ROCDLDialect", ":TransformUtils", ":VectorDialect", + "//llvm:Support", ], ) @@ -14199,6 +14227,7 @@ cc_library( ":TransformUtils", ":VectorDialect", ":XeGPUDialect", + ":XeGPUUtils", ":XeVMDialect", "//llvm:Support", ], diff --git a/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel index 102c416..0a84bd2 100644 --- a/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel @@ -633,6 +633,34 @@ filegroup( ) ##---------------------------------------------------------------------------## +# OpenACC dialect. +##---------------------------------------------------------------------------## + +gentbl_filegroup( + name = "OpenACCOpsPyGen", + tbl_outs = {"mlir/dialects/_acc_ops_gen.py": [ + "-gen-python-op-bindings", + "-bind-dialect=acc", + ]}, + tblgen = "//mlir:mlir-tblgen", + td_file = "mlir/dialects/OpenACCOps.td", + deps = [ + "//mlir:BuiltinDialectTdFiles", + "//mlir:OpBaseTdFiles", + "//mlir:OpenAccOpsTdFiles", + "//mlir:SideEffectInterfacesTdFiles", + ], +) + +filegroup( + name = "OpenACCOpsPyFiles", + srcs = [ + "mlir/dialects/openacc.py", + ":OpenACCOpsPyGen", + ], +) + +##---------------------------------------------------------------------------## # OpenMP dialect. ##---------------------------------------------------------------------------## |