@@ -80,25 +80,61 @@ The `-select-validator` option will be deprecated. As this is not documented,
8080it should be ok to just remove it entirely.
8181
8282A new option, ` -dxil-dll-path ` , can be used to specify the full path to dxil.dll
83- to use. DXC will also be modified to check for a new environment variable,
84- ` DXC_DXIL_DLL_PATH ` , that also specifies the full path to the dll. Example
85- path: ` c:\dxc\build\old-releases\1.7.123\bin\x64\dxil.dll ` .
83+ to use. Example path: ` c:\dxc\build\old-releases\1.7.123\bin\x64\dxil.dll ` .
8684
87- The command-line option takes precedance over the environment variable. Setting
88- the path to an empty string forces the internal validator.
85+ Setting the path to an empty string forces the internal validator to be used.
8986
90- If a dll path is specified and isn't found then DXC will fail with an error.
87+ If a dll path is specified and isn't found then the compiler will fail with an
88+ error.
89+
90+ When invoked via dxc.exe (ie not through the compiler API), DXC will check for a
91+ new environment variable, ` DXC_DXIL_DLL_PATH ` , that specifies the full path to
92+ the dll. The command-line option takes precedance over the environment variable.
93+
94+ When an external validator is used a warning diagnostic is emitted. Since the
95+ only expected users of this option is the backcompat tests having this always
96+ appear in the test logs should be helpful when diagnosing issues.
9197
92- Note that the environment variable is used for both API as well as command-line
93- invocation of the compiler.
9498
9599### Invoking the tests
96100
97101The tests are invoked via ` add_custom_command ` , using ` cmake -E env ` to set the
98102` DXC_DXIL_DLL_PATH ` variable.
99103
104+ ### New Tests
105+
106+ As well as testing old external validators, we also need to run the same set of
107+ tests against current external validator.
108+
109+ This means we need to test:
110+
111+ * internal validator
112+ * latest external validator
113+ * previouslly released external validators
114+
115+ ## Alternatives Considered
116+
117+ ### Requirement for full path
118+
119+ We considered allowing relative paths to specify the dll. However, best practice
120+ for loading DLLs is to use absolute paths and since in the expected scenarios
121+ for this functionality we know exactly which DLL we want to use the decision was
122+ made to require an absolute path to the DLL.
123+
124+
125+ ### Diagnostic when using External Validator
126+
127+ We considered that we should only show the diagnostic when the compiler is
128+ invoked via dxc.exe and not when it is used via the API, on the basis that
129+ emitting a warning when the API is doing something that the user explicitly
130+ asked it to do is unusual.
100131
132+ Another consideration was to only output the path to the validator in the case
133+ that validation failed.
101134
135+ Since this API is only intended to be used scenarios for testing the compiler
136+ itself, the decision was made to always emit it in order to help with debugging
137+ via logs.
102138
103139
104140
0 commit comments