Page MenuHomePhabricator

clang: Add support for relative linker paths with -fuse-ld
AbandonedPublic

Authored by keith on May 27 2020, 1:51 PM.

Details

Summary

This adds support for resolving linker executable paths relatively
instead of requiring them to be names, or absolute paths. This is useful
if you're vendoring an in-tree linker, and do not want to potentially
invalidate shared remote caches by using local absolute paths in command
lines.

Diff Detail

Unit TestsFailed

TimeTest
120 mslld.MachO::segments.s
Script: -- : 'RUN: at line 2'; c:\ws\prod\llvm-project\build\bin\llvm-mc.exe -filetype=obj -triple=x86_64-apple-darwin C:\ws\prod\llvm-project\lld\test\MachO\segments.s -o C:\ws\prod\llvm-project\build\tools\lld\test\MachO\Output\segments.s.tmp.o
120 mslld.MachO::x86-64-reloc-signed.s
Script: -- : 'RUN: at line 2'; c:\ws\prod\llvm-project\build\bin\llvm-mc.exe -filetype=obj -triple=x86_64-apple-darwin C:\ws\prod\llvm-project\lld\test\MachO\x86-64-reloc-signed.s -o C:\ws\prod\llvm-project\build\tools\lld\test\MachO\Output\x86-64-reloc-signed.s.tmp.o
140 mslld.MachO::x86-64-reloc-unsigned.s
Script: -- : 'RUN: at line 2'; c:\ws\prod\llvm-project\build\bin\llvm-mc.exe -filetype=obj -triple=x86_64-apple-darwin C:\ws\prod\llvm-project\lld\test\MachO\x86-64-reloc-unsigned.s -o C:\ws\prod\llvm-project\build\tools\lld\test\MachO\Output\x86-64-reloc-unsigned.s.tmp.o

Event Timeline

keith created this revision.May 27 2020, 1:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 27 2020, 1:51 PM
MaskRay added inline comments.May 27 2020, 5:24 PM
clang/test/Driver/fuse-ld.c
7

This changes the working directory. It may be better moving cd tests to the bottom.

keith updated this revision to Diff 267069.May 28 2020, 3:44 PM

Update tests

keith added a comment.May 28 2020, 3:45 PM

Thanks I moved them to the bottom and I believe I fixed them on windows!

keith added a comment.May 28 2020, 4:44 PM

The new test failure appears unrelated to my changes

keith updated this revision to Diff 267991.Jun 2 2020, 2:08 PM

Fix test on windows