From 59903ef7e4ddd8885f71567bf0fc85527a88fffc Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 3 May 2024 18:02:31 -0700 Subject: Add host shared library target. (#4098) * Add host shared library target. * Attempt fix. * Fix warnings. * try fix. * Fix test. * Fix. --- source/compiler-core/slang-gcc-compiler-util.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/compiler-core/slang-gcc-compiler-util.cpp') diff --git a/source/compiler-core/slang-gcc-compiler-util.cpp b/source/compiler-core/slang-gcc-compiler-util.cpp index 2bcdfcbfa..52d4a0c29 100644 --- a/source/compiler-core/slang-gcc-compiler-util.cpp +++ b/source/compiler-core/slang-gcc-compiler-util.cpp @@ -560,6 +560,7 @@ static SlangResult _parseGCCFamilyLine(SliceAllocator& allocator, const UnownedS switch (options.targetType) { case SLANG_SHADER_SHARED_LIBRARY: + case SLANG_HOST_SHARED_LIBRARY: { // Shared library cmdLine.addArg("-shared"); @@ -639,7 +640,8 @@ static SlangResult _parseGCCFamilyLine(SliceAllocator& allocator, const UnownedS // Add the library paths - if (options.libraryPaths.count && options.targetType == SLANG_HOST_EXECUTABLE) + if (options.libraryPaths.count && + (options.targetType == SLANG_HOST_EXECUTABLE)) { if(PlatformUtil::isFamily(PlatformFamily::Apple, platformKind)) cmdLine.addArg("-Wl,-rpath,@loader_path,-rpath,@loader_path/../lib"); -- cgit v1.2.3