[Mlir-commits] [mlir] bf353a7 - Revert "[mlir] Workaround for export lib generation on Windows for `mlir_arm_sme_abi_stubs` (#73147)"

Ivan Butygin llvmlistbot at llvm.org
Thu Nov 23 04:33:10 PST 2023


Author: Ivan Butygin
Date: 2023-11-23T13:32:42+01:00
New Revision: bf353a71a2c1360a445618dde6610cf850a1f417

URL: https://github.com/llvm/llvm-project/commit/bf353a71a2c1360a445618dde6610cf850a1f417
DIFF: https://github.com/llvm/llvm-project/commit/bf353a71a2c1360a445618dde6610cf850a1f417.diff

LOG: Revert "[mlir] Workaround for export lib generation on Windows for `mlir_arm_sme_abi_stubs` (#73147)"

This reverts commit 6248c24876d81d83544af02399d46813dbea869c.

broke the bots

Added: 
    

Modified: 
    mlir/lib/ExecutionEngine/ArmSMEStubs.cpp
    mlir/lib/ExecutionEngine/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/mlir/lib/ExecutionEngine/ArmSMEStubs.cpp b/mlir/lib/ExecutionEngine/ArmSMEStubs.cpp
index 75b7136efc3a023..f9f64ad5e5ac81c 100644
--- a/mlir/lib/ExecutionEngine/ArmSMEStubs.cpp
+++ b/mlir/lib/ExecutionEngine/ArmSMEStubs.cpp
@@ -10,20 +10,6 @@
 #include <cstdint>
 #include <iostream>
 
-#if (defined(_WIN32) || defined(__CYGWIN__))
-#ifndef MLIR_ARMSMEABISTUBS_EXPORTED
-#ifdef mlir_arm_sme_abi_stubs_EXPORTS
-// We are building this library
-#define MLIR_ARMSMEABISTUBS_EXPORTED __declspec(dllexport)
-#else
-// We are using this library
-#define MLIR_ARMSMEABISTUBS_EXPORTED __declspec(dllimport)
-#endif // mlir_arm_sme_abi_stubs_EXPORTS
-#endif // MLIR_ARMSMEABISTUBS_EXPORTED
-#else
-#define MLIR_ARMSMEABISTUBS_EXPORTED __attribute__((visibility("default")) LLVM_ATTRIBUTE_WEAK
-#endif // (defined(_WIN32) || defined(__CYGWIN__))
-
 // The actual implementation of these routines is in:
 // compiler-rt/lib/builtins/aarch64/sme-abi.S. These stubs allow the current
 // ArmSME tests to run without depending on compiler-rt. This works as we don't
@@ -33,7 +19,7 @@
 
 extern "C" {
 
-bool MLIR_ARMSMEABISTUBS_EXPORTED __aarch64_sme_accessible() {
+bool LLVM_ATTRIBUTE_WEAK __aarch64_sme_accessible() {
   // The ArmSME tests are run within an emulator so we assume SME is available.
   return true;
 }
@@ -43,20 +29,20 @@ struct sme_state {
   int64_t x1;
 };
 
-sme_state MLIR_ARMSMEABISTUBS_EXPORTED __arm_sme_state() {
+sme_state LLVM_ATTRIBUTE_WEAK __arm_sme_state() {
   std::cerr << "[warning] __arm_sme_state() stubbed!\n";
   return sme_state{};
 }
 
-void MLIR_ARMSMEABISTUBS_EXPORTED __arm_tpidr2_restore() {
+void LLVM_ATTRIBUTE_WEAK __arm_tpidr2_restore() {
   std::cerr << "[warning] __arm_tpidr2_restore() stubbed!\n";
 }
 
-void MLIR_ARMSMEABISTUBS_EXPORTED __arm_tpidr2_save() {
+void LLVM_ATTRIBUTE_WEAK __arm_tpidr2_save() {
   std::cerr << "[warning] __arm_tpidr2_save() stubbed!\n";
 }
 
-void MLIR_ARMSMEABISTUBS_EXPORTED __arm_za_disable() {
+void LLVM_ATTRIBUTE_WEAK __arm_za_disable() {
   std::cerr << "[warning] __arm_za_disable() stubbed!\n";
 }
 }

diff  --git a/mlir/lib/ExecutionEngine/CMakeLists.txt b/mlir/lib/ExecutionEngine/CMakeLists.txt
index 70c5a07ad1ab237..fe139661f2bbb5a 100644
--- a/mlir/lib/ExecutionEngine/CMakeLists.txt
+++ b/mlir/lib/ExecutionEngine/CMakeLists.txt
@@ -181,7 +181,6 @@ if(LLVM_ENABLE_PIC)
   add_mlir_library(mlir_arm_sme_abi_stubs
     SHARED
     ArmSMEStubs.cpp)
-  target_compile_definitions(mlir_arm_sme_abi_stubs PRIVATE mlir_arm_sme_abi_stubs_EXPORTS)
 
   if(MLIR_ENABLE_CUDA_RUNNER)
     # Configure CUDA support. Using check_language first allows us to give a


        


More information about the Mlir-commits mailing list