about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorRicardo M. Correia <rcorreia@wizy.org>2014-09-27 05:08:41 +0200
committerRicardo M. Correia <rcorreia@wizy.org>2014-09-29 15:07:14 +0200
commit991f5062481d9b31e468273b76b27b8e14ad2c0a (patch)
tree4b1efe8f1f7fcd0a44f016c3d9ab0ec8cb606e4e /src/rustllvm/RustWrapper.cpp
parent40b86baca0e7e84ece58c2b5f6161371bf672a93 (diff)
downloadrust-991f5062481d9b31e468273b76b27b8e14ad2c0a.tar.gz
rust-991f5062481d9b31e468273b76b27b8e14ad2c0a.zip
rustc: Fix permission denied error in 'ar' when lto is enabled
The reason that 'ar' can fail with permission denied is that when
link-time optimizations are enabled, rustc copies libraries into a
temporary directory, preserving file permissions, and subsequently
modifies them using 'ar'.

The modification can fail because some package managers may install
libraries in system directories as read-only files, which means the
temporary file also becomes read-only when it is copied.

I have fixed this by giving the temporary file's owner read+write
permissions after the copy.

I have also added a regression test for this issue.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions