Enhance the difference reduction between preprocessors
Summary
At previous MR we already applied some difference reduction between Cpp/Haskell/JavaScript preprocessor calls but it was not so aggressive as it potentially could be.
We ended with the implementation where a single function is used to determine how to call preprocessors based on its target language.
2 deeper steps (at least) are possible to improve it a bit more:
- Use the same filtering for all preprocessors (
cc_filter
vsid
). Very probably we should usecc_filter
everywhere. - Use the same call for all preprocessors (
runSomethingResponseFile
vsrunSomethingFiltered
). Again, very probably we should userunSomethingResponseFile
everywhere because all known preprocessors support arguments pass in response-file-style (aka@
) which allows to read very long command line options at shells where it is limited (Windows Shell, not a Powershell).
Unfortunately at the origin point of changing related code we were unable to test all possible cases to make sure that proposed changes for preprocessors are actually valid. Also we have not enough automatic tests for now to verify it practically well.
Expected behavior
runSourceCodePreprocessor
uses single style of call for all preprocessors or we know actual reasons why to not do it.
Environment
- GHC version used: commit
e1cf8dc2c941d36dc92139faa07ee6baf2599e38