From 7258ef4ddebd021208a019f6ee73edcda57a88f7 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 20 Aug 2019 09:43:59 -0400 Subject: User defined downstream compiler prelude (#1028) * Added setDownstreamCompilerPrelude Renamed setPassThroughPath to setDownstreamCompilerPath. Fixed tests. Added prelude directory & code to TestToolUtil to setup default preludes for testing/command line apis. * Fix merge problem * Remove hacks to make prelude work by adding a search path as no longer needed with 'user prelude'. * Split up prelude into scalar intrinsics, and types. Use slang.h for main header. slang-cpp-prelude.h can now just include what it needs (relative to prelude directory) and define the few remaining things/work arounds. * Fix typo. --- source/slangc/main.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'source/slangc') diff --git a/source/slangc/main.cpp b/source/slangc/main.cpp index ddeb315e1..da9a21b7a 100644 --- a/source/slangc/main.cpp +++ b/source/slangc/main.cpp @@ -81,6 +81,7 @@ int MAIN(int argc, char** argv) SlangResult res; { SlangSession* session = spCreateSession(nullptr); + TestToolUtil::setSessionDefaultPrelude(argv[0], session); auto stdWriters = StdWriters::initDefaultSingleton(); -- cgit v1.2.3