Skip to content

Comments

msvc: split multi-token -I/-L values from pkg-config#26637

Merged
medvednikov merged 2 commits intovlang:masterfrom
quaesitor-scientiam:fix/msvc-pkgconfig-split
Feb 21, 2026
Merged

msvc: split multi-token -I/-L values from pkg-config#26637
medvednikov merged 2 commits intovlang:masterfrom
quaesitor-scientiam:fix/msvc-pkgconfig-split

Conversation

@quaesitor-scientiam
Copy link
Contributor

Summary

Fix MSVC handling of pkg-config output where -I/-L values contain multiple tokens
(e.g. -Ifoo -Ibar -Lbaz) by splitting and applying them individually.

What was wrong

pkg-config sometimes returns multiple -I/-L tokens inside a single flag value.
The MSVC builder previously wrapped the entire value into one /I"..." or /LIBPATH:"..."
argument, so embedded -I/-L tokens were passed verbatim inside the string.
MSVC ignored/misparsed those, causing missing include paths (e.g. glibconfig.h).

What changed

The -I and -L branches now split multi-token values and apply each part separately.
This prevents embedded GNU-style tokens from being smuggled inside a single MSVC argument.

Repro

Build a GUI example on Windows with MSVC and vcpkg glib/pango installed; previously
glibconfig.h was missing even though include paths were present.

Tests

Not run (local build of arrows.v succeeded).

Changed files

  • vlib/v/builder/msvc_windows.v

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4f29ee1a0e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@medvednikov medvednikov merged commit 6a1b04c into vlang:master Feb 21, 2026
89 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.

3 participants