diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2023-03-24 09:56:59 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-24 09:56:59 -0400 |
| commit | e794de0d63e6de9be564c971fd40486ecf631293 (patch) | |
| tree | 903bd4100fd9c259d68f2893c61a36880e182f14 /source/compiler-core/slang-artifact-desc-util.cpp | |
| parent | 03c10833beb331e234554808c2a80d3cadecc7c0 (diff) | |
Obfuscated source map writing (#2727)
* #include an absolute path didn't work - because paths were taken to always be relative.
* WIP produce obfuscated source map and write when container is specified.
* Make the sourcemap generated name stable.
Diffstat (limited to 'source/compiler-core/slang-artifact-desc-util.cpp')
| -rw-r--r-- | source/compiler-core/slang-artifact-desc-util.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source/compiler-core/slang-artifact-desc-util.cpp b/source/compiler-core/slang-artifact-desc-util.cpp index 08b7c8412..ca7dcb70f 100644 --- a/source/compiler-core/slang-artifact-desc-util.cpp +++ b/source/compiler-core/slang-artifact-desc-util.cpp @@ -710,6 +710,26 @@ SlangResult ArtifactDescUtil::appendDefaultExtension(const ArtifactDesc& desc, S // Don't know the extension for that return SLANG_E_NOT_FOUND; } + case ArtifactKind::Json: + { + auto ext = _getPayloadExtension(desc.payload); + if (ext.begin() != nullptr) + { + // TODO(JS): + // Do we need to alter the extension or the name if it's an + // obfuscated map? + //if (isDerivedFrom(desc.style, ArtifactStyle::Obfuscated)) + //{ + //} + + out << ext; + return SLANG_OK; + } + + // Not really what kind of json, so just use 'generic' json extension + out << "json"; + return SLANG_OK; + } default: break; } |
