Skip to content

Commit bf353a7

Browse files
committed
Revert "[mlir] Workaround for export lib generation on Windows for mlir_arm_sme_abi_stubs (#73147)"
This reverts commit 6248c24. broke the bots
1 parent bda723f commit bf353a7

File tree

2 files changed

+5
-20
lines changed

2 files changed

+5
-20
lines changed

mlir/lib/ExecutionEngine/ArmSMEStubs.cpp

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,6 @@
1010
#include <cstdint>
1111
#include <iostream>
1212

13-
#if (defined(_WIN32) || defined(__CYGWIN__))
14-
#ifndef MLIR_ARMSMEABISTUBS_EXPORTED
15-
#ifdef mlir_arm_sme_abi_stubs_EXPORTS
16-
// We are building this library
17-
#define MLIR_ARMSMEABISTUBS_EXPORTED __declspec(dllexport)
18-
#else
19-
// We are using this library
20-
#define MLIR_ARMSMEABISTUBS_EXPORTED __declspec(dllimport)
21-
#endif // mlir_arm_sme_abi_stubs_EXPORTS
22-
#endif // MLIR_ARMSMEABISTUBS_EXPORTED
23-
#else
24-
#define MLIR_ARMSMEABISTUBS_EXPORTED __attribute__((visibility("default")) LLVM_ATTRIBUTE_WEAK
25-
#endif // (defined(_WIN32) || defined(__CYGWIN__))
26-
2713
// The actual implementation of these routines is in:
2814
// compiler-rt/lib/builtins/aarch64/sme-abi.S. These stubs allow the current
2915
// ArmSME tests to run without depending on compiler-rt. This works as we don't
@@ -33,7 +19,7 @@
3319

3420
extern "C" {
3521

36-
bool MLIR_ARMSMEABISTUBS_EXPORTED __aarch64_sme_accessible() {
22+
bool LLVM_ATTRIBUTE_WEAK __aarch64_sme_accessible() {
3723
// The ArmSME tests are run within an emulator so we assume SME is available.
3824
return true;
3925
}
@@ -43,20 +29,20 @@ struct sme_state {
4329
int64_t x1;
4430
};
4531

46-
sme_state MLIR_ARMSMEABISTUBS_EXPORTED __arm_sme_state() {
32+
sme_state LLVM_ATTRIBUTE_WEAK __arm_sme_state() {
4733
std::cerr << "[warning] __arm_sme_state() stubbed!\n";
4834
return sme_state{};
4935
}
5036

51-
void MLIR_ARMSMEABISTUBS_EXPORTED __arm_tpidr2_restore() {
37+
void LLVM_ATTRIBUTE_WEAK __arm_tpidr2_restore() {
5238
std::cerr << "[warning] __arm_tpidr2_restore() stubbed!\n";
5339
}
5440

55-
void MLIR_ARMSMEABISTUBS_EXPORTED __arm_tpidr2_save() {
41+
void LLVM_ATTRIBUTE_WEAK __arm_tpidr2_save() {
5642
std::cerr << "[warning] __arm_tpidr2_save() stubbed!\n";
5743
}
5844

59-
void MLIR_ARMSMEABISTUBS_EXPORTED __arm_za_disable() {
45+
void LLVM_ATTRIBUTE_WEAK __arm_za_disable() {
6046
std::cerr << "[warning] __arm_za_disable() stubbed!\n";
6147
}
6248
}

mlir/lib/ExecutionEngine/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ if(LLVM_ENABLE_PIC)
181181
add_mlir_library(mlir_arm_sme_abi_stubs
182182
SHARED
183183
ArmSMEStubs.cpp)
184-
target_compile_definitions(mlir_arm_sme_abi_stubs PRIVATE mlir_arm_sme_abi_stubs_EXPORTS)
185184

186185
if(MLIR_ENABLE_CUDA_RUNNER)
187186
# Configure CUDA support. Using check_language first allows us to give a

0 commit comments

Comments
 (0)