Move definition of GLSLANG_EXPORT to visibility.h

The GLSLANG_EXPORT macro is already used (and defined) in two separate
places and will be used in a few more in the near future. To reduce
duplication it is now in its own header.
This commit is contained in:
Arcady Goldmints-Orlov 2023-09-21 16:26:59 -04:00 committed by arcady-lunarg
parent 592de6cf78
commit 9e8dff7d42
4 changed files with 54 additions and 32 deletions

View file

@ -38,6 +38,7 @@
#define _COMPILER_INTERFACE_INCLUDED_
#include "../Include/ResourceLimits.h"
#include "../Include/visibility.h"
#include "../MachineIndependent/Versions.h"
#include <cstring>
@ -49,22 +50,6 @@
#define C_DECL
#endif
#ifdef GLSLANG_IS_SHARED_LIBRARY
#ifdef _WIN32
#ifdef GLSLANG_EXPORTING
#define GLSLANG_EXPORT __declspec(dllexport)
#else
#define GLSLANG_EXPORT __declspec(dllimport)
#endif
#elif __GNUC__ >= 4
#define GLSLANG_EXPORT __attribute__((visibility("default")))
#endif
#endif // GLSLANG_IS_SHARED_LIBRARY
#ifndef GLSLANG_EXPORT
#define GLSLANG_EXPORT
#endif
//
// This is the platform independent interface between an OGL driver
// and the shading language compiler/linker.