| 354 | } |
| 355 | |
| 356 | constructor(info: PreliminaryCompilerInfo, env: CompilationEnvironment) { |
| 357 | super(info, env); |
| 358 | |
| 359 | if (!this.offloadBundlerPath) { |
| 360 | // clang-offload-bundler is in a different folder in versions >= 2024.0.0 |
| 361 | const offloadBundlerPath = path.join(path.dirname(this.compiler.exe), '../bin-llvm/clang-offload-bundler'); |
| 362 | if (fs.existsSync(offloadBundlerPath)) { |
| 363 | this.offloadBundlerPath = path.resolve(offloadBundlerPath); |
| 364 | } else { |
| 365 | const offloadBundlerPath = path.join(path.dirname(this.compiler.exe), 'compiler/clang-offload-bundler'); |
| 366 | if (fs.existsSync(offloadBundlerPath)) { |
| 367 | this.offloadBundlerPath = path.resolve(offloadBundlerPath); |
| 368 | } |
| 369 | } |
| 370 | } |
| 371 | } |
| 372 | |
| 373 | override getDefaultExecOptions(): ExecutionOptionsWithEnv { |
| 374 | const opts = super.getDefaultExecOptions(); |