summaryrefslogtreecommitdiff
path: root/source/slang/slang-compiler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-compiler.cpp')
-rwxr-xr-xsource/slang/slang-compiler.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/slang/slang-compiler.cpp b/source/slang/slang-compiler.cpp
index 3850615b4..31ead4cc3 100755
--- a/source/slang/slang-compiler.cpp
+++ b/source/slang/slang-compiler.cpp
@@ -964,6 +964,23 @@ namespace Slang
typedef DownstreamCompiler::CompileOptions CompileOptions;
CompileOptions options;
+ /* Let's set the compiler specific options
+
+ We can only do this if the endToEndReq is set. */
+ if (endToEndReq)
+ {
+ auto name = TypeTextUtil::getPassThroughName((SlangPassThrough)downstreamCompiler);
+ const Index nameIndex = endToEndReq->m_downstreamArgs.findName(name);
+ if (nameIndex >= 0)
+ {
+ auto& args = endToEndReq->m_downstreamArgs.getArgsAt(nameIndex);
+ for (const auto& arg : args.m_args)
+ {
+ options.compilerSpecificArguments.add(arg.value);
+ }
+ }
+ }
+
/* This is more convoluted than the other scenarios, because when we invoke C/C++ compiler we would ideally like
to use the original file. We want to do this because we want includes relative to the source file to work, and
for that to work most easily we want to use the original file, if there is one */