about summary refs log tree commit diff
path: root/mk/host.mk
AgeCommit message (Collapse)AuthorLines
2017-02-06Delete the `mk` folderAlex Crichton-84/+0
This commit deletes the old build system located in the `mk` folder as it's now been obsoleted for two cycles and is replaced by rustbuild.
2016-02-25mk: Move disable-jemalloc logic into makefilesAlex Crichton-1/+1
The `--disable-jemalloc` configure option has a failure mode where it will create a distribution that is not compatible with other compilers. For example the nightly for Linux will assume that it will link to jemalloc by default as an allocator for executable crates. If, however, a standard library is used which was built via `./configure --disable-jemalloc` then this will fail because the jemalloc crate wasn't built. While this seems somewhat reasonable as a niche situation, the same mechanism is used for disabling jemalloc for platforms that just don't support it. For example if the rumprun target is compiled then the sibiling Linux target *also* doesn't have jemalloc. This is currently a problem for our cross-build nightlies which build many targets. If rumprun is also built, it will disable jemalloc for all targets, which isn't desired. This commit moves the platform-specific disabling of jemalloc as hardcoded logic into the makefiles that is scoped per-platform. This way when configuring multiple targets **without the `--disable-jemalloc` option specified** all targets will get jemalloc as they should.
2016-02-01Revert "mk: fix some undefined variable warnings"Alex Crichton-1/+1
This reverts commit d03712977d7c913044f2b863269c4491d7fa7c36.
2016-02-01mk: fix some undefined variable warningsTamir Duberstein-1/+1
Some of this is scary stuff. Probably time to lint against this. Found with `make --warn-undefined-variables`.
2014-07-23mk: Add space before line continuation backslashBirunthan Mohanathas-2/+2
2014-07-23mk: Remove extra whitespace before line continuation backslashesBirunthan Mohanathas-14/+14
2014-05-07mk: Add libcoreAlex Crichton-3/+5
2014-01-26Refactor the build system for easily adding cratesAlex Crichton-130/+50
Before this patch, if you wanted to add a crate to the build system you had to change about 100 lines across 8 separate makefiles. This is highly error prone and opaque to all but a few. This refactoring is targeted at consolidating this effort so adding a new crate adds one line in one file in a way that everyone can understand it.
2014-01-14Renamed LIBDIR_RELATIVE to CFG_LIBDIR_RELATIVEDerek Guenther-1/+1
2014-01-07Make CFG_LIBDIR configurable. Fixes #5223Jan Niklas Hasse-1/+1
2013-12-24make: Fix deps of rmake tests and host filesAlex Crichton-2/+2
The rmake tests should depend on the target libraries (for linking), not just the host libraries (for running). The host file dependencies are also correct now because HLIBRUSTC_DEFAULT doesn't actually exist.
2013-12-24std: Get stdtest all passing againAlex Crichton-1/+1
This commit brings the library up-to-date in order to get all tests passing again
2013-12-24make: Add all the make support for lib{native,green}Alex Crichton-17/+35
This should now begin distribution of lib{green,native} in rlib/dylib format as well as building them as part of the normal build process.
2013-12-06Link rustllvm statically, and distribute a static snapshotAlex Crichton-10/+2
In order to keep up to date with changes to the libraries that `llvm-config` spits out, the dependencies to the LLVM are a dynamically generated rust file. This file is now automatically updated whenever LLVM is updated to get kept up-to-date. At the same time, this cleans out some old cruft which isn't necessary in the makefiles in terms of dependencies. Closes #10745 Closes #10744
2013-11-29Add generation of static libraries to rustcAlex Crichton-25/+10
This commit implements the support necessary for generating both intermediate and result static rust libraries. This is an implementation of my thoughts in https://mail.mozilla.org/pipermail/rust-dev/2013-November/006686.html. When compiling a library, we still retain the "lib" option, although now there are "rlib", "staticlib", and "dylib" as options for crate_type (and these are stackable). The idea of "lib" is to generate the "compiler default" instead of having too choose (although all are interchangeable). For now I have left the "complier default" to be a dynamic library for size reasons. Of the rust libraries, lib{std,extra,rustuv} will bootstrap with an rlib/dylib pair, but lib{rustc,syntax,rustdoc,rustpkg} will only be built as a dynamic object. I chose this for size reasons, but also because you're probably not going to be embedding the rustc compiler anywhere any time soon. Other than the options outlined above, there are a few defaults/preferences that are now opinionated in the compiler: * If both a .dylib and .rlib are found for a rust library, the compiler will prefer the .rlib variant. This is overridable via the -Z prefer-dynamic option * If generating a "lib", the compiler will generate a dynamic library. This is overridable by explicitly saying what flavor you'd like (rlib, staticlib, dylib). * If no options are passed to the command line, and no crate_type is found in the destination crate, then an executable is generated With this change, you can successfully build a rust program with 0 dynamic dependencies on rust libraries. There is still a dynamic dependency on librustrt, but I plan on removing that in a subsequent commit. This change includes no tests just yet. Our current testing infrastructure/harnesses aren't very amenable to doing flavorful things with linking, so I'm planning on adding a new mode of testing which I believe belongs as a separate commit. Closes #552
2013-10-29support for GNU configure syntaxHeather-1/+1
2013-10-29Move rust's uv implementation to its own crateAlex Crichton-1/+17
There are a few reasons that this is a desirable move to take: 1. Proof of concept that a third party event loop is possible 2. Clear separation of responsibility between rt::io and the uv-backend 3. Enforce in the future that the event loop is "pluggable" and replacable Here's a quick summary of the points of this pull request which make this possible: * Two new lang items were introduced: event_loop, and event_loop_factory. The idea of a "factory" is to define a function which can be called with no arguments and will return the new event loop as a trait object. This factory is emitted to the crate map when building an executable. The factory doesn't have to exist, and when it doesn't then an empty slot is in the crate map and a basic event loop with no I/O support is provided to the runtime. * When building an executable, then the rustuv crate will be linked by default (providing a default implementation of the event loop) via a similar method to injecting a dependency on libstd. This is currently the only location where the rustuv crate is ever linked. * There is a new #[no_uv] attribute (implied by #[no_std]) which denies implicitly linking to rustuv by default Closes #5019
2013-07-09Fix #3225: Incorporate feedback from Graydon.Felix S. Klock II-8/+8
Namely, switched in many places to using GNU make provided functions for directory listing and text processing, rather than spawning a shell process to do that work. In the process of the revision, learned about Target-specific variables, which were very applicable to INSTALL_LIB (which, on a per-recipe basis, was always receiving the same actual arguments for its first two formal parameters in every invocation). http://www.gnu.org/software/make/manual/html_node/Target_002dspecific.html (We might be able to make use of those in future refactorings.) ---- Also adds a cleanup pass to get-snapshot.py as well, since the same problem arises when we unpack libraries from the snapshot archive into a build directory with a prior snapshot's artifacts. (I put this step into the python script rather than the makefile because I wanted to delay the cleanup pass until after we have at least successfully downloaded the tarball. That way, if the download fails, you should not destroy the previous unarchived snapshot libraries and build products.) ---- Also reverted whitespace changes to minimize diff. I plan to put them back in in a dedicated commit elsewhere.
2013-07-07Fix #3225: Check for old Rust libraries when building and installing.Felix S. Klock II-0/+8
When building Rust libraries (e.g. librustc, libstd, etc), checks for and verbosely removes previous build products before invoking rustc. (Also, when Make variable VERBOSE is defined, it will list all of the libraries matching the object library's glob after the rustc invocation has completed.) When installing Rust libraries, checks for previous libraries in target install directory, but does not remove them. The thinking behind these two different modes of operation is that the installation target, unlike the build tree, is not under the control of this infrastructure and it is not up to this Makefile to decide if the previous libraries should be removed.
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-21/+21
This only changes the directory names; it does not change the "real" metadata names.
2013-05-07mk: target.mk host.mk fix for duplicated rules of mingw32 after #6235Young-il Choi-0/+2
2013-05-04Fix another goof: consistently use parent directory of target for rule.Felix S. Klock II-9/+12
(I wonder if there's a better way to write this in the rule itself; i.e. something like `$$(dirname $$@)`. But for now this will do.)
2013-05-04Fix syntax: had to use escaped $$ to have an effect after first expansion.Felix S. Klock II-1/+1
2013-05-03Make build products depend on their target directories.Felix S. Klock II-10/+25
This is an attempt to address Issue #3326 by adding [*order-only*][1] prerequsites of each build product on the directory where it is to go. It is important that the prerequisites be order-only, since the timestamp on a parent directory is not relevant to whether a product is out of date; the parent directory merely needs to exist. (This use case of generating target directories was provided as an [example][2] of how order-only prequisites are used.) [1]: http://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html [2]: http://www.kolpackov.net/pipermail/notes/2004-January/000001.html
2013-03-02mk: cleanup - lib and executable suffix handlingYoung-il Choi-40/+42
2013-02-27mk: rewrite make filesYoung-il Choi-31/+31
2013-02-21mk: Split target triples into bulid triple + host triples + target triplesBrian Anderson-1/+1
For cross compiling to targets that don't want to build a compiler
2012-12-10Reliciense makefiles and testsuite. Yup.Graydon Hoare-0/+10
2012-07-13Even simpler attempt at solving the .dSYM mess.Graydon Hoare-2/+2
2012-07-13Revert "Try less complicated trick for solving the dSYM glob portability issue."Graydon Hoare-0/+11
This reverts commit 86dfca278dd5f9f589cecfe6de91ad8264c300d0.
2012-07-11Try less complicated trick for solving the dSYM glob portability issue.Graydon Hoare-11/+0
2012-07-11Revert "Reorganize lib-glob code to avoid accidentally duplicating lib/ ↵Graydon Hoare-4/+15
subdirectory." This reverts commit 2cf6bf87c348f4a1079aa1c17e51eb45d9b89a5f.
2012-07-11Reorganize lib-glob code to avoid accidentally duplicating lib/ subdirectory.Graydon Hoare-15/+4
2012-05-31Rename librustsyntax to libsyntaxKevin Cantu-5/+5
Per issue #2418.
2012-05-30build: Fix mac build errorsBrian Anderson-1/+1
2012-03-29build: Introduce rustsyntax crateBrian Anderson-2/+13
2012-03-22update promotion rules to not fail when .dsym file does not existNiko Matsakis-1/+8
2012-03-21Avoid mangling names differently in debug builds to work around a build ↵Josh Matthews-3/+6
error. Fix up file name and path debug information, and build one compilation unit for a crate instead of one per source file.
2012-01-26[makefiles] Make rustc depend on librustcMarijn Haverbeke-0/+1
This ensures the lib is not just built, but also copied into the right lib directory when a rustc binary is used as make target.
2011-12-16Update build machinery to build and install librustc everywhere (including ↵Graydon Hoare-0/+8
snapshots).
2011-12-12rustc: build versioned library with hash in its nameHaitao Li-0/+6
Also updated build to install versioned libraries and added a few missing actions for `make clean`.
2011-12-06Establish 'core' library separate from 'std'.Graydon Hoare-0/+16
2011-11-29basic builds functionNiko Matsakis-27/+30
2011-10-31Remove temporary build rulesBrian Anderson-8/+0
2011-10-31Add some transitional build rules for moving libstd.so to libruststd.soBrian Anderson-0/+8
2011-10-02Lots of build system cleanup and documentationBrian Anderson-0/+56
This splits mk/stageN.mk into host.mk and target.mk and makes the build rules somewhat simpler - there's no more building from stageN into stageN+1; instead we always build from stageN(host) to stageN(target) then promote from stageN(target) to stageN+1(host). Add a big honkin explaination right at the top of Makefile.in