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

Jon Chesterfield via All-commits all-commits at lists.llvm.org
Wed Sep 1 13:22:52 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c7cbf1a03ea6f624be54370ea7b571842bc67dda
      https://github.com/llvm/llvm-project/commit/c7cbf1a03ea6f624be54370ea7b571842bc67dda
  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