File tree Expand file tree Collapse file tree 4 files changed +45
-6
lines changed Expand file tree Collapse file tree 4 files changed +45
-6
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ cc_library(
26
26
srcs = ["gpu.cc" ],
27
27
copts = ["-Wno-vla-cxx-extension" ],
28
28
deps = [
29
- "@llvm-project//mlir:CAPIIR" ,
30
29
"@xla//xla/ffi:ffi_api" ,
31
30
"@xla//xla/ffi/api:ffi" ,
32
31
],
@@ -36,7 +35,6 @@ cc_library(
36
35
name = "cpu" ,
37
36
srcs = ["cpu.cc" ],
38
37
deps = [
39
- "@llvm-project//mlir:CAPIIR" ,
40
38
"@xla//xla/service:custom_call_status" ,
41
39
"@xla//xla/service:custom_call_target_registry" ,
42
40
],
@@ -603,7 +601,6 @@ cc_library(
603
601
"@llvm-project//mlir:VectorToLLVM" ,
604
602
"@llvm-project//mlir:VectorToSCF" ,
605
603
"@llvm-project//mlir:ViewLikeInterface" ,
606
- "@llvm-project//mlir:CAPIIR" ,
607
604
"@shardy//shardy/dialect/sdy/ir:dialect" ,
608
605
"@shardy//shardy/dialect/sdy/transforms/propagation:op_sharding_rule_builder" ,
609
606
"@stablehlo//:base" ,
Original file line number Diff line number Diff line change 80
80
81
81
#include " mlir/Target/LLVMIR/Export.h"
82
82
83
- #include " mlir-c/Support.h"
83
+ #if (defined(_WIN32) || defined(__CYGWIN__)) && \
84
+ !defined(MLIR_CAPI_ENABLE_WINDOWS_DLL_DECLSPEC)
85
+ // Visibility annotations disabled.
86
+ #define MLIR_CAPI_EXPORTED
87
+ #elif defined(_WIN32) || defined(__CYGWIN__)
88
+ // Windows visibility declarations.
89
+ #if MLIR_CAPI_BUILDING_LIBRARY
90
+ #define MLIR_CAPI_EXPORTED __declspec (dllexport)
91
+ #else
92
+ #define MLIR_CAPI_EXPORTED __declspec (dllimport)
93
+ #endif
94
+ #else
95
+ // Non-windows: use visibility attributes.
96
+ #define MLIR_CAPI_EXPORTED __attribute__ ((visibility(" default" )))
97
+ #endif
84
98
85
99
#define DEBUG_TYPE " lower-jit"
86
100
Original file line number Diff line number Diff line change 2
2
#include " xla/service/custom_call_target_registry.h"
3
3
#include < cstring>
4
4
5
- #include " mlir-c/Support.h"
5
+ #if (defined(_WIN32) || defined(__CYGWIN__)) && \
6
+ !defined(MLIR_CAPI_ENABLE_WINDOWS_DLL_DECLSPEC)
7
+ // Visibility annotations disabled.
8
+ #define MLIR_CAPI_EXPORTED
9
+ #elif defined(_WIN32) || defined(__CYGWIN__)
10
+ // Windows visibility declarations.
11
+ #if MLIR_CAPI_BUILDING_LIBRARY
12
+ #define MLIR_CAPI_EXPORTED __declspec (dllexport)
13
+ #else
14
+ #define MLIR_CAPI_EXPORTED __declspec (dllimport)
15
+ #endif
16
+ #else
17
+ // Non-windows: use visibility attributes.
18
+ #define MLIR_CAPI_EXPORTED __attribute__ ((visibility(" default" )))
19
+ #endif
6
20
7
21
template <bool withError> struct CallInfo ;
8
22
Original file line number Diff line number Diff line change 1
1
#include " xla/ffi/api/ffi.h"
2
2
#include " xla/ffi/ffi_api.h"
3
3
4
- #include " mlir-c/Support.h"
4
+ #if (defined(_WIN32) || defined(__CYGWIN__)) && \
5
+ !defined(MLIR_CAPI_ENABLE_WINDOWS_DLL_DECLSPEC)
6
+ // Visibility annotations disabled.
7
+ #define MLIR_CAPI_EXPORTED
8
+ #elif defined(_WIN32) || defined(__CYGWIN__)
9
+ // Windows visibility declarations.
10
+ #if MLIR_CAPI_BUILDING_LIBRARY
11
+ #define MLIR_CAPI_EXPORTED __declspec (dllexport)
12
+ #else
13
+ #define MLIR_CAPI_EXPORTED __declspec (dllimport)
14
+ #endif
15
+ #else
16
+ // Non-windows: use visibility attributes.
17
+ #define MLIR_CAPI_EXPORTED __attribute__ ((visibility(" default" )))
18
+ #endif
5
19
6
20
template <bool withError> struct CallInfo ;
7
21
You can’t perform that action at this time.
0 commit comments