summaryrefslogtreecommitdiffstats
path: root/source/slang/options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/options.cpp')
-rw-r--r--source/slang/options.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/slang/options.cpp b/source/slang/options.cpp
index 452e7c439..97deeb544 100644
--- a/source/slang/options.cpp
+++ b/source/slang/options.cpp
@@ -241,6 +241,12 @@ struct OptionsParser
int argc,
char const* const* argv)
{
+ // Copy some state out of the current request, in case we've been called
+ // after some other initialization has been performed.
+ flags = requestImpl->compileFlags;
+
+ //
+
char const* const* argCursor = &argv[0];
char const* const* argEnd = &argv[argc];
while (argCursor != argEnd)