Skip to content

Commit

Permalink
Pass compiler specific args to GCC and Visual Studio too (#6019)
Browse files Browse the repository at this point in the history
Co-authored-by: Yong He <[email protected]>
  • Loading branch information
juliusikkala and csyonghe authored Jan 9, 2025
1 parent dab6cec commit 46149ee
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions source/compiler-core/slang-gcc-compiler-util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,13 @@ static SlangResult _parseGCCFamilyLine(
cmdLine.addArg(libPath);
}

// Add compiler specific options from user.
for (auto compilerSpecificArg : options.compilerSpecificArguments)
{
const char* const arg = compilerSpecificArg;
cmdLine.addArg(arg);
}

return SLANG_OK;
}

Expand Down
7 changes: 7 additions & 0 deletions source/compiler-core/slang-visual-studio-compiler-util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,13 @@ static void _addFile(
cmdLine.addPrefixPathArg("/LIBPATH:", libPath);
}

// Add compiler specific options from user.
for (auto compilerSpecificArg : options.compilerSpecificArguments)
{
const char* const arg = compilerSpecificArg;
cmdLine.addArg(arg);
}

return SLANG_OK;
}

Expand Down

0 comments on commit 46149ee

Please sign in to comment.