diff options
Diffstat (limited to 'source/compiler-core/slang-visual-studio-compiler-util.cpp')
| -rw-r--r-- | source/compiler-core/slang-visual-studio-compiler-util.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source/compiler-core/slang-visual-studio-compiler-util.cpp b/source/compiler-core/slang-visual-studio-compiler-util.cpp index 2ba69c1ce..df64ed821 100644 --- a/source/compiler-core/slang-visual-studio-compiler-util.cpp +++ b/source/compiler-core/slang-visual-studio-compiler-util.cpp @@ -257,9 +257,19 @@ namespace Slang } // Link libraries. - for (const auto& lib : options.libraries) + for (Artifact* artifact : options.libraries) { - cmdLine.addPrefixPathArg("", lib, ".lib"); + if (artifact->getDesc().isCpuBinary()) + { + String path; + SLANG_RETURN_ON_FAIL(artifact->requireFilePath(ArtifactKeep::No, path)); + + if (Path::getPathExt(path).getLength() == 0) + { + path.append(".lib"); + } + cmdLine.addArg(path); + } } return SLANG_OK; |
