Permalink
Browse files

First attempt musl for static linking

  • Loading branch information...
sevagh committed Apr 3, 2017
1 parent 41ea6c3 commit c06dffa28a2ea253954ebe4bde8ad610846c72b9
Showing with 32 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +31 −0 Makefile
@@ -1 +1,2 @@
target target
rust
@@ -0,0 +1,31 @@
CARGO = rust/bin/cargo
TARGET = x86_64-unknown-linux-musl
CARGO_FLAGS += --target=$(TARGET)
RUSTUP_URL = https://static.rust-lang.org/rustup.sh
include $(CONFIG)
all: build
cargo: rust/bin/cargo
build: cargo
$(CARGO) build $(CARGO_FLAGS)
clean:
$(CARGO) clean $(CARGO_FLAGS)
distclean: clean
-rm -rf rust
rust/rustup.sh:
mkdir -p rust
curl -sSf -o $@ $(RUSTUP_URL)
chmod +x $@
rust/bin/cargo: rust/rustup.sh
$< --disable-sudo --disable-ldconfig --yes --prefix=rust \
--with-target=$(TARGET)
.PHONY: all message build test clean distclean

0 comments on commit c06dffa

Please sign in to comment.