[all-commits] [llvm/llvm-project] fb5a3b: [libc] Add path to include generated headers for h...

Joseph Huber via All-commits all-commits at lists.llvm.org
Wed Apr 26 14:52:52 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fb5a3bc8f81ddbfbec5118eb1a881de8c7bdf615
      https://github.com/llvm/llvm-project/commit/fb5a3bc8f81ddbfbec5118eb1a881de8c7bdf615
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2023-04-26 (Wed, 26 Apr 2023)

  Changed paths:
    M libc/test/UnitTest/CMakeLists.txt

  Log Message:
  -----------
  [libc] Add path to include generated headers for hermetic tests

The generated header files live in the build directory's include path.
When targeting a hermetic build we want to make sure we only use headers
generated by the project itself if availible.

Reviewed By: sivachandra

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


  Commit: fab84dcd0a5a38df8ce5d8996fd2d0c917f39ae3
      https://github.com/llvm/llvm-project/commit/fab84dcd0a5a38df8ce5d8996fd2d0c917f39ae3
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2023-04-26 (Wed, 26 Apr 2023)

  Changed paths:
    M libc/config/gpu/entrypoints.txt
    M libc/test/CMakeLists.txt

  Log Message:
  -----------
  [libc] Enable the GPU build to build the UnitTest library

The previous patch in D149216 allows us to use the internal `<stdlib.h>`
include for the GPU build. However, we currently don't provide the
memory functions so the header wasn't resolving them. This patch adds
these as entrypoints. They don't cause any entrypoints to be emitted
because they are not implemented, but they provide it in the header so
that we can rely on the test's implementation of them.

Depends on D149216

Reviewed By: sivachandra

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


  Commit: e7735a57b9d063d85231ea1a2d775639bc632ad0
      https://github.com/llvm/llvm-project/commit/e7735a57b9d063d85231ea1a2d775639bc632ad0
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2023-04-26 (Wed, 26 Apr 2023)

  Changed paths:
    M libc/cmake/modules/LLVMLibCObjectRules.cmake

  Log Message:
  -----------
  [libc] Correctly pass 'CXX_STANDARD' to the packaged GPU build

We need to perform the GPU build separately. The `CXX_STANDARD` option
was not being passed properly.

Reviewed By: sivachandra

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


  Commit: dc9baac1a0148ce0c2b8afdc75e3e208597f79c9
      https://github.com/llvm/llvm-project/commit/dc9baac1a0148ce0c2b8afdc75e3e208597f79c9
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2023-04-26 (Wed, 26 Apr 2023)

  Changed paths:
    M libc/config/gpu/api.td
    M libc/config/gpu/entrypoints.txt
    A libc/src/__support/threads/gpu/CMakeLists.txt
    A libc/src/__support/threads/gpu/mutex.h
    M libc/src/__support/threads/mutex.h

  Log Message:
  -----------
  [libc] Partially implement `atexit` on the GPU

The `atexit` function controls registering functions to call at the end
of the program. This is difficult to do in general on the GPU because of
the lack of a real mutex implementation. We primarily provide this for
testing where we can explicitly restrict how the `atexit` registration
functions are called. So we simply create a passthrough Mutex to get
past the usage of it as per @sivachandra's suggestion.

Depends on D149225

Reviewed By: sivachandra

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


Compare: https://github.com/llvm/llvm-project/compare/82e5994c8d72...dc9baac1a014


More information about the All-commits mailing list