diff options
author | partouf <partouf@gmail.com> | 2022-11-17 15:50:25 +0100 |
---|---|---|
committer | partouf <partouf@gmail.com> | 2022-11-17 15:50:25 +0100 |
commit | b61f38b65b01066bdcec6ce832e1bf7f9ac5c857 (patch) | |
tree | a42efc8090b144ca3c482e4e5a3425aa05307741 | |
parent | 6b04f581f0900ddbcb203073d348d2d3ad682f26 (diff) | |
download | compiler-explorer-gh-4908.tar.gz compiler-explorer-gh-4908.zip |
small refactorgh-4908
-rw-r--r-- | lib/base-compiler.ts | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/lib/base-compiler.ts b/lib/base-compiler.ts index 78fbff631..2b10ab2dd 100644 --- a/lib/base-compiler.ts +++ b/lib/base-compiler.ts @@ -2098,18 +2098,7 @@ export class BaseCompiler { return normalized; } - async compile(source, options, backendOptions, filters, bypassCache, tools, executionParameters, libraries, files) { - const optionsError = this.checkOptions(options); - if (optionsError) throw optionsError; - const sourceError = this.checkSource(source); - if (sourceError) throw sourceError; - - const libsAndOptions = {libraries, options}; - if (this.tryAutodetectLibraries(libsAndOptions)) { - libraries = libsAndOptions.libraries; - options = libsAndOptions.options; - } - + fixFiltersBeforeCacheKey(filters, options, files) { // Don't run binary for unsupported compilers, even if we're asked. if (filters.binary && !this.compiler.supportsBinary) { delete filters.binary; @@ -2127,6 +2116,21 @@ export class BaseCompiler { if (files && files.length > 0) { filters.dontMaskFilenames = true; } + } + + async compile(source, options, backendOptions, filters, bypassCache, tools, executionParameters, libraries, files) { + const optionsError = this.checkOptions(options); + if (optionsError) throw optionsError; + const sourceError = this.checkSource(source); + if (sourceError) throw sourceError; + + const libsAndOptions = {libraries, options}; + if (this.tryAutodetectLibraries(libsAndOptions)) { + libraries = libsAndOptions.libraries; + options = libsAndOptions.options; + } + + this.fixFiltersBeforeCacheKey(filters, options, files); const executeParameters = { args: executionParameters.args || [], |