diff options
author | Robert Cohn <robert.s.cohn@intel.com> | 2022-09-02 14:19:20 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-02 20:19:20 +0200 |
commit | e330b469ef63d2291afdddd72e873a3cf15dacc7 (patch) | |
tree | 17785536d4b1de7a4f33a5249e18d2c5a8c45e01 | |
parent | 1ae96db4825d89f482955522e448313659f475e6 (diff) | |
download | compiler-explorer-e330b469ef63d2291afdddd72e873a3cf15dacc7.tar.gz compiler-explorer-e330b469ef63d2291afdddd72e873a3cf15dacc7.zip |
use openCL from icx install (#4015)gh-4088
-rw-r--r-- | lib/compilers/_all.js | 1 | ||||
-rw-r--r-- | lib/compilers/clang.js | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/lib/compilers/_all.js b/lib/compilers/_all.js index 3224acc03..ab7f50f8d 100644 --- a/lib/compilers/_all.js +++ b/lib/compilers/_all.js @@ -34,6 +34,7 @@ export {CIRCTCompiler} from './circt'; export {ClangCompiler} from './clang'; export {ClangCudaCompiler} from './clang'; export {ClangHipCompiler} from './clang'; +export {ClangIntelCompiler} from './clang'; export {CleanCompiler} from './clean'; export {CprocCompiler} from './cproc'; export {CrystalCompiler} from './crystal'; diff --git a/lib/compilers/clang.js b/lib/compilers/clang.js index 891999580..b0c90588f 100644 --- a/lib/compilers/clang.js +++ b/lib/compilers/clang.js @@ -184,3 +184,17 @@ export class ClangHipCompiler extends ClangCompiler { return ['-o', this.filename(outputFilename), '-g1', '--no-gpu-bundle-output', filters.binary ? '-c' : '-S']; } } + +export class ClangIntelCompiler extends ClangCompiler { + static get key() { + return 'clang-intel'; + } + + runExecutable(executable, executeParameters, homeDir) { + executeParameters.env = { + OCL_ICD_FILENAMES: path.resolve(path.dirname(this.compiler.exe) + '/../lib/x64/libintelocl.so'), + ...executeParameters.env, + }; + return super.runExecutable(executable, executeParameters, homeDir); + } +} |