This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Allow cmake options to be passed to satest container
ClosedPublic

Authored by manas on Jul 5 2021, 3:37 PM.

Details

Summary

This patch selects all cmake options and passes them to global cmake
command while building LLVM inside satest docker container.

Prior to this, the cmake command was hard-coded and this would consume
a huge amount of memory while building. There was no support to pass
extra cmake options for the build, except for changing the command
manually. This patch allows testers to pass all "-D*" cmake options to
the build.

Diff Detail

Event Timeline

manas created this revision.Jul 5 2021, 3:37 PM
manas requested review of this revision.Jul 5 2021, 3:37 PM
Herald added a project: Restricted Project. · View Herald Transcript
manas updated this revision to Diff 356574.Jul 5 2021, 4:08 PM

Restore global cmake command

manas added a comment.Jul 5 2021, 4:10 PM

Restore global cmake command

Apparently, my initial observation of LLVM_BUILD_RUNTIME=OFF hogging up memory was false and I also didn't know what was the default value for this option. Hence, I have restored the global cmake command to its previous state.

manas updated this revision to Diff 356575.Jul 5 2021, 4:11 PM
manas edited the summary of this revision. (Show Details)

Edit summary

vsavchenko added inline comments.Jul 6 2021, 12:52 AM
clang/utils/analyzer/entrypoint.py
12

I think we should still use argparse for stuff like this, and we don't want any of these flags to sneak into rest.
https://stackoverflow.com/a/31141568/11582326

manas added inline comments.Jul 6 2021, 4:17 AM
clang/utils/analyzer/entrypoint.py
12

Understood! I will rework on this. Thanks for the review.

manas updated this revision to Diff 356821.Jul 6 2021, 2:32 PM

Pass commands through settings instead of rest

manas marked an inline comment as done.Jul 7 2021, 10:41 AM
vsavchenko accepted this revision.Jul 7 2021, 11:07 AM

Awesome, thanks!

This revision is now accepted and ready to land.Jul 7 2021, 11:07 AM

Gentle ping! I think landing it will make collecting analyzer information easier (in terms of faster build) as more (appropriate) cmake options can be passed via cmdline.

This revision was automatically updated to reflect the committed changes.