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', 'src/lib.rs',
override_options : ['rust_std=2021', 'build.rust_std=2021'], override_options : ['rust_std=2021', 'build.rust_std=2021'],
rust_abi : 'rust', rust_abi : 'rust',
native : true,
) )
dep_bitflags = declare_dependency( dep_bitflags = declare_dependency(

View File

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

View File

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

View File

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

View File

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

View File

@@ -21,5 +21,5 @@ lib = rust.proc_macro(
) )
dep_remain = declare_dependency( 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'], override_options : ['rust_std=2021', 'build.rust_std=2021'],
link_with : [errno, libc, bitflags], link_with : [errno, libc, bitflags],
rust_abi : 'rust', rust_abi : 'rust',
native : true,
rust_args: rustix_args, rust_args: rustix_args,
) )

View File

@@ -18,10 +18,9 @@ lib = static_library(
'src/lib.rs', 'src/lib.rs',
override_options : ['rust_std=2021', 'build.rust_std=2021'], override_options : ['rust_std=2021', 'build.rust_std=2021'],
rust_abi : 'rust', rust_abi : 'rust',
native : true, link_with : [thiserror_impl]
link_with : [thiserror_impl, syn, quote, proc_macro2]
) )
dep_thiserror = declare_dependency( 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( 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', 'src/lib.rs',
override_options : ['rust_std=2021', 'build.rust_std=2021'], override_options : ['rust_std=2021', 'build.rust_std=2021'],
rust_abi : 'rust', rust_abi : 'rust',
native : true,
rust_args: zerocopy_args, rust_args: zerocopy_args,
link_with : [zerocopy_derive] link_with : [zerocopy_derive]
) )
dep_zerocopy = declare_dependency( 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( dep_zerocopy_derive = declare_dependency(
link_with : [lib, syn, quote, proc_macro2] link_with : [lib]
) )