[PATCH] D87837: [Driver] Remove the deprecation warning for -fuse-ld=/abs/path
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 17 08:51:20 PDT 2020
MaskRay created this revision.
MaskRay added reviewers: chandlerc, hans.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
MaskRay requested review of this revision.
The feature has been used in the widespread build system Bazel
https://github.com/bazelbuild/bazel/commit/cdd0c3cdba270115940e8ca5ec8104cbcd694671
I have notified them about using --ld-path= forwards
https://github.com/bazelbuild/bazel/pull/8580#issuecomment-694321543
but we have to give some transitional period.
Intended for release/11.x for https://bugs.llvm.org/show_bug.cgi?id=47540
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D87837
Files:
clang/lib/Driver/ToolChain.cpp
clang/test/Driver/fuse-ld.c
Index: clang/test/Driver/fuse-ld.c
===================================================================
--- clang/test/Driver/fuse-ld.c
+++ clang/test/Driver/fuse-ld.c
@@ -2,7 +2,8 @@
// RUN: -fuse-ld=/usr/local/bin/or1k-linux-ld 2>&1 \
// RUN: -target x86_64-unknown-linux \
// RUN: | FileCheck %s --check-prefix=CHECK-ABSOLUTE-LD
-// CHECK-ABSOLUTE-LD: warning: '-fuse-ld=' taking a path is deprecated. Use '--ld-path=' instead
+/// TODO: Issue the deprecation warning in a future release.
+// DISABLE-CHECK-ABSOLUTE-LD: warning: '-fuse-ld=' taking a path is deprecated. Use '--ld-path=' instead
// CHECK-ABSOLUTE-LD: /usr/local/bin/or1k-linux-ld
Index: clang/lib/Driver/ToolChain.cpp
===================================================================
--- clang/lib/Driver/ToolChain.cpp
+++ clang/lib/Driver/ToolChain.cpp
@@ -576,12 +576,13 @@
return GetProgramPath(DefaultLinker);
}
+ // TODO Issue the warning in a future release.
// Extending -fuse-ld= to an absolute or relative path is unexpected. Checking
// for the linker flavor is brittle. In addition, prepending "ld." or "ld64."
// to a relative path is surprising. This is more complex due to priorities
// among -B, COMPILER_PATH and PATH. --ld-path= should be used instead.
- if (UseLinker.find('/') != StringRef::npos)
- getDriver().Diag(diag::warn_drv_use_ld_non_word);
+ // if (UseLinker.find('/') != StringRef::npos)
+ // getDriver().Diag(diag::warn_drv_use_ld_non_word);
if (llvm::sys::path::is_absolute(UseLinker)) {
// If we're passed what looks like an absolute path, don't attempt to
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87837.292524.patch
Type: text/x-patch
Size: 1620 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200917/6e445d22/attachment-0001.bin>
More information about the cfe-commits
mailing list