-
Notifications
You must be signed in to change notification settings - Fork 437
source-build: build llvm-project. #16757
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
Conversation
|
I am looking into why the repo didn't get initialized correctly in the build as this is expected to work |
|
Fix is here - dotnet/arcade-services#2689 |
| <Sha>4234ffac87e305da80597cb46dc0d4a87fc4f7c2</Sha> | ||
| <SourceBuild RepoName="xliff-tasks" ManagedOnly="true" /> | ||
| </Dependency> | ||
| <Dependency Name="runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter" Version="8.0.0-preview.6.23316.4" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64"> |
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.
Ideally this would be defined within the runtime's version.details.xml. Additionally the use of SourceBuildTarball should be updated to just SourceBuild. I am trying to remove the SourceBuildTarball attribute.
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.
I copied it from the old PR. I will update it.
I have no idea what this does. Can you give a short description how this is used, or point me to some doc?
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.
Ideally this would be defined within the runtime's version.details.xml.
You want me to make a PR against https://github.com/dotnet/runtime?
and add
<Dependency Name="runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter" Version="8.0.0-preview.6.23316.4" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/llvm-project</Uri>
<Sha>30e9e6bc2e9f04e0a75daf4b8088ee91f66069da</Sha>
</Dependency>to its eng/Version.Details.xml?
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.
It looks like these are already defined:
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.
Can you give a short description how this is used
It does two things.
-
It indicates that the dependency should be included in the VMR. It specified the digest to include. The version details graph is walked and the first entry wins if there are multiple for a repo.
-
It tells the source build infra to pull in the intermediate package for the repo when building the repo level source build. The intermediate contents pre-populate the local nuget cache for prebuilt detection.
It looks like these are already defined:
One will need the SourceBuild element added to it.
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.
One will need the element added to it.
I don't understand what you mean.
got it, the SourceBuild element.
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.
Apologies, I used angle brackets in my original response and it wasn't rendered. I updated my comment.
|
@tmds @MichaelSimons I don't have a fix for the problem and I don't know what's going wrong there but.. I won't have time until Friday to fix this. Can we, as a workaround (and reading the PR here too), check this in without the We can then wait until the source build tag propagates from runtime where we want to put it anyway. |
|
I have no objection to @premun's proposed workaround. |
Was this handled by 246798d, or is there something else I should do? |
|
Ah, it's now failing because the repo project cannot build the folder that is not there. I think we'd need to do this in 3 stages:
Question - we first need to do dotnet/llvm-project#439 anyway, right? |
Created #16768.
I assume we don't need to wait for dotnet/llvm-project#439 to do this? The sources can be added and won't get compiled until we add this PR. @premun can you add the LLVM repo in the VMR? |
|
So.. I investigated this a bit and git is unable to apply a patch representing the LLVM repo. It only returns a generic error: I could initialize the repo more manually but looking at it, htere's a high number of quite large binaries so I don't think we should just do it without a proper preparation and cloaking rule setup. |
Agreed - the repo is 3.0 G on disk. |
|
All binaries that I can see are under tests. It should be fine to cloak all test directories. |
|
Also, it should be ok to cloak the following top-level directories: |
Do we want the non-cloaked folders to cover only CoreCLR's needs (i.e. objwriter's deps) or also Mono? We need to keep |
I did not know that. We should keep lld for Mono then. |
|
We should an issue to track/fix all the UX issues related to adding a new repo to the VMR. @tmds, is that something you can do? |
We're looking into fixing the issues as we encounter them. If there are things we're not fixing now, I think @premun and @MichaelSimons will create issues to track them. |
|
I will start looking today into the failing |
|
@premun thanks. I will let you and @MichaelSimons add the |
|
@directhex what is the right way to test whether the trimmed llvm repo works for Mono? |
Co-authored-by: Přemek Vysoký <[email protected]>
|
Looking at the build, to make this work, we'd have to temporarily add the |
|
@premun since I have this PR open, I assume you will have permissions to push to my branch. Feel free to do so. |
This reverts commit 246798d.
|
Seems like
|
|
I've done few more investigations and, interestingly, if the I suspect this is a bug in But right now, it's failing on some build error that I will let @directhex or possibly someone else hash out. EDIT: These are the largest files in |
It looks like something the changes made in dotnet/llvm-project#439 to |
|
Ok, so got in touch with git maintainers and the problem with git not processing the patch is that in October, they introduced a 1GB cap on patch size due to some problems with types they use during parsing.
I am not in favour of bringing python into the mix so I think we should just detect >1GB patches and in that case, we can just piece the patches by top-level folder (recursively) and solve this. |
|
@premun what is still needed to finish this PR? |
|
|
Can we start by getting the llvm-project into the vmr so it gets built but without wiring it up further? For that, I believe we need to finish this PR, and dotnet/llvm-project#439? |
|
Yes, that PR has to go through so that we can verify that it source-builds at the repo level. There's no point adding the repo in the VMR yet though. Or is there a reason for that? Personally, I would do that as late as possible. We were already about to do that once and didn't end up doing that. I think adding the repo will increase the size of the repo quite a lot so until we can plug it in and start using it, I'd rather wait. |
I'm still stuck at get the llvm-project in the vmr (dotnet/source-build#1215 (comment)). |
|
We no longer need to integrate llvm-project to have NativeAOT in .NET 9. |
Why is that? |
They switched to a c# version of the objwriter. |
Contributes to dotnet/source-build#1215.
@MichaelSimons @premun ptal
cc @omajid @ashnaga