ChristofferPass
ChristofferPass

Reputation: 346

Meson build overriding linker option

I am using meson to build a C++ project. It is supposed to be cross-compiled to x86 since it is using x86 libraries internally.

I have provided the argument /MACHINE:x86 to the linker, but I can see that the linker command already contains /MACHINE:x64. The build.ninja file contains this linker rule in the linker command, how do I remove the /MACHINE:x64 from it?

rule cpp_LINKER
 command = "link" $ARGS /MACHINE:x64 /OUT:$out $in $LINK_ARGS

In my cross-compilation file I have defined

[host_machine]
system = 'windows'
cpu_family = 'x86'
cpu = 'x86'
endian = 'little'

[built-in options]
cpp_link_args = ['/MACHINE:x86']
cpp_args = ['/MACHINE:x86']

Upvotes: 0

Views: 34

Answers (0)

Related Questions