summaryrefslogtreecommitdiffstats
path: root/source/compiler-core/slang-gcc-compiler-util.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-05-03 18:02:31 -0700
committerGitHub <noreply@github.com>2024-05-03 18:02:31 -0700
commit59903ef7e4ddd8885f71567bf0fc85527a88fffc (patch)
tree700a177860d24610780390b35277aa8ff5c47947 /source/compiler-core/slang-gcc-compiler-util.cpp
parent54153a3681c7c6ef86c6f7a864719d32a1934240 (diff)
Add host shared library target. (#4098)
* Add host shared library target. * Attempt fix. * Fix warnings. * try fix. * Fix test. * Fix.
Diffstat (limited to 'source/compiler-core/slang-gcc-compiler-util.cpp')
-rw-r--r--source/compiler-core/slang-gcc-compiler-util.cpp4
1 files changed, 3 insertions, 1 deletions
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");