Merge pull request #1972 from bansan85/v1.x

Fix runtime when build with -fsanitize=cfi
This commit is contained in:
Gabi Melman 2021-11-24 23:43:56 -08:00 committed by GitHub
commit c6d144dab9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 7 deletions

View File

@ -22,13 +22,17 @@
#ifdef SPDLOG_COMPILED_LIB #ifdef SPDLOG_COMPILED_LIB
# undef SPDLOG_HEADER_ONLY # undef SPDLOG_HEADER_ONLY
# if defined(_WIN32) && defined(SPDLOG_SHARED_LIB) # if defined(SPDLOG_SHARED_LIB)
# ifdef spdlog_EXPORTS # if defined(_WIN32)
# define SPDLOG_API __declspec(dllexport) # ifdef spdlog_EXPORTS
# else # define SPDLOG_API __declspec(dllexport)
# define SPDLOG_API __declspec(dllimport) # else // !spdlog_EXPORTS
# define SPDLOG_API __declspec(dllimport)
# endif
# else // !defined(_WIN32)
# define SPDLOG_API __attribute__((visibility ("default")))
# endif # endif
# else // !defined(_WIN32) || !defined(SPDLOG_SHARED_LIB) # else // !defined(SPDLOG_SHARED_LIB)
# define SPDLOG_API # define SPDLOG_API
# endif # endif
# define SPDLOG_INLINE # define SPDLOG_INLINE

View File

@ -16,7 +16,7 @@
namespace spdlog { namespace spdlog {
namespace sinks { namespace sinks {
template<typename Mutex> template<typename Mutex>
class base_sink : public sink class SPDLOG_API base_sink : public sink
{ {
public: public:
base_sink(); base_sink();