mirror of
https://github.com/openwrt/packages.git
synced 2025-12-22 19:04:32 +04:00
rust: Consolidate cargo environment variables
This consolidates all environment variables for cargo into:
* CARGO_HOST_CONFIG_VARS / CARGO_PKG_CONFIG_VARS
These contain all cargo-specific environment variables, i.e. without
"common" variables like CC.
* CARGO_HOST_VARS / CARGO_PKG_VARS (renamed from CARGO_VARS)
These contain all environment variables to be passed to cargo.
This also:
* Set the CARGO_BUILD_TARGET environment variable instead of using the
--target command-line option
* Update Python include files to use CARGO_HOST_CONFIG_VARS /
CARGO_PKG_CONFIG_VARS
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
(cherry picked from commit 9db7284d58)
This commit is contained in:
@@ -78,7 +78,7 @@ HOST_PYTHON3_VARS = \
|
||||
CFLAGS="$(HOST_CFLAGS)" \
|
||||
CPPFLAGS="$(HOST_CPPFLAGS) -I$(HOST_PYTHON3_INC_DIR)" \
|
||||
LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON3_VERSION) -Wl$(comma)-rpath$(comma)$(STAGING_DIR_HOSTPKG)/lib" \
|
||||
CARGO_HOME="$(CARGO_HOME)"
|
||||
$(CARGO_HOST_CONFIG_VARS)
|
||||
|
||||
# $(1) => directory of python script
|
||||
# $(2) => python script and its arguments
|
||||
|
||||
@@ -45,10 +45,8 @@ PYTHON3_VARS = \
|
||||
_python_sysroot="$(STAGING_DIR)" \
|
||||
_python_prefix="/usr" \
|
||||
_python_exec_prefix="/usr" \
|
||||
CARGO_BUILD_TARGET="$(RUSTC_TARGET_ARCH)" \
|
||||
CARGO_HOME="$(CARGO_HOME)" \
|
||||
PYO3_CROSS_LIB_DIR="$(PYTHON3_LIB_DIR)" \
|
||||
RUSTFLAGS="$(CARGO_RUSTFLAGS)"
|
||||
$(CARGO_PKG_CONFIG_VARS) \
|
||||
PYO3_CROSS_LIB_DIR="$(PYTHON3_LIB_DIR)"
|
||||
|
||||
# $(1) => directory of python script
|
||||
# $(2) => python script and its arguments
|
||||
|
||||
Reference in New Issue
Block a user