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

pkg/build/linux: support building with a custom make binary #5368

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

FlorentRevest
Copy link
Contributor

Certain environments might need a specific make command or wrap make calls with extra logic. This lets users provide a path to a custom make binary.

@FlorentRevest FlorentRevest force-pushed the custom-make branch 2 times, most recently from 377a0ea to 92c50d7 Compare October 2, 2024 13:56
@FlorentRevest FlorentRevest marked this pull request as draft October 2, 2024 14:26
@FlorentRevest FlorentRevest force-pushed the custom-make branch 4 times, most recently from b2f262e to 7167531 Compare October 2, 2024 15:55
@FlorentRevest FlorentRevest marked this pull request as ready for review October 2, 2024 16:08
a-nogikh
a-nogikh previously approved these changes Oct 4, 2024
Copy link
Collaborator

@a-nogikh a-nogikh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

pkg/build/linux.go Outdated Show resolved Hide resolved
tools/syz-testbuild/testbuild.go Outdated Show resolved Hide resolved
@@ -241,8 +242,18 @@ func (env *env) bisect() (*Result, error) {
}

cfg := env.cfg
if err := build.Clean(cfg.Manager.TargetOS, cfg.Manager.TargetVMArch,
cfg.Manager.Type, cfg.Manager.KernelSrc); err != nil {
buildCfg := &instance.BuildKernelConfig{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we can reduce duplication here as it's essentially the same object as the instance.BuildKernelConfig that we create in build(). AFAIK only CompilerBin is different?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the current state close to what you had in mind ? It seems a bit messy to me but maybe with further refactorings or better name we can make it look a bit better

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, no, not exactly. I had a smaller change in mind, local to bisec.go only :)

E.g. have some base instance.BuildKernelConfig field in env and only patch the Compiler field in build() because the rest are absolutely the same.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right, I totally misunderstood you sorry ahah. I'll get back to it on monday

Certain environments might need a specific make command or wrap make
calls with extra logic. This lets users provide a path to a custom make
binary.
@FlorentRevest FlorentRevest force-pushed the custom-make branch 4 times, most recently from f3d372e to 96ed38c Compare October 4, 2024 15:43
This unifies the build() and clean() interfaces such that if a custom
compiler or make binary is provided in the manager or bisection config,
they can be taken into account by the clean() interface.
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