From 8a0ebb9fa25fd44def17b03b3f8aa1a33ad77940 Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Fri, 29 Sep 2017 13:43:08 -0700 Subject: Get tests running/passing under Linux (#194) * Get tests running/passing under Linux - Fix up `dlopen` abstraction - Fix up some test cases to request hlsl (rather than default to dxbc) so they can run on non-Windows targets - Fix up test runner ignore tests that can't run on current platform (and not count those as failure) - Fix file handle leeak in process spawner absttraction - Get additional test-related applications building - More tweaks to Travis script; in theory deployment is set up now (yeah, right) * fixup * fixup: Travis environment variable syntax * fixup: Buffer->begin * fixup: actually run full tests on one config * fixup: add build status badge for Travis --- source/slang-glslang/slang-glslang.cpp | 9 +++++++++ source/slang-glslang/slang-glslang.h | 2 ++ 2 files changed, 11 insertions(+) (limited to 'source/slang-glslang') diff --git a/source/slang-glslang/slang-glslang.cpp b/source/slang-glslang/slang-glslang.cpp index 21a95c3b9..ae61823d1 100644 --- a/source/slang-glslang/slang-glslang.cpp +++ b/source/slang-glslang/slang-glslang.cpp @@ -28,6 +28,7 @@ #include #endif +#include #include // This is a wrapper to allow us to run the `glslang` compiler @@ -67,7 +68,11 @@ static void dump( // also output it for debug purposes std::string str((char const*)data, size); + #ifdef _WIN32 OutputDebugStringA(str.c_str()); + #else + fprintf(stderr, "%s\n", str.c_str());; + #endif } } @@ -177,7 +182,11 @@ static int glslang_dissassembleSPIRV(glslang_CompileRequest* request) } extern "C" +#ifdef _MSC_VER _declspec(dllexport) +#else +__attribute__((__visibility__("default"))) +#endif int glslang_compile(glslang_CompileRequest* request) { glslang::InitializeProcess(); diff --git a/source/slang-glslang/slang-glslang.h b/source/slang-glslang/slang-glslang.h index 748ad3dd1..22014de72 100644 --- a/source/slang-glslang/slang-glslang.h +++ b/source/slang-glslang/slang-glslang.h @@ -2,6 +2,8 @@ #ifndef SLANG_GLSLANG_H_INCLUDED #define SLANG_GLSLANG_H_INCLUDED +#include + typedef void (*glslang_OutputFunc)(void const* data, size_t size, void* userData); enum -- cgit v1.2.3