This is an archive of the discontinued LLVM Phabricator instance.

[utils] collect_and_build_with_pgo.py: Print shell commands
Needs ReviewPublic

Authored by kazu on Jan 26 2021, 10:26 PM.

Details

Summary

This patch teaches collect_and_build_with_pgo.py to print shell
commands on --dry-run like:

(cd /home/kazu/llvm-project/llvm/out/instrumented &&
  ninja check-llvm check-clang)

instead of messages like:

Running `['ninja', 'check-llvm', 'check-clang']` in
/home/kazu/llvm-project/llvm/out/instrumented

This way, we could use the python script to generate a shell script
and debug things in the shell script form before updating the python
script. As another use case, we could use the shell script as a
starting point when we wish to heavily customize the build process.
For example, we could reuse the same profile to build several versions
of the optimized compiler with different sets of compiler flags.

Diff Detail

Event Timeline

kazu created this revision.Jan 26 2021, 10:26 PM
kazu requested review of this revision.Jan 26 2021, 10:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 26 2021, 10:26 PM