Skip to content

Meson passing '/NOSTDLIB' instead of '/NODEFAULTLIB' to MS' link.exe #8412

@ManuelAtWork

Description

@ManuelAtWork

When using Meson v0.57.1 and the MSVC 8 (2005) toolchain for a WinCE cross-build, '/NOSTDLIB' is passed to link.exe.
The behaviour produces the following warning:

LINK : warning LNK4044: unrecognized option '/nostdlib'; ignored

Similarly, Meson is passing '-nostdinc++' to cl.exe, which is not understood by the compiler, giving the warning:

cl : Command line warning D9002 : ignoring unknown option '-nostdinc++'

Reproduce
The cross file to reproduce the issue is attached to this ticket. It should work with the MSVC 2005 Express edition, as well as other, more recent versions of MSVC. (wince.zip)

Expected behavior
Instead of '/NOSTDLIB', '/NODEFAULTLIB' should be passed to the MS' link.exe.
Instead of '-nostdinc++', '/X' should be passed to the MS' cl.exe.

system parameters

  • build machine: desktop computer running Win10
  • Meson installed from the pre-built, downloadable MSI package
  • Meson being executed in VS2008 command prompt (referencing the VS2005 toolchain in the cross file)
  • meson --version gives 0.57.1
  • ninja --version gives 1.10.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions