diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2020-09-18 11:02:06 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-18 11:02:06 -0400 |
| commit | 9a6eec6192a373d8c14073f63f68e160d762ee50 (patch) | |
| tree | 3be256501344c159237db426f518ea0d0901c832 /source/slang/slang-compiler.cpp | |
| parent | 2ddca33686c08e1833c0d82a420fb2b27cde4e37 (diff) | |
Control container serialization with SerialOptionFlags (#1550)
* Test if blob is returned.
* Rename serialize files so can be grouped.
* StringRepresentationCache -> SerialStringTable
* Split out SerialStringTable from slang-serialize-ir
* First pass at reorganizing serialization/containers. Remain some issues about debug info.
* Fix bug in calculating sourceloc.
* Improve calcFixSourceLoc
* Make allocations for payload RiffContainer align to at least 8 bytes. This is important for read, if the payload can contain 8 byte aligned data. Note this has no effect on Riff file format alignment rules.
* Improve comments around RiffContainer and alignment.
* Remove SerialStringTable, can just use StringSlicePool instead.
* Add flags to control what is output in SerialContainer.
Turn off AST output for obfuscated code.
Lazily create astClasses when doing write container serialization.
* Typo fix for Clang/Linux.
Diffstat (limited to 'source/slang/slang-compiler.cpp')
| -rwxr-xr-x | source/slang/slang-compiler.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/slang/slang-compiler.cpp b/source/slang/slang-compiler.cpp index d8da642f4..3855eda68 100755 --- a/source/slang/slang-compiler.cpp +++ b/source/slang/slang-compiler.cpp @@ -2357,6 +2357,13 @@ SlangResult dissassembleDXILUsingDXC( { options.optionFlags |= SerialOptionFlag::DebugInfo; } + if (linkage->m_obfuscateCode) + { + // If code is obfuscated, we *disable* AST output as it is not obfuscated and will reveal + // too much about IR. + // Also currently only IR is needed. + options.optionFlags &= ~SerialOptionFlag::ASTModule; + } { RiffContainer container; |
