summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2022-11-15 14:38:25 -0500
committerGitHub <noreply@github.com>2022-11-15 14:38:25 -0500
commit7222b6cdb1ed192b267e91896b1f56da3f0c21d6 (patch)
treeb95a1f3209a4e12623c10718a33167faaa9d4fe6 /source
parent069768d4d65d3268303b5a4c1f058ce8115a6497 (diff)
Specify downstream compiler include paths (#2517)
* #include an absolute path didn't work - because paths were taken to always be relative. * WIP around testing with NVAPI. * Make -I work for downstream compilers. Update docs. * Small improvement around ignoring tests.
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-compiler.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/slang/slang-compiler.cpp b/source/slang/slang-compiler.cpp
index 889ecc58a..b02421c46 100644
--- a/source/slang/slang-compiler.cpp
+++ b/source/slang/slang-compiler.cpp
@@ -1014,7 +1014,16 @@ namespace Slang
auto& args = linkage->m_downstreamArgs.getArgsAt(nameIndex);
for (const auto& arg : args.m_args)
{
- compilerSpecificArguments.add(arg.value);
+ // We special case some kinds of args, that can be handled directly
+ if (arg.value.startsWith("-I"))
+ {
+ // We handle the -I option, by just adding to the include paths
+ includePaths.add(arg.value.getUnownedSlice().tail(2));
+ }
+ else
+ {
+ compilerSpecificArguments.add(arg.value);
+ }
}
}
}