Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xx-cargo: fix vendor for pkg-config and clang #108

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/xx-cargo
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ if [ -n "$rustup" ] || [ ! -f /etc/alpine-release ]; then
fi

if [ ! -f "$done_file" ]; then
xx-clang --setup-target-triple
XX_VENDOR=$vendor xx-clang --setup-target-triple
if [ ! -d "$(rustc --print sysroot)/lib/rustlib/$(xx-info)" ]; then
if [ -n "$rustup" ]; then
execSilent rustup target add "$(xx-info)"
Expand All @@ -73,11 +73,11 @@ if [ ! -f "$done_file" ]; then
touch "$done_file"
fi

export "CARGO_TARGET_$(xx-info | tr '[:lower:]' '[:upper:]' | tr - _)_LINKER=$(xx-info)-clang"
export "CARGO_TARGET_$(xx-info | tr '[:lower:]' '[:upper:]' | tr - _)_LINKER=$(XX_VENDOR=$vendor xx-info)-clang"
if [ -n "$XX_RUSTFLAGS" ]; then
export "CARGO_TARGET_$(xx-info | tr '[:lower:]' '[:upper:]' | tr - _)_RUSTFLAGS=$XX_RUSTFLAGS"
fi
export "CC_$(xx-info | tr - _)=$(xx-info)-clang"
export "CC_$(xx-info | tr - _)=$(XX_VENDOR=$vendor xx-info)-clang"

if which "qemu-$(RISCV64_TARGET_ARCH='' ARM_TARGET_ARCH='' xx-info march)" >/dev/null 2>&1; then
export "CARGO_TARGET_$(xx-info | tr '[:lower:]' '[:upper:]' | tr - _)_RUNNER=qemu-$(RISCV64_TARGET_ARCH='' ARM_TARGET_ARCH='' xx-info march)"
Expand All @@ -88,8 +88,8 @@ if which "qemu-$(RISCV64_TARGET_ARCH='' ARM_TARGET_ARCH='' xx-info march)" >/dev
fi
fi

if command -v "$(xx-info)-pkg-config" >/dev/null 2>/dev/null; then
export "PKG_CONFIG=$(xx-info)-pkg-config"
if command -v "$(XX_VENDOR=$vendor xx-info)-pkg-config" >/dev/null 2>/dev/null; then
export "PKG_CONFIG=$(XX_VENDOR=$vendor xx-info)-pkg-config"
fi

if [ -n "$printtarget" ]; then
Expand Down