[all-commits] [llvm/llvm-project] 2d4d8c: [Libomptarget] Make the DeviceRTL configuration gl...

Joseph Huber via All-commits all-commits at lists.llvm.org
Wed Oct 4 12:14:26 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2d4d8c8f97ceec2fb7f9e8376b0a304aad0790e6
      https://github.com/llvm/llvm-project/commit/2d4d8c8f97ceec2fb7f9e8376b0a304aad0790e6
  Author: Joseph Huber <35342157+jhuber6 at users.noreply.github.com>
  Date:   2023-10-04 (Wed, 04 Oct 2023)

  Changed paths:
    M openmp/libomptarget/DeviceRTL/src/Configuration.cpp
    M openmp/libomptarget/DeviceRTL/src/exports

  Log Message:
  -----------
  [Libomptarget] Make the DeviceRTL configuration globals weak (#68220)

This patch applies weak linkage to the config globals by the name
`__omp_rtl...`. This is because when passing `-nogpulib` we will not
link in or create these globals. This allows the OpenMP device RTL to be
self contained without requiring the additional definitions from the
`clang` compiler. In the standard case, this should not affect the
current behavior, this is because the strong definition coming from the
compiler should always override the weak definition we default to here.
In the case that these are not defined by the compiler, these will
remain weak. This will impact optimizations somewhat, but the previous
behavior was that it would not link so that is an improvement.
    
Depends on: https://github.com/llvm/llvm-project/pull/68215




More information about the All-commits mailing list