subprojects: enable proper cross-compile on MinGW of certain crates

The virtgpu_kumquat deps -- used by gfxstream -- don't work
with cross-compile.  This is because they set "native: true" even
for host machine deps.

In addition, some proc-macro deps (which need "native: true") try
to link against host machine deps.

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
This commit is contained in:
Gurchetan Singh 2025-09-26 11:19:46 -07:00
parent b7a5c4a951
commit d60c19fd10
11 changed files with 6 additions and 14 deletions

View file

@ -13,7 +13,6 @@ lib = static_library(
'src/lib.rs',
override_options : ['rust_std=2021', 'build.rust_std=2021'],
rust_abi : 'rust',
native : true,
)
dep_bitflags = declare_dependency(

View file

@ -13,7 +13,6 @@ lib = static_library(
'src/lib.rs',
override_options : ['rust_std=2018', 'build.rust_std=2018'],
rust_abi : 'rust',
native : true,
)
dep_cfg_if = declare_dependency(

View file

@ -16,7 +16,6 @@ lib = static_library(
override_options : ['rust_std=2018', 'build.rust_std=2018'],
link_with: [libc],
rust_abi : 'rust',
native : true,
)
dep_errno = declare_dependency(

View file

@ -35,7 +35,6 @@ lib = static_library(
'src/lib.rs',
rust_abi : 'rust',
override_options : ['rust_std=2021', 'build.rust_std=2021'],
native : true,
rust_args: libc_args,
)

View file

@ -13,7 +13,6 @@ lib = static_library(
'src/lib.rs',
override_options : ['rust_std=2021', 'build.rust_std=2021'],
rust_abi : 'rust',
native : true,
)
dep_log = declare_dependency(

View file

@ -21,5 +21,5 @@ lib = rust.proc_macro(
)
dep_remain = declare_dependency(
link_with : [lib, syn, quote, proc_macro2]
link_with : [lib]
)

View file

@ -36,7 +36,6 @@ lib = static_library(
override_options : ['rust_std=2021', 'build.rust_std=2021'],
link_with : [errno, libc, bitflags],
rust_abi : 'rust',
native : true,
rust_args: rustix_args,
)

View file

@ -18,10 +18,9 @@ lib = static_library(
'src/lib.rs',
override_options : ['rust_std=2021', 'build.rust_std=2021'],
rust_abi : 'rust',
native : true,
link_with : [thiserror_impl, syn, quote, proc_macro2]
link_with : [thiserror_impl]
)
dep_thiserror = declare_dependency(
link_with : [lib, thiserror_impl, syn, quote, proc_macro2]
link_with : [lib]
)

View file

@ -21,5 +21,5 @@ lib = rust.proc_macro(
)
dep_thiserror_impl = declare_dependency(
link_with : [lib, syn, quote, proc_macro2]
link_with : [lib]
)

View file

@ -16,11 +16,10 @@ lib = static_library(
'src/lib.rs',
override_options : ['rust_std=2021', 'build.rust_std=2021'],
rust_abi : 'rust',
native : true,
rust_args: zerocopy_args,
link_with : [zerocopy_derive]
)
dep_zerocopy = declare_dependency(
link_with : [lib, zerocopy_derive]
link_with : [lib]
)

View file

@ -21,5 +21,5 @@ lib = rust.proc_macro(
)
dep_zerocopy_derive = declare_dependency(
link_with : [lib, syn, quote, proc_macro2]
link_with : [lib]
)