@@ -931,11 +931,14 @@ exports_files(
931
931
# Some out-of-tree projects alias @python_runtime//:headers to
932
932
# @local_config_python//:python_headers.
933
933
934
- MLIR_BINDINGS_PYTHON_HEADERS = [
935
- "lib/Bindings/Python/*.h" ,
936
- "include/mlir-c/Bindings/Python/*.h" ,
937
- "include/mlir/Bindings/Python/*.h" ,
938
- ]
934
+ filegroup (
935
+ name = "MLIRBindingsPythonHeaderFiles" ,
936
+ srcs = glob ([
937
+ "lib/Bindings/Python/*.h" ,
938
+ "include/mlir-c/Bindings/Python/*.h" ,
939
+ "include/mlir/Bindings/Python/*.h" ,
940
+ ]),
941
+ )
939
942
940
943
cc_library (
941
944
name = "MLIRBindingsPythonHeaders" ,
@@ -947,7 +950,7 @@ cc_library(
947
950
"manual" , # External dependency
948
951
"nobuildkite" , # TODO(gcmn): Add support for this target
949
952
],
950
- textual_hdrs = glob ( MLIR_BINDINGS_PYTHON_HEADERS ) ,
953
+ textual_hdrs = [ ":MLIRBindingsPythonHeaderFiles" ] ,
951
954
deps = [
952
955
":CAPIIRHeaders" ,
953
956
":CAPITransformsHeaders" ,
@@ -966,7 +969,7 @@ cc_library(
966
969
"manual" , # External dependency
967
970
"nobuildkite" , # TODO(gcmn): Add support for this target
968
971
],
969
- textual_hdrs = glob ( MLIR_BINDINGS_PYTHON_HEADERS ) ,
972
+ textual_hdrs = [ ":MLIRBindingsPythonHeaderFiles" ] ,
970
973
deps = [
971
974
":CAPIIR" ,
972
975
":CAPITransforms" ,
@@ -986,20 +989,23 @@ PYBIND11_FEATURES = [
986
989
"-use_header_modules" ,
987
990
]
988
991
989
- MLIR_PYTHON_BINDINGS_SOURCES = [
990
- "lib/Bindings/Python/IRAffine.cpp" ,
991
- "lib/Bindings/Python/IRAttributes.cpp" ,
992
- "lib/Bindings/Python/IRCore.cpp" ,
993
- "lib/Bindings/Python/IRInterfaces.cpp" ,
994
- "lib/Bindings/Python/IRModule.cpp" ,
995
- "lib/Bindings/Python/IRTypes.cpp" ,
996
- "lib/Bindings/Python/Pass.cpp" ,
997
- "lib/Bindings/Python/Rewrite.cpp" ,
998
- ]
992
+ filegroup (
993
+ name = "MLIRBindingsPythonSourceFiles" ,
994
+ srcs = [
995
+ "lib/Bindings/Python/IRAffine.cpp" ,
996
+ "lib/Bindings/Python/IRAttributes.cpp" ,
997
+ "lib/Bindings/Python/IRCore.cpp" ,
998
+ "lib/Bindings/Python/IRInterfaces.cpp" ,
999
+ "lib/Bindings/Python/IRModule.cpp" ,
1000
+ "lib/Bindings/Python/IRTypes.cpp" ,
1001
+ "lib/Bindings/Python/Pass.cpp" ,
1002
+ "lib/Bindings/Python/Rewrite.cpp" ,
1003
+ ],
1004
+ )
999
1005
1000
1006
cc_library (
1001
1007
name = "MLIRBindingsPythonCore" ,
1002
- srcs = MLIR_PYTHON_BINDINGS_SOURCES ,
1008
+ srcs = [ ":MLIRBindingsPythonSourceFiles" ] ,
1003
1009
copts = PYBIND11_COPTS ,
1004
1010
features = PYBIND11_FEATURES ,
1005
1011
tags = [
@@ -1022,7 +1028,7 @@ cc_library(
1022
1028
1023
1029
cc_library (
1024
1030
name = "MLIRBindingsPythonCoreNoCAPI" ,
1025
- srcs = MLIR_PYTHON_BINDINGS_SOURCES ,
1031
+ srcs = [ ":MLIRBindingsPythonSourceFiles" ] ,
1026
1032
copts = PYBIND11_COPTS ,
1027
1033
features = PYBIND11_FEATURES ,
1028
1034
tags = [
0 commit comments