Skip to content

Speedup build - #617

Closed
antisaling wants to merge 9 commits into
kworkflow:unstablefrom
antisaling:speedup-build
Closed

Speedup build#617
antisaling wants to merge 9 commits into
kworkflow:unstablefrom
antisaling:speedup-build

Conversation

@antisaling

@antisaling antisaling commented May 26, 2022

Copy link
Copy Markdown
Contributor

This is a smaller version of PR #543, which turned out as a very large discussion that was hindering development and revision, so I preferred to make another, smaller PR. Note: this is based on #616.

Some shellcheck disable statements are redundant as they're already
being dealt with in CI/pre-commit configuration. This commit removes
those redundant statements.

Signed-off-by: Isabella Basso <isabbasso@riseup.net>
As ASICs aren't supported at all in the project, remove lines concerning
such hardware.

Signed-off-by: Isabella Basso <isabbasso@riseup.net>
When used without a number, the `-j` flag will create as many threads as
needed. This works pretty well for small tasks such as when using one of
the various "menu"config utilities or when preparing an environment for
a new compilation.

Signed-off-by: Isabella Basso <isabbasso@riseup.net>
As per [1], the `kw_parse` wrapper should be used instead of the
`getopt` command for command line options parsing in kw. This commit
also improves readability of flags passed in the build test.

[1] - src: kwlib: Create command line parser for kw (48db7ec)

Signed-off-by: Isabella Basso <isabbasso@riseup.net>
This fixes whitespace incoherences that happen when some options are not
used when building the kernel.

Signed-off-by: Isabella Basso <isabbasso@riseup.net>
This should provide a small perfomance improvement as we're skipping
some processing on empty lines.

Signed-off-by: Isabella Basso <isabbasso@riseup.net>
This adds a separate config file for build options, so that they can be
separated as needed, i.e. per-environment (see kworkflow#537).

Signed-off-by: Isabella Basso <isabbasso@riseup.net>
This refactors the usage of optimizations in the compile process, while
still providing the basic `-j"$(nproc)"` functionality through
cpu-scaling options, it also adds support for ccache.

Signed-off-by: Isabella Basso <isabbasso@riseup.net>
…irection

This adds three new flags to the build command, namely:
1. The '--llvm' flag, to allow usage of the llvm toolchain.
2. The '--warnings' flag, to allow the user to see compilation warnings.
3. The '--save-log-to' flag, to allow the user to save `make` output to
   the indicated file.

Signed-off-by: Isabella Basso <isabbasso@riseup.net>
@rodrigosiqueira

Copy link
Copy Markdown
Collaborator

@isinyaaa I think you split this PR into multiple ones, right? If so, can we close this PR?

@antisaling

Copy link
Copy Markdown
Contributor Author

@rodrigosiqueira this one is a new one, which should be the last in the series

@rodrigosiqueira

Copy link
Copy Markdown
Collaborator

I'm going to finish this PR; for this reason, I'm closing PR, and I'll open a new one.
Thanks

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

Successfully merging this pull request may close these issues.

2 participants