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
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
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits