diff options
Diffstat (limited to 'source/compiler-core')
| -rw-r--r-- | source/compiler-core/slang-gcc-compiler-util.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/compiler-core/slang-gcc-compiler-util.cpp b/source/compiler-core/slang-gcc-compiler-util.cpp index d8df9714a..79aefc71d 100644 --- a/source/compiler-core/slang-gcc-compiler-util.cpp +++ b/source/compiler-core/slang-gcc-compiler-util.cpp @@ -632,7 +632,10 @@ static SlangResult _parseGCCFamilyLine(SliceAllocator& allocator, const UnownedS if (options.libraryPaths.count && options.targetType == SLANG_HOST_EXECUTABLE) { - cmdLine.addArg("-Wl,-rpath,$ORIGIN"); + if(PlatformUtil::isFamily(PlatformFamily::Apple, platformKind)) + cmdLine.addArg("-Wl,-rpath,@loader_path,-rpath,@loader_path/../lib"); + else + cmdLine.addArg("-Wl,-rpath,$ORIGIN,-rpath,$ORIGIN/../lib"); } StringSlicePool libPathPool(StringSlicePool::Style::Default); |
