question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Debug: Add verbosity to cmake (LLVM) and make (Linux) options

See original GitHub issue

Last weekend I finished a marathon in building a ThinLTO and PGO optimized LLVM toolchain - optimized here means for Linux v5.9-rc2 with Clang-CFI enabled (details see [0] and especially my request on this one here in [1]).

While gasping at the the following section:

==  Building kernels  ==
========================

+ for TARGET in "${TARGETS[@]}"
+ case ${TARGET} in
+ make -skj4 O=out LLVM=1 distclean defconfig bzImage modules

real    45m56.082s
user    166m53.758s
sys     8m11.487s

$ du -s -m ~/src/linux-kernel/git/out
540     /home/dileks/src/linux-kernel/git/out

Several minutes you do not get a feedback.

For me watching the make V=1 lines of a Linux-kernel build is psychologically fundamental - it calms me down - and besides helpful to see what’s going on and warnings etc.

Same can be done for cmake and the LLVM build-process (where I am personally and psychologically not interested).

Can we rename Building kernels to Building Linux and remove the double space to be consistent with the other section names?

$ grep '^\==  Building' log_tc-build.txt
==  Building kernels  ==

$ grep '^\== Building' log_tc-build.txt
== Building LLVM stage 1 ==
== Building LLVM stage 2 ==
== Building PGO profiles ==
== Building LLVM stage 3 ==

Side-note: Shouldn’t this be named “Generating PGO profiles”?

[0] https://github.com/ClangBuiltLinux/tc-build/issues/109 [1] https://github.com/ClangBuiltLinux/tc-build/issues/109#issuecomment-683355211 [2] https://github.com/samitolvanen/linux/commits/clang-cfi

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
msfjarviscommented, Sep 1, 2020

Well,

Short answer

image

Longer answer: Building the kernel is a profiling task, and what goes on during the actual build is inconsequential in the grand scheme of things: building a Clang compiler. I can’t answer for your psychological requirements, but to keep track of what’s happening in the kernel build you can simply use htop to monitor make calls. What you’re looking for is an extremely niche requirement that’s not useful to other tc-build users so I’d recommend simply carrying a local patch for make V=1 if its important to you. I’ll look into the formatting issues.

0reactions
msfjarviscommented, Sep 12, 2020

#115 has been filed for the formatting fixes, there is not going to be a debug option in the scripts so I’m closing this issue as resolved.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Building LLVM with CMake — LLVM 16.0.0git documentation
The Options and variables section is a reference for customizing your build. If you already have experience with CMake, this is the recommended...
Read more >
Verbose cmake: How to get more diagnostics? - Stack Overflow
I would like to get more diagnostics from cmake, i.e. what and why it does, but searching for "cmake verbose" instead gives results...
Read more >
Cross Platform Make - CMake
--debug-trycompile : Do not delete the try compile directories. ... If APPEND is specified the COMMAND and DEPENDS option values are appended to...
Read more >
User Interaction Guide — CMake 3.25.1 Documentation
First, CMake must be instructed to generate a suitable buildsystem, then the user invokes a build tool to process that generated buildsystem. The...
Read more >
cmake-generator-expressions(7)
check prevents adding anything if the property is empty, # assuming the ... After running cmake , you can then build the genexdebug...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found