]> git.lizzy.rs Git - rust.git/commit
mk: Add support for musl-based builds
authorAlex Crichton <alex@alexcrichton.com>
Tue, 21 Apr 2015 22:42:05 +0000 (15:42 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 27 Apr 2015 17:11:15 +0000 (10:11 -0700)
commitcd980b3bee5bd48e8a6cd4c0d7c8e0fb0fdb64dd
treeb545a394c5ff594eb0ec06d2321440dfe672ceb1
parentba2380d7b328ae59261d134970593c2a2668c690
mk: Add support for musl-based builds

This commit adds support to the makefiles, configuration script, and build
system to understand MUSL. This is broken up into a few parts:

* Any target of the form `*-musl` requires the `--musl-root` option to
  `./configure` which will indicate the root of the MUSL installation. It is
  also expected that there is a libunwind build inside of that installation
  built against that MUSL.

* Objects from MUSL are copied into the build tree for Rust to be statically
  linked into the appropriate Rust library.

* Objects for binary startup and shutdown are included in each Rust installation
  by default for MUSL. This requires MUSL to only be installed on the machine
  compiling rust. Only a linker will be necessary for compiling against MUSL on
  a target machine.

Eventually a MUSL and/or libunwind build may be integrated by default into the
build but for now they are just always assumed to exist externally.
configure
mk/cfg/x86_64-unknown-linux-musl.mk [new file with mode: 0644]
mk/crates.mk
mk/main.mk
mk/prepare.mk
mk/rt.mk
mk/target.mk