From 89083c4b50af8e48e70b25b63cc62aca21ab706c Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 10 Aug 2022 01:58:41 -0700 Subject: Language server pointer type support + add `DLLImport` test (#2350) * Language server pointer type support. + Natvis for AST. * Add completion suggestion for GUID. * Make executable test able to use slang-rt. * Fix gcc argument for rpath. * Fix DLLImport on linux. * Fix windows. * Fix. Co-authored-by: Yong He --- source/compiler-core/slang-gcc-compiler-util.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/compiler-core') diff --git a/source/compiler-core/slang-gcc-compiler-util.cpp b/source/compiler-core/slang-gcc-compiler-util.cpp index aee3b1bcc..2c1380cde 100644 --- a/source/compiler-core/slang-gcc-compiler-util.cpp +++ b/source/compiler-core/slang-gcc-compiler-util.cpp @@ -564,6 +564,7 @@ static SlangResult _parseGCCFamilyLine(const UnownedStringSlice& line, LineParse } case SLANG_HOST_EXECUTABLE: { + cmdLine.addArg("-rdynamic"); break; } case SLANG_OBJECT_CODE: @@ -623,6 +624,12 @@ static SlangResult _parseGCCFamilyLine(const UnownedStringSlice& line, LineParse } // Add the library paths + + if (options.libraryPaths.getCount() && options.targetType == SLANG_HOST_EXECUTABLE) + { + cmdLine.addArg("-Wl,-rpath,$ORIGIN"); + } + StringSlicePool libPathPool(StringSlicePool::Style::Default); for (const auto& libPath : options.libraryPaths) -- cgit v1.2.3