rust/mk
bors 606e4b26c7 Auto merge of #26252 - bluss:relative-paths, r=alexcrichton
mk: Build crates with relative source file paths

The path we pass to rustc will be visible in panic messages and
backtraces: they will be user visible!

Avoid junk in these paths by passing relative paths to rustc.

For most advanced users, `libcore` or `libstd` in the path will be
a clue to the location -- inside our code, not theirs.

Store both the relative path to the source as well as the absolute.
Use the relative path where it matters, compiling the main crates,
instead of changing all of the build process to cope with relative
paths.

Example output after this patch:

```
$ ./testunwrap
thread '<main>' panicked at 'called `Option::unwrap()` on a `None` value', ../src/libcore/option.rs:362
$ RUST_BACKTRACE=1 ./testunwrap
thread '<main>' panicked at 'called `Option::unwrap()` on a `None` value', ../src/libcore/option.rs:362
stack backtrace:
   1:     0x7ff59c1e9956 - sys::backtrace::write::h67a542fd2b201576des
                        at ../src/libstd/sys/unix/backtrace.rs:158
   2:     0x7ff59c1ed5b6 - panicking::on_panic::h3d21c41cdd5c12d41Xw
                        at ../src/libstd/panicking.rs:58
   3:     0x7ff59c1e7b6e - rt::unwind::begin_unwind_inner::h9f3a5440cebb8baeLDw
                        at ../src/libstd/rt/unwind/mod.rs:273
   4:     0x7ff59c1e7f84 - rt::unwind::begin_unwind_fmt::h4fe8a903e0c296b0RCw
                        at ../src/libstd/rt/unwind/mod.rs:212
   5:     0x7ff59c1eced7 - rust_begin_unwind
   6:     0x7ff59c22c11a - panicking::panic_fmt::h00b0cd49c98a9220i5B
                        at ../src/libcore/panicking.rs:64
   7:     0x7ff59c22b9e0 - panicking::panic::hf549420c0ee03339P3B
                        at ../src/libcore/panicking.rs:45
   8:     0x7ff59c1e621d - option::Option<T>::unwrap::h501963526474862829
   9:     0x7ff59c1e61b1 - main::hb5c91ce92347d1e6eaa
  10:     0x7ff59c1f1c18 - rust_try_inner
  11:     0x7ff59c1f1c05 - rust_try
  12:     0x7ff59c1ef374 - rt::lang_start::h7e51e19c6677cffe5Sw
                        at ../src/libstd/rt/unwind/mod.rs:147
                        at ../src/libstd/rt/unwind/mod.rs:130
                        at ../src/libstd/rt/mod.rs:128
  13:     0x7ff59c1e628e - main
  14:     0x7ff59b3f6b44 - __libc_start_main
  15:     0x7ff59c1e6078 - <unknown>
  16:                0x0 - <unknown>
```
2015-06-14 11:20:36 +00:00
..
cfg mk: Tweak the LIB_GLOB for MSVC 2015-06-11 14:15:36 -07:00
clean.mk mk: Enable building LLVM targeting MSVC 2015-05-19 10:52:57 -07:00
crates.mk mk: Build crates with relative paths to rustc 2015-06-13 01:41:52 +02:00
ctags.mk Fix make TAGS.emacs. 2014-12-16 17:08:49 +01:00
debuggers.mk debuginfo: Create common debugger pretty printer module. 2015-05-30 20:06:08 +02:00
dist.mk mk: Don't build compiler-docs before installation. #25699 2015-05-22 13:02:52 -07:00
docs.mk Auto merge of #25836 - steveklabnik:gh25305, r=alexcrichton 2015-06-09 23:11:25 +00:00
grammar.mk Add a LALR grammar for Rust with testing support 2015-01-20 18:47:17 -08:00
host.mk mk: Add space before line continuation backslash 2014-07-23 08:44:11 -07:00
install.mk configure: Remove obsolete --disable-verify option 2015-04-08 12:16:47 -07:00
llvm.mk mk: Add the ability to depend on native LLVM tools 2015-05-19 10:53:04 -07:00
main.mk mk: Build crates with relative paths to rustc 2015-06-13 01:41:52 +02:00
perf.mk
platform.mk mk: Ensure LINK_$(1) is defined for all targets 2015-05-26 10:05:46 -07:00
prepare.mk Replace nop hack, explain substitution reasoning 2015-06-13 17:27:12 +01:00
reconfig.mk mk: Build crates with relative paths to rustc 2015-06-13 01:41:52 +02:00
rt.mk mk: Fix building compiler-rt on MSVC 2015-05-19 10:52:57 -07:00
rustllvm.mk mk: Fix MSVC build for rustllvm.lib 2015-05-19 10:52:57 -07:00
snap.mk
stage0.mk mk/stage0: complain instead of creating an empty file 2014-11-20 16:00:12 -05:00
target.mk mk: Fix MSVC bootstrapping itself 2015-05-27 19:36:28 -07:00
tests.mk Auto merge of #25654 - petrochenkov:encenv, r=alexcrichton 2015-06-02 02:08:17 +00:00
util.mk mk: Build crates with relative paths to rustc 2015-06-13 01:41:52 +02:00