This is an archive of the discontinued LLVM Phabricator instance.

On {mips,mipsel,mips64,mips64el}-freebsd, we need to pass any -G option to the assembler.
ClosedPublic

Authored by dim on May 29 2015, 2:10 PM.

Diff Detail

Event Timeline

brooks updated this revision to Diff 26819.May 29 2015, 2:10 PM
brooks retitled this revision from to On {mips,mipsel,mips64,mips64el}-freebsd, we need to pass any -G option to the assembler..
brooks updated this object.
brooks edited the test plan for this revision. (Show Details)
brooks added reviewers: emaste, theraven, atanasyan.
brooks added subscribers: dim, seanbruno, Unknown Object (MLST).
rnk added a subscriber: rnk.May 29 2015, 2:19 PM
rnk added inline comments.
lib/Driver/Tools.cpp
6746–6748

Any reason not to do A->render(Args, CmdArgs);?

brooks updated this revision to Diff 26837.May 29 2015, 4:21 PM

Remove a spurious -mcpu from the test case.

I may just not understand how render() works, but I tried it and it didn't seem to work to replace

StringRef v = A->getValue();
CmdArgs.push_back(Args.MakeArgString("-G" + v));

with

A->render(Args, CmdArgs);

lib/Driver/Tools.cpp
6746–6748

I may just not understand how render() works, but I tried it and it didn't seem to work. On annoying thing about -G is that it can work as "-G#" or "-G #" which seems to require the getValue() call to construct a -G# that will work with the assembler.

emaste accepted this revision.Dec 26 2015, 2:50 PM
emaste edited edge metadata.
This revision is now accepted and ready to land.Dec 26 2015, 2:50 PM
dim commandeered this revision.Dec 27 2015, 12:46 AM
dim added a reviewer: brooks.

Picking this up, since it needs a minor change to apply.

dim updated this revision to Diff 43652.Dec 27 2015, 12:46 AM
dim edited edge metadata.

Reapplied to the latest trunk.

dim updated this revision to Diff 43655.Dec 27 2015, 2:28 AM

Add a test for passing -G0 to the assembler.

dim closed this revision.Dec 27 2015, 2:40 AM