Skip to content

move /showIncludes from always_args to ninja_compile_args#15960

Merged
bonzini merged 1 commit into
mesonbuild:masterfrom
peterh:showIncludes
Jul 9, 2026
Merged

move /showIncludes from always_args to ninja_compile_args#15960
bonzini merged 1 commit into
mesonbuild:masterfrom
peterh:showIncludes

Conversation

@peterh

@peterh peterh commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

The /showIncludes flag is required by ninja, but not by any of the other backends. Since this is a ninja-specific requirement, it makes sense to include it with the ninja backend.

Fixes a compile performance regression with the vs backend when using Visual Studio 2026 version 18.7

Fixes #15959

Comment thread mesonbuild/backend/ninjabackend.py Outdated
@dcbaker

dcbaker commented Jun 26, 2026

Copy link
Copy Markdown
Member

We have lots of operations in the Compiler classes that exist for only one backend. What issue are you solving by moving this to the ninja backend instead of being a property of the compiler?

@peterh

peterh commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

What issue are you solving by moving this to the ninja backend instead of being a property of the compiler?

Short version: Compiles take 40% longer than they should with backend=vs.

Long version: See #15959

@dcbaker

dcbaker commented Jun 26, 2026

Copy link
Copy Markdown
Member

I'd prefer if we added a new method to the Compiler class for that, implemented it as return [] for the base compiler, and then specialized it in the VisualStudioLikeMixin, then the ninja backend can call that method to get /showIncludes and the vs and xcode backends can just not call it.

@bonzini

bonzini commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Oh indeed that's the better implementation! Sorry for missing the obvious

@peterh peterh changed the title move /showIncludes from mixins/visualstudio to backend/ninja move /showIncludes from always_args to ninja_compile_args Jun 27, 2026
Comment thread mesonbuild/compilers/compilers.py Outdated
@dcbaker dcbaker added this to the 1.12 milestone Jun 29, 2026
The /showIncludes flag is required by ninja, but not by msbuild. Since this
is a backend-specific requirement, it makes sense to separate it from the
rest of the always_args.

Fixes a compile performance regression with the vs backend when using
Visual Studio 2026 version 18.7

Fixes mesonbuild#15959
@dcbaker

dcbaker commented Jul 9, 2026

Copy link
Copy Markdown
Member

the CI failure is one of those sporadic failures. I've restarted that check, but this looks good to me.

@bonzini, any more comments?

@bonzini bonzini merged commit 802e552 into mesonbuild:master Jul 9, 2026
31 of 32 checks passed
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.

/showIncludes log spam since Visual Studio 2026 version 18.7

4 participants