about summary refs log tree commit diff
path: root/mk
AgeCommit message (Collapse)AuthorLines
2014-03-19mk: Simplify how prepare.mk, install.mk, and dist.mk deal with stagesBrian Anderson-29/+17
The only stage that can be installed from is 2 everywhere but windows, 3 on windows. Closes #12799
2014-03-16auto merge of #12899 : brson/rust/cleanbacktrace, r=alexcrichtonbors-0/+1
After `make clean` I'm seeing the build break with ``` cp: cannot stat ‘x86_64-unknown-linux-gnu/rt/libbacktrace/.libs/libbacktrace.a’: No such file or directory ``` Deleteing the libbacktrace dir entirely on clean fixes.
2014-03-15Test fixes and rebase conflictsAlex Crichton-1/+1
This commit switches over the backtrace infrastructure from piggy-backing off the RUST_LOG environment variable to using the RUST_BACKTRACE environment variable (logging is now disabled in libstd).
2014-03-15log: Introduce liblog, the old std::loggingAlex Crichton-4/+5
This commit moves all logging out of the standard library into an external crate. This crate is the new crate which is responsible for all logging macros and logging implementation. A few reasons for this change are: * The crate map has always been a bit of a code smell among rust programs. It has difficulty being loaded on almost all platforms, and it's used almost exclusively for logging and only logging. Removing the crate map is one of the end goals of this movement. * The compiler has a fair bit of special support for logging. It has the __log_level() expression as well as generating a global word per module specifying the log level. This is unfairly favoring the built-in logging system, and is much better done purely in libraries instead of the compiler itself. * Initialization of logging is much easier to do if there is no reliance on a magical crate map being available to set module log levels. * If the logging library can be written outside of the standard library, there's no reason that it shouldn't be. It's likely that we're not going to build the highest quality logging library of all time, so third-party libraries should be able to provide just as high-quality logging systems as the default one provided in the rust distribution. With a migration such as this, the change does not come for free. There are some subtle changes in the behavior of liblog vs the previous logging macros: * The core change of this migration is that there is no longer a physical log-level per module. This concept is still emulated (it is quite useful), but there is now only a global log level, not a local one. This global log level is a reflection of the maximum of all log levels specified. The previously generated logging code looked like: if specified_level <= __module_log_level() { println!(...) } The newly generated code looks like: if specified_level <= ::log::LOG_LEVEL { if ::log::module_enabled(module_path!()) { println!(...) } } Notably, the first layer of checking is still intended to be "super fast" in that it's just a load of a global word and a compare. The second layer of checking is executed to determine if the current module does indeed have logging turned on. This means that if any module has a debug log level turned on, all modules with debug log levels get a little bit slower (they all do more expensive dynamic checks to determine if they're turned on or not). Semantically, this migration brings no change in this respect, but runtime-wise, this will have a perf impact on some code. * A `RUST_LOG=::help` directive will no longer print out a list of all modules that can be logged. This is because the crate map will no longer specify the log levels of all modules, so the list of modules is not known. Additionally, warnings can no longer be provided if a malformed logging directive was supplied. The new "hello world" for logging looks like: #[phase(syntax, link)] extern crate log; fn main() { debug!("Hello, world!"); }
2014-03-15mk: Clean libbacktrace w/ gustoBrian Anderson-0/+1
After `make clean' I'm seeing the build break with ``` cp: cannot stat ‘x86_64-unknown-linux-gnu/rt/libbacktrace/.libs/libbacktrace.a’: No such file or directory ``` Deleteing the libbacktrace dir entirely on clean fixes.
2014-03-14auto merge of #12896 : alexcrichton/rust/goodbye-extra, r=brsonbors-7/+9
This commit shreds all remnants of libextra from the compiler and standard distribution. Two modules, c_vec/tempfile, were moved into libstd after some cleanup, and the other modules were moved to separate crates as seen fit. Closes #8784 Closes #12413 Closes #12576
2014-03-15docs: begin a "low-level & unsafe code" guide.Huon Wilson-1/+2
This aims to cover the basics of writing safe unsafe code. At the moment it is just designed to be a better place for the `asm!()` docs than the detailed release notes wiki page, and I took the time to write up some other things. More examples are needed, especially of things that can subtly go wrong; and vast areas of `unsafe`-ty aren't covered, e.g. `static mut`s and thread-safety in general.
2014-03-14extra: Put the nail in the coffin, delete libextraAlex Crichton-7/+9
This commit shreds all remnants of libextra from the compiler and standard distribution. Two modules, c_vec/tempfile, were moved into libstd after some cleanup, and the other modules were moved to separate crates as seen fit. Closes #8784 Closes #12413 Closes #12576
2014-03-13auto merge of #12852 : itdaniher/rust/master, r=alexcrichtonbors-1/+1
This enables the lowering of llvm 64b intrinsics to hardware ops, resolving issues around `__kernel_cmpxchg64` on older kernels on ARM devices, and also enables use of the hardware floating point unit, resolving https://github.com/mozilla/rust/issues/10482.
2014-03-13auto merge of #12602 : alexcrichton/rust/backtrace, r=brsonbors-1/+70
Whenever a failure happens, if a program is run with `RUST_LOG=std::rt::backtrace` a backtrace will be printed to the task's stderr handle. Stack traces are uncondtionally printed on double-failure and rtabort!(). This ended up having a nontrivial implementation, and here's some highlights of it: * We're bundling libbacktrace for everything but OSX and Windows * We use libgcc_s and its libunwind apis to get a backtrace of instruction pointers * On OSX we use dladdr() to go from an instruction pointer to a symbol * On unix that isn't OSX, we use libbacktrace to get symbols * Windows, as usual, has an entirely separate implementation Lots more fun details and comments can be found in the source itself. Closes #10128
2014-03-13Add basic backtrace functionalityAlex Crichton-1/+70
Whenever a failure happens, if a program is run with `RUST_LOG=std::rt::backtrace` a backtrace will be printed to the task's stderr handle. Stack traces are uncondtionally printed on double-failure and rtabort!(). This ended up having a nontrivial implementation, and here's some highlights of it: * We're bundling libbacktrace for everything but OSX and Windows * We use libgcc_s and its libunwind apis to get a backtrace of instruction pointers * On OSX we use dladdr() to go from an instruction pointer to a symbol * On unix that isn't OSX, we use libbacktrace to get symbols * Windows, as usual, has an entirely separate implementation Lots more fun details and comments can be found in the source itself. Closes #10128
2014-03-12Test fixes from rolling up PRsAlex Crichton-2/+2
Closes #12803 (std: Relax an assertion in oneshot selection) r=brson Closes #12818 (green: Fix a scheduler assertion on yielding) r=brson Closes #12819 (doc: discuss try! in std::io) r=alexcrichton Closes #12820 (Use generic impls for `Hash`) r=alexcrichton Closes #12826 (Remove remaining nolink usages) r=alexcrichton Closes #12835 (Emacs: always jump the cursor if needed on indent) r=brson Closes #12838 (Json method cleanup) r=alexcrichton Closes #12843 (rustdoc: whitelist the headers that get a § on hover) r=alexcrichton Closes #12844 (docs: add two unlisted libraries to the index page) r=pnkfelix Closes #12846 (Added a test that checks that unary structs can be mutably borrowed) r=sfackler Closes #12847 (mk: Fix warnings about duplicated rules) r=nmatsakis
2014-03-12mk: Fix warnings about duplicated rulesAlex Crichton-4/+4
The footer.tex rule didn't depend on $(1) of the macro it was being defined in, so it was getting duplicated, causing many warnings.
2014-03-12enable mutex lowering and hardware floating point on gnueabihf. closes #10482Ian Daniher-1/+1
2014-03-12std: Move rand to librand.Huon Wilson-6/+7
This functionality is not super-core and so doesn't need to be included in std. It's possible that std may need rand (it does a little bit now, for io::test) in which case the functionality required could be moved to a secret hidden module and reexposed by librand. Unfortunately, using #[deprecated] here is hard: there's too much to mock to make it feasible, since we have to ensure that programs still typecheck to reach the linting phase.
2014-03-11auto merge of #12783 : adrientetar/rust/more-docs, r=alexcrichtonbors-33/+28
- remove `node.js` dep., it has no effect as of #12747 (1) - switch between LaTeX compilers, some cleanups - CSS: fixup the print stylesheet, refactor highlighting code (2) (1): `prep.js` outputs its own HTML directives, which `pandoc` cannot recognize when converting the document into LaTeX (this is why the PDF docs have never been highlighted as of now). Note that if we were to add the `.rust` class to snippets, we could probably use pandoc's native highlighting capatibilities i.e. Kate ([here is](http://adrientetar.github.io/rust-tuts/tutorial/tutorial.pdf) an example of that). (2): the only real highlighting change is for lifetimes which are now brown instead of red, the rest is just refactor of twos shades of red that look the same. Also I made numbers highlighting for src in rustdoc a tint more clear so that it is less bothering. @alexcrichton, @huonw Closes #9873. Closes #12788.
2014-03-11doc: remove outdated tutorial entry, restore removed Makefile entriesAdrien Tétar-3/+3
2014-03-11doc: auto-generate LaTeX includesAdrien Tétar-8/+8
2014-03-10auto merge of #12793 : brson/rust/installer, r=alexcrichtonbors-18/+59
Work towards #9876. Several minor things here: * Fix the `need_ok` function in `configure` * Install man pages with non-executable permissions * Use the correct directory for man pages when installing (this was a recent regression) * Put all distributables in a new `dist/` directory in the build directory (there are soon to be significantly more of these) Finally, this also creates a new, more precise way to install and uninstall Rust's files, the `install.sh` script, and creates a build target (currently `dist-tar-bins`) that creates a binary tarball containing all the installable files, boilerplate and license docs, and `install.sh`. This binary tarball is the lowest-common denominator way to install Rust on Unix. We'll use it as the default installer on Linux (OS X will use .pkg). ## How `install.sh` works * First, the makefiles (`prepare.mk` and `dist.mk`) put all the stuff that needs to be installed in a new directory in `dist/`. * Then it puts `install.sh` in that same directory and a list of all the files to install at `rustlib/manifest`. * Then the directory can be packaged and distributed. * When `install.sh` runs it does some sanity checking then copies everything in the manifest to the install prefix, then copies the manifest as well. * When `install.sh` runs again in the future it first looks for the existing manifest at the install prefix, and if it exists deletes everything in it. This is how the core distribution is upgraded - cargo is responsible for the rest. * `install.sh --uninstall` will uninstall Rust ## Future work: * Modify `install.sh` to accept `--man-dir` etc * Rewrite `install.mk` to delegate to `install.sh` * Investigate how `install.sh` does or doesn't work with .pkg on Mac * Modify `dist.mk` to create `.pkg` files for all hosts * Possibly use [makeself](http://www.megastep.org/makeself/) to create self-extracting installers * Modify dist-snap bots run on mac as well, uploading binary tarballs and .pkg files for the four combos of linux, mac, x86, and x86_64. * Adjust build system to be able to augment versions with '-nightly' * Adjust build system to name dist artifacts without version numbers e.g. `rust-nightly-...pkg`. This is so we don't leave a huge trail of old nightly binaries on S3 - they just get overwritten. * Create new dist-nightly builder * Give the build master a new cron job to push to dist-nightly every night * Add docs to distributables * Update README.md to reflect the new reality * Modernize the website to promote new installers
2014-03-10Implement hexadecimal floating point literals via a syntax extensionDouglas Young-1/+2
closes #1433
2014-03-09mk: Put all distribution artifacts in dist/Brian Anderson-20/+31
Also, add license docs to installers
2014-03-09mk: forcibly delete dest dir when PREPARE_CLEANBrian Anderson-1/+1
2014-03-09mk: Tweak the status messages for prepare.mk to say 'prepare', not 'install'Brian Anderson-4/+4
2014-03-09mk: Use the correct permissions for man pagesBrian Anderson-1/+1
2014-03-09mk: dist-installer builds a binary installerBrian Anderson-0/+22
2014-03-09mk: Optionally clean the destination when preparing install imageBrian Anderson-4/+12
2014-03-09mk: Put man pages in correct directoryBrian Anderson-1/+1
2014-03-09doc: have a real switch b/w LaTeX compilersAdrien Tétar-12/+14
2014-03-09doc: remove node.js dependencyAdrien Tétar-10/+3
`prep.js` outputs its own HTML directives, which `pandoc` cannot recognize when converting the document into LaTeX (this is why the PDF docs have never been highlighted as of now). Note that if we were to add the `.rust` class to snippets, we could probably use pandoc's native highlighting capatibilities i.e. Kate.
2014-03-09mk: only build PDFs of the manual and tutorial.Huon Wilson-2/+12
This restores the old behaviour (as compared to building PDF versions of all standalone docs), because some of the guides use unicode characters, which seems to make pdftex unhappy.
2014-03-09docs: render rustdoc docs with rustdoc, hack around sundown code-fenceHuon Wilson-1/+1
parsing limitations. Sundown parses ``` ~~~ as a valid codeblock (i.e. mismatching delimiters), which made using rustdoc on its own documentation impossible (since it used nested codeblocks to demonstrate how testable codesnippets worked). This modifies those snippets so that they're delimited by indentation, but this then means they're tested by `rustdoc --test` & rendered as Rust code (because there's no way to add `notrust` to indentation-delimited code blocks). A comment is added to stop the compiler reading the text too closely, but this unfortunately has to be visible in the final docs, since that's the text on which the highlighting happens.
2014-03-09mk: rename `check-...-doc-<crate>` to `check-...-doc-crate-<crate>`.Huon Wilson-7/+8
E.g. this stops check-...-doc rules for `rustdoc.md` and `librustdoc` from stamping on each other, so that they are correctly built and tested. (Previously only the rustdoc crate was tested.)
2014-03-09mk: rewrite the documentation handling.Huon Wilson-269/+223
This converts it to be very similar to crates.mk, with a single list of the documentation items creating all the necessary bits and pieces. Changes include: - rustdoc is used to render HTML & test standalone docs - documentation building now obeys NO_REBUILD=1 - testing standalone docs now obeys NO_REBUILD=1 - L10N is slightly less broken (in particular, it shares dependencies and code with the rest of the code) - PDFs can be built for all documentation items, not just tutorial and manual - removes the obsolete & unused extract-tests.py script - adjust the CSS for standalone docs to use the rustdoc syntax highlighting
2014-03-06fix typos with with repeated words, just like this sentence.Kang Seonghoon-1/+1
2014-02-28rustc: Add the concept of a Strict Version HashAlex Crichton-0/+1
This new SVH is used to uniquely identify all crates as a snapshot in time of their ABI/API/publicly reachable state. This current calculation is just a hash of the entire crate's AST. This is obviously incorrect, but it is currently the reality for today. This change threads through the new Svh structure which originates from crate dependencies. The concept of crate id hash is preserved to provide efficient matching on filenames for crate loading. The inspected hash once crate metadata is opened has been changed to use the new Svh. The goal of this hash is to identify when upstream crates have changed but downstream crates have not been recompiled. This will prevent the def-id drift problem where upstream crates were recompiled, thereby changing their metadata, but downstream crates were not recompiled. In the future this hash can be expanded to exclude contents of the AST like doc comments, but limitations in the compiler prevent this change from being made at this time. Closes #10207
2014-02-27Make OS X installer build from /tmp/dist/pkgroot, and have it be part of the ↵Brian Leibig-4/+4
'make dist' target
2014-02-27Add new target 'make dist-osx' to create a .pkg installer for OS XBrian Leibig-1/+33
2014-02-27rustc: Use libnative for the compilerAlex Crichton-2/+2
The compiler itself doesn't necessarily need any features of green threading such as spawning tasks and lots of I/O, so libnative is slightly more appropriate for rustc to use itself. This should also help the rusti bot which is currently incompatible with libuv.
2014-02-25auto merge of #12530 : alexcrichton/rust/make-check-no-rpath, r=brsonbors-5/+7
This involves passing through LD_LIBRARY_PATH through more places, specifically in the compiletest, run-make, and doctest runners.
2014-02-24auto merge of #12465 : huonw/rust/notidy, r=brsonbors-1/+3
tidy has some limitations (e.g. the "checked in binaries" check doesn't and can't actually check git), and so it's useful to run tests without running tidy occasionally.
2014-02-24auto merge of #12453 : alexcrichton/rust/move-json, r=brsonbors-3/+3
This also inverts the dependency between libserialize and libcollections. cc #8784
2014-02-24Move extra::json to libserializeAlex Crichton-3/+3
This also inverts the dependency between libserialize and libcollections. cc #8784
2014-02-24flate: return CVec<u8> rather than copying into a new vector.Huon Wilson-1/+1
This trades an O(n) allocation + memcpy for a O(1) proc allocation (for the destructor). Most users only need &[u8] anyway (all of the users in the main repo), and so this offers large gains.
2014-02-23Move std::{trie, hashmap} to libcollectionsAlex Crichton-1/+1
These two containers are indeed collections, so their place is in libcollections, not in libstd. There will always be a hash map as part of the standard distribution of Rust, but by moving it out of the standard library it makes libstd that much more portable to more platforms and environments. This conveniently also removes the stuttering of 'std::hashmap::HashMap', although 'collections::HashMap' is only one character shorter.
2014-02-22auto merge of #12448 : alexcrichton/rust/smaller-rust, r=brsonbors-4/+6
Two optimizations: 1. Compress `foo.bc` in each rlib with `flate`. These are just taking up space and are only used with LTO, no need for LTO to be speedy. 2. Stop install `librustc.rlib` and friends, this is a *huge* source of bloat. There's no need for us to install static libraries for these components. cc #12440
2014-02-22auto merge of #12433 : alexcrichton/rust/fix-some-config-things, r=brsonbors-0/+4
These are mostly centered around using an external LLVM (notably 3.5)
2014-02-22mk: restore check-notidy.Huon Wilson-1/+3
tidy has some limitations (e.g. the "checked in binaries" check doesn't and can't actually check git), and so it's useful to run tests without running tidy occasionally.
2014-02-21mk: Get "make check" passing with --disable-rpathAlex Crichton-5/+7
This involves passing through LD_LIBRARY_PATH through more places, specifically in the compiletest, run-make, and doctest runners.
2014-02-21mk: Don't install host rlibsAlex Crichton-4/+6
You rarely want to statically link against librustc and friends, so there's no real reason to install the rlib version of these libraries, especially because the rlibs are massive.
2014-02-21Move time out of extra (cc #8784)Arcterus-4/+5