diff options
| author | Tim Foley <tim.foley.is@gmail.com> | 2017-07-25 18:22:12 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-25 18:22:12 -0700 |
| commit | 155693a61011fa082433b9329570c375310db5bd (patch) | |
| tree | 7ca17a6655621a11eaa4806e0d9e11b011803dc5 /source/slangc | |
| parent | 29fb1d781a763a8ca3369d03a75dbe1976571368 (diff) | |
| parent | 941b834f3ba15eba9bfa80eb370077ec9c845efd (diff) | |
Merge pull request #146 from tfoleyNV/output-path-option
Add a `-o` option to command-line `slangc`
Diffstat (limited to 'source/slangc')
| -rw-r--r-- | source/slangc/main.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/slangc/main.cpp b/source/slangc/main.cpp index a97c38685..6fb394cce 100644 --- a/source/slangc/main.cpp +++ b/source/slangc/main.cpp @@ -3,6 +3,8 @@ #define SLANG_DYNAMIC #include "../slang.h" +SLANG_API void spSetCommandLineCompilerMode(SlangCompileRequest* request); + #include "core/slang-io.h" using namespace Slang; @@ -32,6 +34,8 @@ int MAIN(int argc, char** argv) SlangSession* session = spCreateSession(nullptr); SlangCompileRequest* compileRequest = spCreateCompileRequest(session); + spSetCommandLineCompilerMode(compileRequest); + char const* appName = "slangc"; if(argc > 0) appName = argv[0]; @@ -62,6 +66,9 @@ int MAIN(int argc, char** argv) exit(-1); } +#if 0 + // Produce output as the command-line compiler driver should. + // Now dump the output from the compilation to stdout. // // TODO: Need a way to control where output goes so that @@ -76,6 +83,7 @@ int MAIN(int argc, char** argv) fputs(output, stdout); } fflush(stdout); +#endif // Now that we are done, clean up after ourselves |
