diff --git a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel index 62964ff9e805..8e1b8830e004 100644 --- a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel @@ -405,6 +405,7 @@ mlir_c_api_cc_library( ], includes = ["include"], deps = [ + ":AsmParser", ":ConversionPassIncGen", ":FuncDialect", ":InferTypeOpInterface", @@ -3244,9 +3245,9 @@ cc_library( ), includes = ["include"], deps = [ + ":AsmParser", ":IR", ":MlirLspServerSupportLib", - ":Parser", ":Support", "//llvm:Support", ], @@ -3277,11 +3278,29 @@ cc_library( ) cc_library( - name = "ParserTokenKinds", + name = "AsmParserTokenKinds", # strip_include_prefix does not apply to textual_hdrs. - hdrs = ["lib/Parser/TokenKinds.def"], - strip_include_prefix = "lib/Parser", - textual_hdrs = ["lib/Parser/TokenKinds.def"], + hdrs = ["lib/AsmParser/TokenKinds.def"], + strip_include_prefix = "lib/AsmParser", + textual_hdrs = ["lib/AsmParser/TokenKinds.def"], +) + +cc_library( + name = "AsmParser", + srcs = glob([ + "lib/AsmParser/*.cpp", + "lib/AsmParser/*.h", + ]), + hdrs = glob([ + "include/mlir/AsmParser/*.h", + ]), + includes = ["include"], + deps = [ + ":AsmParserTokenKinds", + ":IR", + ":Support", + "//llvm:Support", + ], ) cc_library( @@ -3295,8 +3314,8 @@ cc_library( ]), includes = ["include"], deps = [ + ":AsmParser", ":IR", - ":ParserTokenKinds", ":Support", "//llvm:Support", ], @@ -3591,6 +3610,7 @@ cc_library( deps = [ ":ArithmeticDialect", ":AsyncDialect", + ":AsmParser", ":ControlFlowDialect", ":DLTIDialect", ":AffineUtils", @@ -6592,6 +6612,7 @@ cc_binary( "tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp", ], deps = [ + ":AsmParser", ":IR", ":Parser", ":Support", @@ -7361,6 +7382,7 @@ cc_library( ":AffineDialect", ":ArithmeticDialect", ":ArithmeticUtils", + ":AsmParser", ":BufferizationDialect", ":ComplexDialect", ":ControlFlowInterfaces", @@ -7399,6 +7421,7 @@ cc_library( deps = [ ":AffineDialect", ":ArithmeticDialect", + ":AsmParser", ":ControlFlowDialect", ":IR", ":LinalgDialect", @@ -9199,11 +9222,11 @@ cc_library( hdrs = glob(["include/mlir/Tools/PDLL/CodeGen/*.h"]), includes = ["include"], deps = [ + ":AsmParser", ":IR", ":PDLDialect", ":PDLLAST", ":PDLLODS", - ":Parser", ":Support", "//llvm:Support", ], diff --git a/utils/bazel/llvm-project-overlay/mlir/unittests/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/unittests/BUILD.bazel index ff520048803a..a08e36db1897 100644 --- a/utils/bazel/llvm-project-overlay/mlir/unittests/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/mlir/unittests/BUILD.bazel @@ -299,8 +299,8 @@ cc_test( "//llvm:gtest_main", "//mlir:AffineAnalysis", "//mlir:Analysis", + "//mlir:AsmParser", "//mlir:IR", - "//mlir:Parser", ], )