From d4316c88457a32f1169b2d7d82053ccbc05fa7ed Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Fri, 14 May 2021 17:50:00 -0400 Subject: FXC as DownstreamCompiler (#1844) * #include an absolute path didn't work - because paths were taken to always be relative. * WIP Fxc as downstream compiler. * First pass FXC downstream compiler working. * GCC compile fix. * Fix FXC parsing issue. * Special case filesystem access. * Use StringUtil getSlice. * Fix isses with not emitting source for FXC. * Small fixes for DXBC handling. --- source/compiler-core/slang-gcc-compiler-util.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source/compiler-core/slang-gcc-compiler-util.cpp') diff --git a/source/compiler-core/slang-gcc-compiler-util.cpp b/source/compiler-core/slang-gcc-compiler-util.cpp index a51d5735f..971416ddb 100644 --- a/source/compiler-core/slang-gcc-compiler-util.cpp +++ b/source/compiler-core/slang-gcc-compiler-util.cpp @@ -377,18 +377,18 @@ static SlangResult _parseGCCFamilyLine(const UnownedStringSlice& line, LineParse switch (options.targetType) { - case TargetType::SharedLibrary: + case SLANG_SHARED_LIBRARY: { outPath << SharedLibrary::calcPlatformPath(options.modulePath.getUnownedSlice()); return SLANG_OK; } - case TargetType::Executable: + case SLANG_EXECUTABLE: { outPath << options.modulePath; outPath << ProcessUtil::getExecutableSuffix(); return SLANG_OK; } - case TargetType::Object: + case SLANG_OBJECT_CODE: { #if __CYGWIN__ outPath << options.modulePath << ".obj"; @@ -509,7 +509,7 @@ static SlangResult _parseGCCFamilyLine(const UnownedStringSlice& line, LineParse switch (options.targetType) { - case TargetType::SharedLibrary: + case SLANG_SHARED_LIBRARY: { // Shared library cmdLine.addArg("-shared"); @@ -521,11 +521,11 @@ static SlangResult _parseGCCFamilyLine(const UnownedStringSlice& line, LineParse } break; } - case TargetType::Executable: + case SLANG_EXECUTABLE: { break; } - case TargetType::Object: + case SLANG_OBJECT_CODE: { // Don't link, just produce object file cmdLine.addArg("-c"); @@ -563,7 +563,7 @@ static SlangResult _parseGCCFamilyLine(const UnownedStringSlice& line, LineParse //cmdLine.addArg(linkOptions); } - if (options.targetType == TargetType::SharedLibrary) + if (options.targetType == SLANG_SHARED_LIBRARY) { if (!PlatformUtil::isFamily(PlatformFamily::Apple, platformKind)) { -- cgit v1.2.3