summaryrefslogtreecommitdiffstats
path: root/source/core/slang-downstream-compiler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/core/slang-downstream-compiler.cpp')
-rw-r--r--source/core/slang-downstream-compiler.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/core/slang-downstream-compiler.cpp b/source/core/slang-downstream-compiler.cpp
index b9b5a059d..1a81fcac8 100644
--- a/source/core/slang-downstream-compiler.cpp
+++ b/source/core/slang-downstream-compiler.cpp
@@ -610,6 +610,11 @@ static SlangResult _locateFXCCompilers(const String& path, ISlangSharedLibraryLo
static SlangResult _locateGlslangCompilers(const String& path, ISlangSharedLibraryLoader* loader, DownstreamCompilerSet* set)
{
+#if SLANG_UNIX_FAMILY
+ // On unix systems we need to ensure pthread is loaded first.
+ ComPtr<ISlangSharedLibrary> pthreadLibrary;
+ DefaultSharedLibraryLoader::load(loader, path, "pthread", pthreadLibrary.writeRef());
+#endif
ComPtr<ISlangSharedLibrary> sharedLibrary;
if (SLANG_SUCCEEDED(DefaultSharedLibraryLoader::load(loader, path, "slang-glslang", sharedLibrary.writeRef())))
{