[all-commits] [llvm/llvm-project] 0173e0: [openmp] Accept directory for libomptarget-bc-path

Jon Chesterfield via All-commits all-commits at lists.llvm.org
Wed Sep 1 11:46:50 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0173e024fd9e779a94503040a532bcf125277f86
      https://github.com/llvm/llvm-project/commit/0173e024fd9e779a94503040a532bcf125277f86
  Author: Jon Chesterfield <jonathanchesterfield at gmail.com>
  Date:   2021-09-01 (Wed, 01 Sep 2021)

  Changed paths:
    M clang/lib/Driver/ToolChains/CommonArgs.cpp
    M clang/test/Driver/openmp-offload-gpu.c

  Log Message:
  -----------
  [openmp] Accept directory for libomptarget-bc-path

The commandline flag to specify a particular openmp devicertl library
currently errors like:
```
fatal error: cannot open file
      './runtimes/runtimes-bins/openmp/libomptarget':
      Is a directory
```
CommonArgs successfully appends the directory to the commandline args then
mlink-builtin-bitcode rejects it.

This patch is a point fix to that. If --libomptarget-amdgcn-bc-path=directory
then append the expected name for the current architecture and go on as before.
This is useful for test runners that don't hardcode the architecture.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D109057




More information about the All-commits mailing list