Browse Source

!11867 [MS][LITE][r1.1]fix windows visibility

From: @lx0095
Reviewed-by: @zhanghaibo5,@zhang_xue_tong,@hangangqiang
Signed-off-by: @zhang_xue_tong
tags/v1.1.1
mindspore-ci-bot Gitee 5 years ago
parent
commit
3e4936ecdb
2 changed files with 4 additions and 29 deletions
  1. +2
    -15
      include/api/types.h
  2. +2
    -14
      mindspore/lite/include/ms_tensor.h

+ 2
- 15
include/api/types.h View File

@@ -22,21 +22,8 @@
#include <memory>
#include "include/api/data_type.h"

// refer to https://gcc.gnu.org/wiki/Visibility
#if defined _WIN32 || defined __CYGWIN__
#ifdef BUILDING_DLL
#ifdef __GNUC__
#define MS_API __attribute__((dllexport))
#else
#define MS_API __declspec(dllexport) // Note: actually gcc seems to also supports this syntax.
#endif
#else
#ifdef __GNUC__
#define MS_API __attribute__((dllimport))
#else
#define MS_API __declspec(dllimport) // Note: actually gcc seems to also supports this syntax.
#endif
#endif
#ifdef _WIN32
#define MS_API __declspec(dllexport)
#else
#define MS_API __attribute__((visibility("default")))
#endif


+ 2
- 14
mindspore/lite/include/ms_tensor.h View File

@@ -25,20 +25,8 @@
#include "ir/dtype/type_id.h"

#ifndef MS_API
#if defined _WIN32 || defined __CYGWIN__
#ifdef BUILDING_DLL
#ifdef __GNUC__
#define MS_API __attribute__((dllexport))
#else
#define MS_API __declspec(dllexport) // Note: actually gcc seems to also supports this syntax.
#endif
#else
#ifdef __GNUC__
#define MS_API __attribute__((dllimport))
#else
#define MS_API __declspec(dllimport) // Note: actually gcc seems to also supports this syntax.
#endif
#endif
#ifdef _WIN32
#define MS_API __declspec(dllexport)
#else
#define MS_API __attribute__((visibility("default")))
#endif


Loading…
Cancel
Save