Skip to content

Comments

[LLVM] Silence compiler-rt warning in runtimes build#99525

Merged
jhuber6 merged 1 commit intollvm:mainfrom
jhuber6:compiler-rt
Jul 18, 2024
Merged

[LLVM] Silence compiler-rt warning in runtimes build#99525
jhuber6 merged 1 commit intollvm:mainfrom
jhuber6:compiler-rt

Conversation

@jhuber6
Copy link
Contributor

@jhuber6 jhuber6 commented Jul 18, 2024

Summary:
The compiler-rt project wants LLVM_CMAKE_DIR but the
llvm_ExternalProject_add interface sets the LLVM_CONFIG_PATH. This
patch just makes the utility pass that as well.

Summary:
The `compiler-rt` project wants `LLVM_CMAKE_DIR` but the
`llvm_ExternalProject_add` interface sets the `LLVM_CONFIG_PATH`. This
patch just makes the utility pass that as well.
@llvmbot llvmbot added the cmake Build system in general and CMake in particular label Jul 18, 2024
Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do LLVM_CONFIG_PATH and LLVM_CMAKE_PATH interact? If they don't then, we should be good.

@jhuber6
Copy link
Contributor Author

jhuber6 commented Jul 18, 2024

How do LLVM_CONFIG_PATH and LLVM_CMAKE_PATH interact? If they don't then, we should be good.

Not sure myself, they seem to just point to different things and compiler-rt prefers the other one. I think it uses some CMake file operations to get the CMake path from the config path.

@compnerd
Copy link
Member

  if (LLVM_CONFIG_PATH AND NOT LLVM_CMAKE_DIR)
    message(WARNING
      "LLVM_CONFIG_PATH is deprecated, please use LLVM_CMAKE_DIR instead")

It seems that they do interact, with LLVM_CMAKE_DIR taking precedence, which sounds good to me.

@jhuber6
Copy link
Contributor Author

jhuber6 commented Jul 18, 2024

  if (LLVM_CONFIG_PATH AND NOT LLVM_CMAKE_DIR)
    message(WARNING
      "LLVM_CONFIG_PATH is deprecated, please use LLVM_CMAKE_DIR instead")

It seems that they do interact, with LLVM_CMAKE_DIR taking precedence, which sounds good to me.

Alright, thanks for the fast review.

While you're here, I need to get the compiler-rt tests running on the GPU before I can say it's "supported". One problem is that we don't actually create any tests when compiling the builtins through the LLVM_ENABLE_RUNTIMES= approach. This is because we include the compiler-rt/lib/builtins CMake directly. I think we will need to add some logic to configure the builtin tests even when done standalone, which would be step 1.

The next step would be adding logic for executing the tests under an "emulator", i.e. amdhsa-loader a.out in my case, as well as adding some minimal code to provide the "_start" function on the GPU (this is in libc but I don't want the dependency). I think the libcxx project has https://discord.com/channels/636084430946959380/636732535434510338/1263520163290943631 which takes %{exe} as an optional argument. Any thoughts?

@jhuber6 jhuber6 merged commit f6f88f4 into llvm:main Jul 18, 2024
searlmc1 pushed a commit to ROCm/llvm-project that referenced this pull request Jul 21, 2024
revert: [LLVM] Silence compiler-rt warning in runtimes build (llvm#99525)
revert: 72ff049 [ValueTracking] Consistently propagate `DemandedElts` is `isKnownNonZero`

Change-Id: Ifb72990d2870037f00d502a0ccbd1bebef7cb1d7
omjavaid added a commit that referenced this pull request Jul 25, 2024
This patch broke LLVM Flang build on Windows. PR #100202
This reverts commit f6f88f4.
yuxuanchen1997 pushed a commit that referenced this pull request Jul 25, 2024
Summary:
The `compiler-rt` project wants `LLVM_CMAKE_DIR` but the
`llvm_ExternalProject_add` interface sets the `LLVM_CONFIG_PATH`. This
patch just makes the utility pass that as well.

Test Plan: 

Reviewers: 

Subscribers: 

Tasks: 

Tags: 


Differential Revision: https://phabricator.intern.facebook.com/D60250949
yuxuanchen1997 pushed a commit that referenced this pull request Jul 25, 2024
Summary:
This patch broke LLVM Flang build on Windows. PR #100202
This reverts commit f6f88f4.

Test Plan: 

Reviewers: 

Subscribers: 

Tasks: 

Tags: 


Differential Revision: https://phabricator.intern.facebook.com/D60250542
llvmbot pushed a commit to llvmbot/llvm-project that referenced this pull request Aug 8, 2024
)"

This patch broke LLVM Flang build on Windows. PR llvm#100202
This reverts commit f6f88f4.

(cherry picked from commit 73d862e)
tru pushed a commit to llvmbot/llvm-project that referenced this pull request Aug 10, 2024
)"

This patch broke LLVM Flang build on Windows. PR llvm#100202
This reverts commit f6f88f4.

(cherry picked from commit 73d862e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmake Build system in general and CMake in particular

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants