<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/libc/lib, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[libc] Fix building bitcode library for GPU (#100491)</title>
<updated>2024-07-26T18:17:17+00:00</updated>
<author>
<name>Joseph Huber</name>
<email>huberjn@outlook.com</email>
</author>
<published>2024-07-26T18:17:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f8cd4c505fd9c0be329630b6b82e3a3ff53107cc'/>
<id>f8cd4c505fd9c0be329630b6b82e3a3ff53107cc</id>
<content type='text'>
Summary:
The GPU build provides a bitcode version of the library to mimic how
NVIDIA and AMD provide their libraries. Previously we had the fatbinary
archive that created the necessary dependency for this to actually
build. Since it was removed we no longer had anything triggering this to
build.

I have no idea if there's a better way to force a custom command to
actually be run in the same space as libraries, but the only thing I
could come up with was a dummy target.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
The GPU build provides a bitcode version of the library to mimic how
NVIDIA and AMD provide their libraries. Previously we had the fatbinary
archive that created the necessary dependency for this to actually
build. Since it was removed we no longer had anything triggering this to
build.

I have no idea if there's a better way to force a custom command to
actually be run in the same space as libraries, but the only thing I
could come up with was a dummy target.</pre>
</div>
</content>
</entry>
<entry>
<title>Reapply "[libc] Remove 'packaged' GPU build support (#100208)"</title>
<updated>2024-07-24T15:24:53+00:00</updated>
<author>
<name>Joseph Huber</name>
<email>huberjn@outlook.com</email>
</author>
<published>2024-07-24T15:08:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8d8fa01a66d5051356b698ef0264a01f6aade185'/>
<id>8d8fa01a66d5051356b698ef0264a01f6aade185</id>
<content type='text'>
This reverts commit 550b83d658755664a7f0f93b36242e885743a91b.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 550b83d658755664a7f0f93b36242e885743a91b.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[libc] Remove 'packaged' GPU build support (#100208)"</title>
<updated>2024-07-24T12:51:47+00:00</updated>
<author>
<name>Joseph Huber</name>
<email>huberjn@outlook.com</email>
</author>
<published>2024-07-24T12:51:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=550b83d658755664a7f0f93b36242e885743a91b'/>
<id>550b83d658755664a7f0f93b36242e885743a91b</id>
<content type='text'>
Summary:
I forgot that the OpenMP tests still look for this, reverting for now
until I can make a fix.

This reverts commit c1c6ed83e9ac13c511961e5f5791034a63168e7e.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
I forgot that the OpenMP tests still look for this, reverting for now
until I can make a fix.

This reverts commit c1c6ed83e9ac13c511961e5f5791034a63168e7e.
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Remove 'packaged' GPU build support (#100208)</title>
<updated>2024-07-24T12:22:49+00:00</updated>
<author>
<name>Joseph Huber</name>
<email>huberjn@outlook.com</email>
</author>
<published>2024-07-24T12:22:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c1c6ed83e9ac13c511961e5f5791034a63168e7e'/>
<id>c1c6ed83e9ac13c511961e5f5791034a63168e7e</id>
<content type='text'>
Summary:
Previously, the GPU built the `libc` in a fat binary version that was
used to pass this to the link job in offloading languages like CUDA or
OpenMP. This was mostly required because NVIDIA couldn't consume the
standard static library version. Recent patches have now created the
`clang-nvlink-wrapper` which lets us do that. Now, the C library is just
included implicitly by the toolchain (or passed with -Xoffload-linker
-lc).

This code can be fully removed, which will heavily simplify the build
(and removed some bugs and garbage files I've encoutnered).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
Previously, the GPU built the `libc` in a fat binary version that was
used to pass this to the link job in offloading languages like CUDA or
OpenMP. This was mostly required because NVIDIA couldn't consume the
standard static library version. Recent patches have now created the
`clang-nvlink-wrapper` which lets us do that. Now, the C library is just
included implicitly by the toolchain (or passed with -Xoffload-linker
-lc).

This code can be fully removed, which will heavily simplify the build
(and removed some bugs and garbage files I've encoutnered).</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Update install directory for offloading versions of libraries (#83592)</title>
<updated>2024-03-01T16:48:32+00:00</updated>
<author>
<name>Joseph Huber</name>
<email>huberjn@outlook.com</email>
</author>
<published>2024-03-01T16:48:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=18d0d9b9b2e99ba1d22b9c7c3352f5f9df978d2c'/>
<id>18d0d9b9b2e99ba1d22b9c7c3352f5f9df978d2c</id>
<content type='text'>
Summary:
These currently go to `lib/`, but if the user has `lib/&lt;triple&gt;` they
should go there because it's always searched first.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
These currently go to `lib/`, but if the user has `lib/&lt;triple&gt;` they
should go there because it's always searched first.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Install a single LLVM-IR version of the GPU library (#82791)</title>
<updated>2024-02-23T20:11:43+00:00</updated>
<author>
<name>Joseph Huber</name>
<email>huberjn@outlook.com</email>
</author>
<published>2024-02-23T20:11:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b43dd08aa31f37cb9517a80f394631a7d8ff6b90'/>
<id>b43dd08aa31f37cb9517a80f394631a7d8ff6b90</id>
<content type='text'>
Summary:
Recent patches have allowed us to treat these libraries as direct
builds. This makes it easier to simply build them to a single LLVM-IR
file. This matches the way these files are presented by the ROCm and
CUDA toolchains and makes it easier to work with.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
Recent patches have allowed us to treat these libraries as direct
builds. This makes it easier to simply build them to a single LLVM-IR
file. This matches the way these files are presented by the ROCm and
CUDA toolchains and makes it easier to work with.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Rework the GPU build to be a regular target (#81921)</title>
<updated>2024-02-22T21:29:29+00:00</updated>
<author>
<name>Joseph Huber</name>
<email>huberjn@outlook.com</email>
</author>
<published>2024-02-22T21:29:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=47b7c91abe7af3133a591aa2e73fffa30826f986'/>
<id>47b7c91abe7af3133a591aa2e73fffa30826f986</id>
<content type='text'>
Summary:
This is a massive patch because it reworks the entire build and
everything that depends on it. This is not split up because various bots
would fail otherwise. I will attempt to describe the necessary changes
here.

This patch completely reworks how the GPU build is built and targeted.
Previously, we used a standard runtimes build and handled both NVPTX and
AMDGPU in a single build via multi-targeting. This added a lot of
divergence in the build system and prevented us from doing various
things like building for the CPU / GPU at the same time, or exporting
the startup libraries or running tests without a full rebuild.

The new appraoch is to handle the GPU builds as strict cross-compiling
runtimes. The first step required
https://github.com/llvm/llvm-project/pull/81557 to allow the `LIBC`
target to build for the GPU without touching the other targets. This
means that the GPU uses all the same handling as the other builds in
`libc`.

The new expected way to build the GPU libc is with
`LLVM_LIBC_RUNTIME_TARGETS=amdgcn-amd-amdhsa;nvptx64-nvidia-cuda`.

The second step was reworking how we generated the embedded GPU library
by moving it into the library install step. Where we previously had one
`libcgpu.a` we now have `libcgpu-amdgpu.a` and `libcgpu-nvptx.a`. This
patch includes the necessary clang / OpenMP changes to make that not
break the bots when this lands.

We unfortunately still require that the NVPTX target has an `internal`
target for tests. This is because the NVPTX target needs to do LTO for
the provided version (The offloading toolchain can handle it) but cannot
use it for the native toolchain which is used for making tests.

This approach is vastly superior in every way, allowing us to treat the
GPU as a standard cross-compiling target. We can now install the GPU
utilities to do things like use the offload tests and other fun things.

Some certain utilities need to be built with 
`--target=${LLVM_HOST_TRIPLE}` as well. I think this is a fine
workaround as we
will always assume that the GPU `libc` is a cross-build with a
functioning host.

Depends on https://github.com/llvm/llvm-project/pull/81557</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
This is a massive patch because it reworks the entire build and
everything that depends on it. This is not split up because various bots
would fail otherwise. I will attempt to describe the necessary changes
here.

This patch completely reworks how the GPU build is built and targeted.
Previously, we used a standard runtimes build and handled both NVPTX and
AMDGPU in a single build via multi-targeting. This added a lot of
divergence in the build system and prevented us from doing various
things like building for the CPU / GPU at the same time, or exporting
the startup libraries or running tests without a full rebuild.

The new appraoch is to handle the GPU builds as strict cross-compiling
runtimes. The first step required
https://github.com/llvm/llvm-project/pull/81557 to allow the `LIBC`
target to build for the GPU without touching the other targets. This
means that the GPU uses all the same handling as the other builds in
`libc`.

The new expected way to build the GPU libc is with
`LLVM_LIBC_RUNTIME_TARGETS=amdgcn-amd-amdhsa;nvptx64-nvidia-cuda`.

The second step was reworking how we generated the embedded GPU library
by moving it into the library install step. Where we previously had one
`libcgpu.a` we now have `libcgpu-amdgpu.a` and `libcgpu-nvptx.a`. This
patch includes the necessary clang / OpenMP changes to make that not
break the bots when this lands.

We unfortunately still require that the NVPTX target has an `internal`
target for tests. This is because the NVPTX target needs to do LTO for
the provided version (The offloading toolchain can handle it) but cannot
use it for the native toolchain which is used for making tests.

This approach is vastly superior in every way, allowing us to treat the
GPU as a standard cross-compiling target. We can now install the GPU
utilities to do things like use the offload tests and other fun things.

Some certain utilities need to be built with 
`--target=${LLVM_HOST_TRIPLE}` as well. I think this is a fine
workaround as we
will always assume that the GPU `libc` is a cross-build with a
functioning host.

Depends on https://github.com/llvm/llvm-project/pull/81557</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Fix startup utilities failing to install in full build mode (#82522)</title>
<updated>2024-02-21T23:04:31+00:00</updated>
<author>
<name>Joseph Huber</name>
<email>huberjn@outlook.com</email>
</author>
<published>2024-02-21T23:04:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=049e142badfca3fae5c190c5d4b37acdd2e9c10c'/>
<id>049e142badfca3fae5c190c5d4b37acdd2e9c10c</id>
<content type='text'>
Summary:
Currently, doing `ninja install` will fail in fullbuild mode due to the
startup utilities not being built by default. This was hidden previously
by the fact that if tests were run, it would build the startup utilities
and thus they would be present.

This patch solves this issue by making the `libc-startup` target a
dependncy on the final library. Furthermore we simply factor out the
library install directory into the base CMake directory next to the
include directory handling. This change makes the `crt` files get
installed in `lib/x86_64-unknown-linu-gnu` instead of just `lib`.

This fixes an error I had where doing a runtimes failed to install its
libraries because the install step always errored.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
Currently, doing `ninja install` will fail in fullbuild mode due to the
startup utilities not being built by default. This was hidden previously
by the fact that if tests were run, it would build the startup utilities
and thus they would be present.

This patch solves this issue by making the `libc-startup` target a
dependncy on the final library. Furthermore we simply factor out the
library install directory into the base CMake directory next to the
include directory handling. This change makes the `crt` files get
installed in `lib/x86_64-unknown-linu-gnu` instead of just `lib`.

This fixes an error I had where doing a runtimes failed to install its
libraries because the install step always errored.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Fix issue introduces by #76449</title>
<updated>2024-01-22T03:26:18+00:00</updated>
<author>
<name>Petr Hosek</name>
<email>phosek@google.com</email>
</author>
<published>2024-01-22T03:26:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=04c85587596ab10d885a957a00c8fa22740f15c1'/>
<id>04c85587596ab10d885a957a00c8fa22740f15c1</id>
<content type='text'>
Use correct CMake variable.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use correct CMake variable.
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Redo the install targets (#78795)</title>
<updated>2024-01-19T23:45:22+00:00</updated>
<author>
<name>Petr Hosek</name>
<email>phosek@google.com</email>
</author>
<published>2024-01-19T23:45:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b86d02375eb42db49e375484fe26cb837b316cbf'/>
<id>b86d02375eb42db49e375484fe26cb837b316cbf</id>
<content type='text'>
Prior to this change, we wouldn't build headers that aren't referenced
by other parts of the libc which would result in a build error during
installation. To address this, we make the header target a dependency of
the libc archive. Additionally, we also redo the install targets, moving
the install targets closer to build targets and simplifying the
hierarchy and generally matching what we do for other runtimes.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prior to this change, we wouldn't build headers that aren't referenced
by other parts of the libc which would result in a build error during
installation. To address this, we make the header target a dependency of
the libc archive. Additionally, we also redo the install targets, moving
the install targets closer to build targets and simplifying the
hierarchy and generally matching what we do for other runtimes.</pre>
</div>
</content>
</entry>
</feed>
