This is a second attempt at https://gerrit.lix.systems/c/lix/+/5516
instead of letting meson try to be cargo we'll just have cargo at home.
this requires some contortions to link everything together due to quite
a few meson deficiencies, but at the end we get to pretend that rust is
just c++ painted orange. we'll use cxx to bring real interop back soon.
also fixes #1230
also reverts 10845bfe63
co-authored-by: eldritch horrors <pennae@lix.systems>
Change-Id: Ib1fda843fa80d818705d5a65ec9054216a6a6964
15 lines
415 B
TOML
15 lines
415 B
TOML
[target.'cfg(true)']
|
|
rustflags = [
|
|
# rustc will pass `-nodefaultlibs` without this, but we need the C++ standard library.
|
|
'-Cdefault-linker-libraries=yes',
|
|
]
|
|
|
|
[target.'cfg(target_env = "musl")']
|
|
rustflags = [
|
|
'-Cdefault-linker-libraries=yes',
|
|
# musl, at least in Nixpkgs, is not compiled with -fPIE.
|
|
# XXX: nevermind? as of Nixpkgs 26.05??
|
|
# Oh gods do we need to gate this??
|
|
#'-Crelocation-model=static',
|
|
]
|