diff options
| author | Julius Ikkala <julius.ikkala@gmail.com> | 2025-01-09 07:44:09 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-08 21:44:09 -0800 |
| commit | 46149eeb249dc5a3b085baba6061c96db72b0080 (patch) | |
| tree | e9818146cb4941daa20f2ab5f4675b4b4c5b6d07 /source/compiler-core | |
| parent | dab6cec1ed78a545c127adc0e8dbdf1f253f9132 (diff) | |
Pass compiler specific args to GCC and Visual Studio too (#6019)
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/compiler-core')
| -rw-r--r-- | source/compiler-core/slang-gcc-compiler-util.cpp | 7 | ||||
| -rw-r--r-- | source/compiler-core/slang-visual-studio-compiler-util.cpp | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/source/compiler-core/slang-gcc-compiler-util.cpp b/source/compiler-core/slang-gcc-compiler-util.cpp index f12f44338..a15e67750 100644 --- a/source/compiler-core/slang-gcc-compiler-util.cpp +++ b/source/compiler-core/slang-gcc-compiler-util.cpp @@ -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; } diff --git a/source/compiler-core/slang-visual-studio-compiler-util.cpp b/source/compiler-core/slang-visual-studio-compiler-util.cpp index d831abbd4..a7da11333 100644 --- a/source/compiler-core/slang-visual-studio-compiler-util.cpp +++ b/source/compiler-core/slang-visual-studio-compiler-util.cpp @@ -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; } |
