Commit d4c46e0f authored by Filip Filmar's avatar Filip Filmar Committed by Anup Patel
Browse files

Makefile: Dereference symlinks on install



Adds the `-L` flag (follow symlinks) to the `cp` commands used to
install `libsbi.a` and `include/sbi/*`.

This should make no difference in regular compilation. However,
it does make a difference when compiling with bazel.  Namely,
bazel's sandboxing will turn all the source files into symlinks.
After installation with `cp` the destination files will be
symlinks pointing to the sandbox symlinks. As the sandbox files
are removed when compilation ends, the just-copied symlinks
become dangling symlinks.

The resulting include files will be
unusable due to the dangling symlink issues. Adding `-L` when
copying ensures that the files obtained by executing the `install`
targets are always dereferenced to files, rather than symlinks,
eliminating this issue.

Signed-off-by: default avatarFilip Filmar <fmil@google.com>
Reviewed-by: default avatarXiang W <wxjstz@126.com>
Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
parent 33f1722f
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment