Uh oh!
There was an error while loading. Please reload this page.
Follow symlinks in sysroot - #11750
Conversation
Before this commit, rustc looked in `dirname $0`/../lib for libraries but that doesn't work when rustc is invoked through a symlink. This commit makes rustc look in `dirname $(readlink $0)`/../lib, i.e. it first canonicalizes the symlink before walking up the directory tree. Fixes#3632.
Fixes the following error when executing `make check-lite`: Traceback (most recent call last): File "/home/bnoordhuis/src/rust/src/etc/check-summary.py", line 27, in <module> map(summarise, logfiles) File "/home/bnoordhuis/src/rust/src/etc/check-summary.py", line 10, in summarise with open(fname) as fd: IOError: [Errno 2] No such file or directory: 'tmp/*.log'
alexcrichton
commented
Jan 23, 2014
This is similar to what I implemented in #11734, but I'm not sure that this is the logic that we want for the general case. This only resolves one layer of symlinks, but not multiple layers. I do agree though that the overwhelming usage of symlinking rustc will be to symlink just the binary and none of the parent folders, though. |
bnoordhuis
commented
Jan 23, 2014
Quick question, are the warnings from bors benign? I looked at the buildbot output and the failures seem unrelated to the actual change but I stress the 'seem', I don't really know.
I like your approach. I won't be offended if you reject my PR in favor of yours. Having self_exe_name() would be nice though. |
thestinger
commented
Jan 23, 2014
@bnoordhuis: yeah, it's unrelated breakage from LLVM being updated AFAIK |
alexcrichton
commented
Jan 23, 2014
Ah sorry yeah that's a lot of fallout right now from us trying to upgrade LLVM. I agree that |
alexcrichton
commented
Jan 23, 2014
I forgot to say this earlier, but of course, thanks for the patch! |
…nger Before this commit, rustc looked in `dirname $0`/../lib for libraries but that doesn't work when rustc is invoked through a symlink. This commit makes rustc look in `dirname $(readlink $0)`/../lib, i.e. it first canonicalizes the symlink before walking up the directory tree. Fixes#3632.
Replace if_chain with let chains Closesrust-lang#9353 Let chains are now supported by rustfmt 🎉 The PR is split into two commits 1. The result of running [`if-to-let-chain clippy*/**/*.rs`](https://github.com/Alexendoo/if-to-let-chain) 2. The manual clean up: fixing some errors/formatting, dogfood lints, removing the if_chain internal lint r? `@flip1995` changelog: none
11750: fix: Fix runnables trying to add doc tests in the crate root from #[macro_export] macros r=Veykril a=Veykril Fixesrust-lang/rust-analyzer#11746 bors r+ Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Before this commit, rustc looked in
dirname $0/../lib for librariesbut that doesn't work when rustc is invoked through a symlink.
This commit makes rustc look in
dirname $(readlink $0)/../lib, i.e.it first canonicalizes the symlink before walking up the directory tree.
Fixes#3632.