macros: pass CFLAGS/CXXFLAGS to the processes started by cargo
This is mainly targeted to the crates using `rust-cc`, where we want to apply system-wide compiler flags when invoking the compiler. `cc` supports CFLAGS and CXXFLAGS, but we never set those. Defining that per project is not possible, as we have no way to inherit any build context from a dependency package. Possibly also affects: `bindgen`, `cxx`, any other crate that invokes the C/C++ compiler and passes the CFLAGSS
This commit is contained in:
parent
aa6282874f
commit
f1be3a0d4d
1 changed files with 5 additions and 0 deletions
|
@ -22,6 +22,11 @@ rustc = "%{__rustc}"\
|
|||
rustdoc = "%{__rustdoc}"\
|
||||
rustflags = %{__global_rustflags_toml}\
|
||||
\
|
||||
[env]\
|
||||
CFLAGS = "%{build_cflags}"\
|
||||
CXXFLAGS = "%{build_cxxflags}"\
|
||||
LDFLAGS = "%{build_ldflags}"\
|
||||
\
|
||||
[install]\
|
||||
root = "%{buildroot}%{_prefix}"\
|
||||
\
|
||||
|
|
Loading…
Reference in a new issue