This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Add disabled-by-default -Wuse-ld-path for the deprecation warning for -fuse-ld=/abs/path
ClosedPublic

Authored by MaskRay on Sep 17 2020, 8:51 AM.

Details

Summary

The warning is currently not under a -W option, so it cannot be suppressed.
This is annoying for the widespread build system Bazel for specifying the path to gold
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

Diff Detail

Event Timeline

MaskRay created this revision.Sep 17 2020, 8:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 17 2020, 8:51 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
MaskRay requested review of this revision.Sep 17 2020, 8:51 AM

FWIW, I would like to see *something* like this (both in the release and on trunk) but not sure this is actually the patch we want... Clang typically uses FIXME comments, and doesn't leave commented out code...

I feel like this should be an off-by-default warning, with an actual warning flag maybe?

MaskRay updated this revision to Diff 292973.Sep 19 2020, 9:29 AM
MaskRay retitled this revision from [Driver] Remove the deprecation warning for -fuse-ld=/abs/path to [Driver] Add disabled-by-default -Wuse-ld-non-word for the deprecation warning for -fuse-ld=/abs/path.
MaskRay edited the summary of this revision. (Show Details)

Add a warning flag

Rather than "non-word" maybe "path" would be more legible (that's the terminology the message text uses, and seems shorter/clearer in the warning name/constant name/etc), ie: -Wuse-ld-path

(how do other warnings about flags do naming regarding the 'f' (or 'g', etc) prefix - maybe "-Wfuse-ld-path" would be a more clear?)

MaskRay updated this revision to Diff 292989.Sep 19 2020, 1:50 PM
MaskRay retitled this revision from [Driver] Add disabled-by-default -Wuse-ld-non-word for the deprecation warning for -fuse-ld=/abs/path to [Driver] Add disabled-by-default -Wuse-ld-path for the deprecation warning for -fuse-ld=/abs/path.
MaskRay edited the summary of this revision. (Show Details)

Adopt dblaikie's suggestion: -Wfuse-ld-path

Good to confirm with Dave of course, but this looks pretty great to me, and thanks so much!

dblaikie accepted this revision.Sep 19 2020, 3:40 PM

Good to confirm with Dave of course, but this looks pretty great to me, and thanks so much!

Works for me too!

This revision is now accepted and ready to land.Sep 19 2020, 3:40 PM