-
Notifications
You must be signed in to change notification settings - Fork 13
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
[CFP] Building LLVM at rev.ng: a report #6
Comments
That does sound unique, I'm curious to learn more 😁 |
Once you have a working mingw toolchain and all LLVM dependencies for Windows, it's not crazily hard. LLVM patches for a successful mingw cross build: They mainly concern building Here you can find the configuration we use: revng/orchestra@800bca6 One key thing is to use libc++ introduces additional challenges. But it seems to work. |
Thanks for taking the time to write up a CFP; we'd be overjoyed to have you present at LLVM Distributors Conf 2021! If you still plan on presenting, this is a reminder to get started on your slides for next week. Once they're done, we will contact you about submitting a PDF of your slides as either a pull request to this repository or via email to the organizer. We hope to have a schedule finalized by EOW; we may iterate on the schedule based on whether presenters have conflicts. Please keep this issue open for attendees to ask questions, or close this issue if you no longer plan on attending. Reminder to keep your talk concise (15 minutes); we wont be doing time for questions in order to fit as much content as possible. Attendees should ask questions here in this github issue. |
Hi @nickdesaulniers, we do intend to present our work and we're happy to have been accepted! |
Firefox for Windows is built on Linux: |
The repository strings that are encoded in binaries should all be configurable via CMake. At the very least you should be able to disable it all by setting LLVM_APPEND_VC_REV=Off. |
Here's the slides I used llvm_at_revng_presentation.pdf |
Thanks for the suggestion @llvm-beanz, I missed that option. Currently trying it out to confirm it won't leak the git remote :) |
I regularly cross build from linux to windows, without any out of tree patches. However for the nested native build of the tblgen tool, there's a rather surprising case where the compiler tool name you've specified for the outer cross build ends up propagated to the nested build of the native tools. If you don't pass the (If you happen to have a matching native build of llvm with the llvm-config and tblgen tools ready made, you can also do e.g. Also regarding cross compiling libc++ and libc++abi - that's indeed a bit tricky, but I've been trying to upstream things to reduce the amount of manual tweaks needed. You can have a look at https://github.com/mstorsjo/llvm-mingw/blob/master/build-libcxx.sh for how I do it. I used to have a bunch of the same hardcoded things that you're listing in your slides, but I've been able to get rid of many of them lately. It's also possible to build both of them at the same time by pointing cmake at Most of the defining of As for needing to set Regarding Regarding Also these days, you don't need to hardcode All in all, it used to be quite tricky - but I've tried to upstream fixes to get rid of much of the trickery needed, and it should be a fair bit less messy now than it used to. |
Thanks a lot for the precious suggestions. We'll look into those. |
Title
Building LLVM at rev.ng: a report
Authors
Alessandro Di Federico ([email protected]), rev.ng
Filippo Cremonese ([email protected]), rev.ng
Distribution
We build and distribute LLVM both for development purposes (sort of an SDK) and as a library for our application.
Abstract
At rev.ng we're building a LLVM-based decompiler with Qt UI.
Our development environment is Linux-only.
We build and distribute LLVM as:
Our own package manager, orchestra, produces binaries that can be used by end-users and developers.
Thanks to RPATH magic, all of our binaries are portable (run them from your
$HOME
) and do not require root to be installed.Also, since we build and link against an ancient glibc, the binaries can run on distributions as old as Debian 7, despite being built on modern systems.
We build LLVM in debug
-O0
, debug-O2
, debug + ASan and release.We'd like to report (and hopefully get feedback) on issues we regularly face when building LLVM:
What makes your distribution of LLVM unique?
What might others learn from your experience?
Struggles and workarounds in building (and cross-building) recent and ancient packages using an clang/libc++ based toolchain.
What could be improved in upstream LLVM to make working with it easier as a downstream packager?
The text was updated successfully, but these errors were encountered: