diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2021-05-14 17:50:00 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-14 17:50:00 -0400 |
| commit | d4316c88457a32f1169b2d7d82053ccbc05fa7ed (patch) | |
| tree | cbc87350b9ef2f5be31ebc20783e08b895767779 /source/compiler-core/slang-gcc-compiler-util.cpp | |
| parent | 79d106fac18f5792fcac448a0b037aa834fa6042 (diff) | |
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.
Diffstat (limited to 'source/compiler-core/slang-gcc-compiler-util.cpp')
| -rw-r--r-- | source/compiler-core/slang-gcc-compiler-util.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
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)) { |
