-
Notifications
You must be signed in to change notification settings - Fork 146
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
Better examples #1285
Comments
In order to use MSBuild under BuildXL the code you are trying to build has to comply with MSBuild static graph. This is what allows BuildXL to discover the build graph before the build begins. |
Am I doing something wrong here? I am not invoking a build, just the graph.
MSBuild d:\Test\Code\src\oss\EventLog_Reg\eventlog_reg_VS2019.vcxproj -graph -isolate
Microsoft (R) Build Engine version 16.10.0+4242f381a for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 5/26/2021 5:02:40 PM.
Static graph loaded in 0.296 seconds: 1 nodes, 0 edges
Project "d:\Test\Code\src\oss\EventLog_Reg\eventlog_reg_VS2019.vcxproj" on node 1 (Build target(s)).
InitializeBuildStatus:
Creating "win32\Debug\eventlog_reg.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
All outputs are up-to-date.
ResourceCompile:
All outputs are up-to-date.
Link:
All outputs are up-to-date.
eventlog_reg_VS2019.vcxproj -> v:\code\win32\Debug\bin\rtproglog_eventlog_reg.exe
From: Serge Mera ***@***.***>
Sent: Wednesday, April 7, 2021 1:14 PM
To: microsoft/BuildXL ***@***.***>
Cc: Youngman, James [External/Artech] <[email protected]>; Author ***@***.***>
Subject: [EXTERNAL] Re: [microsoft/BuildXL] Better examples (#1285)
In order to use MSBuild under BuildXL the code you are trying to build has to comply with MSBuild static graph [github.com]<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_dotnet_msbuild_blob_main_documentation_specs_static-2Dgraph.md&d=DwMCaQ&c=jOURTkCZzT8tVB5xPEYIm3YJGoxoTaQsQPzPKJGaWbo&r=xP-E-JQ7-c0Vg44oT8cmSNA7y6J-0y9Y5QWOoO-wl1s&m=qk-JQ5mQvwkpfFHpvMMHf9WTa_qBZ_Z_BPRq2SKiCP8&s=mpZ-RupVOAen7aiQwKnTdlhHNlVIZVE56skqjjFrM18&e=>. This is what allows BuildXL to discover the build graph before the build begins.
My recommendation is to first try to build with plain MSBuild passing /graph. After that gives you a successful build, you can try to add BuildXL on top (BuildXL does not require that your MSBuild-based code builds with /isolate, but in that case you need to disable it with useLegacyProjectIsolation: true as part of the BuildXL MSBuild resolver configuration)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub [github.com]<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_microsoft_BuildXL_issues_1285-23issuecomment-2D815120920&d=DwMCaQ&c=jOURTkCZzT8tVB5xPEYIm3YJGoxoTaQsQPzPKJGaWbo&r=xP-E-JQ7-c0Vg44oT8cmSNA7y6J-0y9Y5QWOoO-wl1s&m=qk-JQ5mQvwkpfFHpvMMHf9WTa_qBZ_Z_BPRq2SKiCP8&s=Ox-GfIR-fx6St_ih7V9E3nkBoD2DScHM8TWk8S9uJ0s&e=>, or unsubscribe [github.com]<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ASFSHAJSM5A6CC5Y5ZPXRG3THSOHDANCNFSM42NF2EWA&d=DwMCaQ&c=jOURTkCZzT8tVB5xPEYIm3YJGoxoTaQsQPzPKJGaWbo&r=xP-E-JQ7-c0Vg44oT8cmSNA7y6J-0y9Y5QWOoO-wl1s&m=qk-JQ5mQvwkpfFHpvMMHf9WTa_qBZ_Z_BPRq2SKiCP8&s=84kwDP2004VQQ-ZH9OTjuQgX7exY4Ygkh6BaRTurJvQ&e=>.
|
If you were able to build that single project with MSBuild, you should be able to achieve the equivalent with MSBuild under BuildXL. Using this as a base example: MSBuildHelloWorld, you can configure |
What is a 'module' from your point of view? An MSBuild project? For your question about the MSBuild behavior when passing '-graph', That option is using a statically computed graph for scheduling, so that it both generates the graph and build is by design. You may want to follow with the MSBuild team/docs for that. My suggestion is 1) get to build that single project you showed above with msbuild + bxl. The result should be the same as doing it with msbuild alone. 2) get to a multi-project build, trying with msbuild first and then with msbuild + bxl. If you get any failures, please feel free to share the logs here. Thanks, |
I would appreciate some better examples of an msbuild project with multiple modules. I have not been able to put together a C++ build based on the current documentation.
The text was updated successfully, but these errors were encountered: