This revision was automatically updated to reflect the committed changes.
Closed by commit rL326164: [Driver] Allow using a canonical form of
'-fuse-ld=' when cross-compiling on… (authored by ikudrin, committed
by ).
Changed prior to commit:
https://reviews.llvm.org/D43621?vs=135888&id=136026#
rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.
lgtm
https://reviews.llvm.org/D43621
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rnk added a comment.
In https://reviews.llvm.org/D43621#1019724, @ruiu wrote:
> This change looks good to me, but I think we shouldn't check in an executable
> binary file. Can you create `ld.foo.exe` in the test? Since you don't
> actually run ld.foo.exe, creating that executable should be ver
ruiu added a comment.
This change looks good to me, but I think we shouldn't check in an executable
binary file. Can you create `ld.foo.exe` in the test? Since you don't actually
run ld.foo.exe, creating that executable should be very easy.
https://reviews.llvm.org/D43621
__
ikudrin updated this revision to Diff 135888.
ikudrin added a comment.
- Add a test.
https://reviews.llvm.org/D43621
Files:
lib/Driver/ToolChain.cpp
test/Driver/Inputs/fuse_ld_windows/ld.foo.exe
test/Driver/fuse-ld-windows.c
Index: test/Driver/fuse-ld-windows.c
=
ikudrin added a comment.
Not all toolchains call `ToolChain::GetLinkerPath`. For example, MSVC toolchain
uses its own code:
void visualstudio::Linker::ConstructJob(...) {
...
StringRef Linker = Args.getLastArgValue(options::OPT_fuse_ld_EQ, "link");
if (Linker.equals_lower("lld"))
amccarth added a comment.
In https://reviews.llvm.org/D43621#1017027, @ruiu wrote:
> > That's weird, because lots of lldb tests compile and link test binaries on
> > Windows with `-fuse-ld=lld` (without the `.exe`). What makes you say the
> > `.exe` is necessary?
>
> Maybe he is using clang (n
ruiu added a comment.
> That's weird, because lots of lldb tests compile and link test binaries on
> Windows with `-fuse-ld=lld` (without the `.exe`). What makes you say the
> `.exe` is necessary?
Maybe he is using clang (not clang-cl) and want to use ld.lld.exe instead of
lld-link?
Reposit
amccarth added a comment.
> Right now, we have to add an .exe suffix when using this switch, like
> -fuse-ld=lld.exe.
That's weird, because lots of lldb tests compile and link test binaries on
Windows with `-fuse-ld=lld` (without the `.exe`). What makes you say the
`.exe` is necessary?
Repo
Hahnfeld added a comment.
In https://reviews.llvm.org/D43621#1015888, @amccarth wrote:
> This must be new-ish code, since I've routinely used `-fuse-ld=lld` (without
> `.exe`) on Windows.
Well, since 12/2016: https://reviews.llvm.org/rC289668
Repository:
rC Clang
https://reviews.llvm.org/
amccarth added a comment.
This must be new-ish code, since I've routinely used `-fuse-ld=lld` (without
`.exe`) on Windows.
Repository:
rC Clang
https://reviews.llvm.org/D43621
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.
ikudrin added inline comments.
Comment at: lib/Driver/ToolChain.cpp:415
// second-guess that.
-if (llvm::sys::fs::exists(UseLinker))
+if (llvm::sys::fs::can_execute(UseLinker))
return UseLinker;
Hahnfeld wrote:
> I don't think we should do thi
Hahnfeld added inline comments.
Comment at: lib/Driver/ToolChain.cpp:415
// second-guess that.
-if (llvm::sys::fs::exists(UseLinker))
+if (llvm::sys::fs::can_execute(UseLinker))
return UseLinker;
I don't think we should do this for absolute pa
ikudrin created this revision.
ikudrin added reviewers: phosek, Hahnfeld, logan, rnk.
ikudrin added a project: clang.
Right now, we have to add an `.exe` suffix when using this switch, like
`-fuse-ld=lld.exe`.
If the suffix is omitted, `llvm::sys::fs::exists()` cannot find the file on
Windows,
w
14 matches
Mail list logo