Skip to content
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

Open
jyoungman19111 opened this issue Apr 5, 2021 · 5 comments
Open

Better examples #1285

jyoungman19111 opened this issue Apr 5, 2021 · 5 comments

Comments

@jyoungman19111
Copy link

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.

@smera
Copy link
Member

smera commented Apr 7, 2021

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.
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)

@jyoungman19111
Copy link
Author

jyoungman19111 commented May 27, 2021 via email

@smera
Copy link
Member

smera commented Jun 3, 2021

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 msBuildSearchLocations to point to the MSBuild folder you are using in your example above, and fileNameEntryPoints to point to that project file. The result should be equivalent, BuildXL will schedule an MSBuild call on the given project. The available configuration for the MSBuild resolver is here.

@jyoungman19111
Copy link
Author

jyoungman19111 commented Jun 3, 2021 via email

@smera
Copy link
Member

smera commented Jun 7, 2021

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,
Serge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@smera @jyoungman19111 and others