[PATCH] D43621: [Driver] Allow using a canonical form of '-fuse-ld=' when cross-compiling on Windows.

2018-02-26 Thread Igor Kudrin via Phabricator via cfe-commits
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#

[PATCH] D43621: [Driver] Allow using a canonical form of '-fuse-ld=' when cross-compiling on Windows.

2018-02-26 Thread Reid Kleckner via Phabricator via cfe-commits
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

[PATCH] D43621: [Driver] Allow using a canonical form of '-fuse-ld=' when cross-compiling on Windows.

2018-02-26 Thread Reid Kleckner via Phabricator via 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

[PATCH] D43621: [Driver] Allow using a canonical form of '-fuse-ld=' when cross-compiling on Windows.

2018-02-26 Thread Rui Ueyama via Phabricator via cfe-commits
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 __

[PATCH] D43621: [Driver] Allow using a canonical form of '-fuse-ld=' when cross-compiling on Windows.

2018-02-26 Thread Igor Kudrin via Phabricator via cfe-commits
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 =

[PATCH] D43621: [Driver] Allow using a canonical form of '-fuse-ld=' when cross-compiling on Windows.

2018-02-26 Thread Igor Kudrin via Phabricator via cfe-commits
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"))

[PATCH] D43621: [Driver] Allow using a canonical form of '-fuse-ld=' when cross-compiling on Windows.

2018-02-23 Thread Adrian McCarthy via Phabricator via cfe-commits
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

[PATCH] D43621: [Driver] Allow using a canonical form of '-fuse-ld=' when cross-compiling on Windows.

2018-02-22 Thread Rui Ueyama via Phabricator via cfe-commits
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

[PATCH] D43621: [Driver] Allow using a canonical form of '-fuse-ld=' when cross-compiling on Windows.

2018-02-22 Thread Adrian McCarthy via Phabricator via cfe-commits
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

[PATCH] D43621: [Driver] Allow using a canonical form of '-fuse-ld=' when cross-compiling on Windows.

2018-02-22 Thread Jonas Hahnfeld via Phabricator via cfe-commits
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/

[PATCH] D43621: [Driver] Allow using a canonical form of '-fuse-ld=' when cross-compiling on Windows.

2018-02-22 Thread Adrian McCarthy via Phabricator via cfe-commits
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.

[PATCH] D43621: [Driver] Allow using a canonical form of '-fuse-ld=' when cross-compiling on Windows.

2018-02-22 Thread Igor Kudrin via Phabricator via cfe-commits
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

[PATCH] D43621: [Driver] Allow using a canonical form of '-fuse-ld=' when cross-compiling on Windows.

2018-02-22 Thread Jonas Hahnfeld via Phabricator via cfe-commits
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

[PATCH] D43621: [Driver] Allow using a canonical form of '-fuse-ld=' when cross-compiling on Windows.

2018-02-22 Thread Igor Kudrin via Phabricator via cfe-commits
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