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

Add SConstruct option 'xml' to request XML trace output #63724

Closed
wants to merge 1 commit into from

Conversation

derammo
Copy link
Contributor

@derammo derammo commented Jul 31, 2022

Summary

This is a tool I added to SConstruct so that I could create XML of what was exactly was built with what options. This allows for analysis or external tooling.

It is very basic and possibly ugly, because I am no SCons expert. I won't be developing this any further, but it works fine in my tool chain, so I am offering it here in case it is useful to others. I will also be sharing my external build tool for running rapid rebuilds in Visual Studio that relies on this, but it is easy enough for me to just always merge this to my development branches, if you don't want to include it.

Instructions

Clean the build, so that everything will be built. Run scons with your usual options and add xml=true. Redirect the output to a file if you want the entire log or | grep __BUILD_DATA_MAGIC_COOKIE__ to get a valid XML document.

@derammo derammo requested a review from a team as a code owner July 31, 2022 12:21
@derammo derammo changed the title adds option 'xml' to request XML trace output adds SConstruct option 'xml' to request XML trace output Jul 31, 2022
@akien-mga akien-mga added this to the 4.0 milestone Jul 31, 2022
@akien-mga
Copy link
Member

akien-mga commented Jul 31, 2022

Is there a specific reason why you need a XML trace instead of using the already available compilation database in JSON format? (compiledb=yes)
The compiledb would also always be correct even if it's not a clean rebuild.

@derammo
Copy link
Contributor Author

derammo commented Jul 31, 2022

Is there a specific reason why you need a XML trace instead of using the already available compilation database in JSON format? (compiledb=yes) The compiledb would also always be correct even if it's not a clean rebuild.

Nope, probably no reason. I just wasted a lot of work :). Thanks. [edit: no I did not, phew]

@derammo
Copy link
Contributor Author

derammo commented Jul 31, 2022

I'll come back if I can't make it work with the JSON that I didn't know about.

@derammo
Copy link
Contributor Author

derammo commented Jul 31, 2022

The JSON file is only the equivalent of the <cxx> and <cc> tags and is unstructured. I can't use it to recreate a build, because there is no information about linking, archiving, or resources.

@derammo derammo reopened this Jul 31, 2022
@derammo derammo force-pushed the derammo_scons_xml branch 2 times, most recently from 0675baf to 191252b Compare August 20, 2022 02:33
@derammo derammo changed the title adds SConstruct option 'xml' to request XML trace output Add SConstruct option 'xml' to request XML trace output Sep 7, 2022
@derammo
Copy link
Contributor Author

derammo commented Sep 15, 2022

Withdrawn. It's easy enough to just apply the patch and probably there won't be many people using this going forward.

@derammo derammo closed this Sep 15, 2022
@derammo derammo deleted the derammo_scons_xml branch September 15, 2022 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants