New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add LLVM-libc #32500
base: master
Are you sure you want to change the base?
Add LLVM-libc #32500
Conversation
Pull Request assignmentSubmitter: @alfredfo sys-apps/libc-hdrgen: @gentoo/proxy-maint (new package) Linked bugsNo bugs to link found. If your pull request references any of the Gentoo bug reports, please add appropriate GLEP 66 tags to the commit message and request reassignment. If you do not receive any reply to this pull request, please open or link a bug to attract the attention of maintainers. In order to force reassignment and/or bug reference scan, please append Docs: Code of Conduct ● Copyright policy (expl.) ● Devmanual ● GitHub PRs ● Proxy-maint guide |
e9695d2
to
9781fea
Compare
6c03444
to
a38d8fc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, please don't add old snapshots. They're going away anyway.
sys-devel/llvm:${LLVM_MAJOR} | ||
" | ||
|
||
LLVM_COMPONENTS=( llvm libc cmake ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you really have to build it via LLVM? That sounds like a major bad design.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope GCC works too, but I thought so at first because some code relies on Clang internals (apparently same for GCC). I'll remove this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, do you mean llvm/ as root source directory? Yes, I am pretty sure. Also tells you to do that in docs.
From b0fbd0b9c6cc4453e37fd2253221473a34549437 Mon Sep 17 00:00:00 2001 | ||
From: Alfred Persson Forsberg <cat@catcream.org> | ||
Date: Wed, 2 Aug 2023 02:37:38 +0200 | ||
Subject: [PATCH] config.sub: add LLVM libc support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that an upstream patch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we really need to agree with the LLVM people on this and then send it upstream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, but I asked upstream about this and they said -llvm is fine for now. I'll ask again and try to get this upstreamed asap
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any update on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sent a message on #libc now, also mentioned that every autotools based build is currently broken due to "unknown system". I guess I'll wait for a code owner to tell if '-llvm' is fine for fullbuild mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://lists.gnu.org/archive/html/config-patches/2023-10/threads.html#00004 <- waiting for another response
Also merged llvm/llvm-project@d2f9268 and got code owner to agree on arch-vendor-kernel-llvm
as triplet.
I guess we just wait for gnuconfig. @mgorny
Aha okay, I just took the ones listed in llvm.org.eclass. For new packages, should I only add the latest snapshot? |
Yes. Ideally start with getting |
e953912
to
dbbc095
Compare
Pull request CI reportReport generated at: 2023-08-30 11:05 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
|
||
# This is only used for targeting libc/ headers in the current llvm-project directory | ||
# Crossdev has already handled the headers for us | ||
-DCOMPILER_RT_BUILD_SCUDO_STANDALONE_WITH_LLVM_LIBC=$(is_crosspkg OFF ON) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does that actually work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Crossdev already installs the headers when emerging libc with USE=headers-only.
This option should probably be called -DCOMPILER_RT_BUILD_SCUDO_STANDALONE_WITH_LLVM_LIBC_HEADERS_IN_TREE
instead, or something shorter.
Pull request CI reportReport generated at: 2023-09-19 03:36 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
# CMake target to install libc-hdrgen only. | ||
-DBUILD_SHARED_LIBS=OFF | ||
|
||
-DLLVM_INCLUDE_TESTS=$(usex test) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of this if you aren't running tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added just for completeness, I'll remove this for now
) | ||
fi | ||
|
||
cmake_src_configure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CMake Error at CMakeLists.txt:245 (add_subdirectory):
add_subdirectory given source
"/tmp/portage/sys-libs/llvm-libc-18.0.0_pre20231013/work/runtimes/../llvm/utils/llvm-lit"
which is not an existing directory.
After adding the directory:
CMake Error at /tmp/portage/sys-libs/llvm-libc-18.0.0_pre20231013/work/libc/cmake/modules/LLVMLibCLibraryRules.cmake:110 (add_library):
No SOURCES given to target: libc_for_scudo_integration_test
Call Stack (most recent call first):
/tmp/portage/sys-libs/llvm-libc-18.0.0_pre20231013/work/libc/test/integration/scudo/CMakeLists.txt:12 (add_entrypoint_library)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, will take another look once the gnuconfig stuff has been worked out
Signed-off-by: Alfred Persson Forsberg <cat@catcream.org>
b2a4b87
to
95d2878
Compare
Co-authored-by: Michał Górny <mgorny@gentoo.org> Signed-off-by: Alfred Persson Forsberg <cat@catcream.org>
Signed-off-by: Alfred Persson Forsberg <cat@catcream.org>
95d2878
to
6f43b00
Compare
Pull request CI reportReport generated at: 2023-10-16 19:35 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
Pull request CI reportReport generated at: 2023-10-16 19:50 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
No description provided.