-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
Crash in llvm-lipo (with minimal repro) #59535
Comments
It seems like this might have been fixed in 61e5438 by @thevinster |
I think there is another thing that could be fixed here btw. I think the driver should look for |
I think that would be nice. Although in the macOS case lipo will always exist so I don't think that would have changed anything here. |
But |
I cherry-picked dde23bf and 61e5438. It seems that the crash is fixed (though I did get another, unrelated error: |
Note that in the case of apple's tools you can sometimes override the LTO library path if needed with env vars. |
Is there a link to the |
Ah I think another option for overriding is to create a directory containing only llvm-project/clang/lib/Driver/Driver.cpp Lines 5786 to 5798 in 70ac598
|
Sorry, it was in DMs. But we pretty much only said what was also repeated here.
Sounds like it could work, but then again, I can also make a symlink in the install dir which seems like a cleaner option to me (and I have to call it |
IMHO I just wish there was a way for us to use the full llvm toolchain if you want to avoid problems with LTO. This is probably better discussed in a new issue since this one is full of scope creep now. But I think a flag like |
Stacktrace
Steps to repro
llvm-lipo
tolipo
in the compiler install dirThe flags are also minimal.
My steps to minimize the case (in a not too fine granularity) can be found in the git history here, in case that's interesting: https://github.com/sztomi/llvm-lipo-crash-repro
Context
I was trying to build a PGO-optimized clang on macOS Big Sur using the host Xcode (Apple clang version 13.0.0 (clang-1300.0.29.30)). I ran into all sorts of issues with libtool and lipo:
and
While I was able to use
llvm-libtool-darwin
in place of the Xcode libtool via settingCMAKE_LIBTOOL
, lipo can't be replaced the same way because it's hardcoded in the driver. So I symlinkedllvm-lipo
tolipo
in the install dir (right next to my stage1 clang I was using).The text was updated successfully, but these errors were encountered: