diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2023-06-23 13:24:50 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2023-06-27 11:53:18 -0700 |
commit | 6bfb47a455af60dc975e21dd82943d5baa2bea83 (patch) | |
tree | 6128c5a2e95db2b7d7802f48cecd7c4163cf7f23 /test cases/rust | |
parent | 772cb926243e6c3506c48d4e636359f8de397135 (diff) | |
download | meson-6bfb47a455af60dc975e21dd82943d5baa2bea83.zip meson-6bfb47a455af60dc975e21dd82943d5baa2bea83.tar.gz meson-6bfb47a455af60dc975e21dd82943d5baa2bea83.tar.bz2 |
rust: Override the default MSVCRT when linking Rust and !rust together
Rust by default links with the default MSVCRT, (dynamic, release).
MSVCRT's cannot be mixed, so if Meson compiles a C or C++ library and
links it with the debug MSVCRT, then tries to link that with the Rust
library there will be failures. There is no built-in way to fix this for
rustc, so as a workaround we inject the correct arguments early in the
linker line (before any libs at least) to change the runtime. This seems
to work and is recommended as workaround in the upstream rust bug
report: https://github.com/rust-lang/rust/issues/39016.
Given that this bug report has been opened since 2017, it seems unlikely
to be fixed anytime soon, and affects all (currently) released versions
of Rust.
Diffstat (limited to 'test cases/rust')
-rw-r--r-- | test cases/rust/20 rust and cpp/test.json | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test cases/rust/20 rust and cpp/test.json b/test cases/rust/20 rust and cpp/test.json new file mode 100644 index 0000000..c072a6c --- /dev/null +++ b/test cases/rust/20 rust and cpp/test.json @@ -0,0 +1,15 @@ +{ + "matrix": { + "options": { + "b_vscrt": [ + { "val": "none" }, + { "val": "mdd" }, + { "val": "md" }, + { "val": "mtd" }, + { "val": "mt" }, + { "val": "from_buildtype" }, + { "val": "static_from_buildtype" } + ] + } + } +} |