diff options
Diffstat (limited to 'source/compiler-core/slang-gcc-compiler-util.cpp')
| -rw-r--r-- | source/compiler-core/slang-gcc-compiler-util.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/compiler-core/slang-gcc-compiler-util.cpp b/source/compiler-core/slang-gcc-compiler-util.cpp index ca1d8e8e3..bbf9eaf26 100644 --- a/source/compiler-core/slang-gcc-compiler-util.cpp +++ b/source/compiler-core/slang-gcc-compiler-util.cpp @@ -637,11 +637,13 @@ static SlangResult _parseGCCFamilyLine(const UnownedStringSlice& line, LineParse // If it's a library for CPU types, try and use it if (ArtifactInfoUtil::isCpuBinary(desc) && desc.kind == ArtifactKind::Library) { + ComPtr<IFileArtifactRepresentation> fileRep; + // Get the name and path (can be empty) to the library - SLANG_RETURN_ON_FAIL(artifact->requireFileLike(ArtifactKeep::No)); + SLANG_RETURN_ON_FAIL(artifact->requireFile(ArtifactKeep::No, fileRep.writeRef())); - libPathPool.add(ArtifactInfoUtil::getParentPath(artifact)); - cmdLine.addPrefixPathArg("-l", ArtifactInfoUtil::getBaseName(artifact)); + libPathPool.add(ArtifactInfoUtil::getParentPath(fileRep)); + cmdLine.addPrefixPathArg("-l", ArtifactInfoUtil::getBaseName(artifact->getDesc(), fileRep)); } } |
