From 646eecc6af878ea7682c814c15b4e838c3231ee3 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 7 Dec 2021 14:16:28 -0500 Subject: Check g++ version compatibility (#2044) * #include an absolute path didn't work - because paths were taken to always be relative. * Test gcc >= 5.0 * Disable codegen for reflection tests. * Add parsing options. * Small comment changes to kick CI build. --- tools/slang-reflection-test/slang-reflection-test-main.cpp | 9 +++++++++ tools/slang-test/slang-test-main.cpp | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/slang-reflection-test/slang-reflection-test-main.cpp b/tools/slang-reflection-test/slang-reflection-test-main.cpp index 0b8e88d68..af6da5113 100644 --- a/tools/slang-reflection-test/slang-reflection-test-main.cpp +++ b/tools/slang-reflection-test/slang-reflection-test-main.cpp @@ -1285,6 +1285,15 @@ static SlangResult maybeDumpDiagnostic(SlangResult res, SlangCompileRequest* req SlangResult performCompilationAndReflection(SlangCompileRequest* request, int argc, const char*const* argv) { + // We don't actually need codegen to get reflection. + // + // Ideally perhaps this would use a call to + // request->setCompileFlags(flags); + // But that relies on knowing what flags are set, and there isn't a way to get that, so do it arg way + + const char* noCodeGenArgs[] = { "-no-codegen" }; + SLANG_RETURN_ON_FAIL(maybeDumpDiagnostic(spProcessCommandLineArguments(request, noCodeGenArgs, SLANG_COUNT_OF(noCodeGenArgs)), request)); + SLANG_RETURN_ON_FAIL(maybeDumpDiagnostic(spProcessCommandLineArguments(request, &argv[1], argc - 1), request)); SLANG_RETURN_ON_FAIL(maybeDumpDiagnostic(spCompile(request), request)); diff --git a/tools/slang-test/slang-test-main.cpp b/tools/slang-test/slang-test-main.cpp index f57fe22a1..685e9dd7a 100644 --- a/tools/slang-test/slang-test-main.cpp +++ b/tools/slang-test/slang-test-main.cpp @@ -1914,7 +1914,7 @@ static TestResult runCPPCompilerExecute(TestContext* context, TestInput& input) const auto& diagnostics = compileResult->getDiagnostics(); - // If the actual compilation failed, then the output will be + // If the actual compilation failed, then the output will be the summary if (SLANG_FAILED(diagnostics.result)) { actualOutput = _calcSummary(diagnostics); -- cgit v1.2.3