Page MenuHomePhabricator

gcc compatibility: silent -finline-limit=1234 & -finline-limit

Authored by bubbles231 on Jul 3 2014, 9:07 AM.



As clang doesn't support function in-lining, this gcc flag can safely
ignored. Note: some sloppy Makefiles set the flag without a value.
Both of these arguments are now ignored and tests have been updated as appropriate.

Diff Detail

Event Timeline

bubbles231 updated this revision to Diff 11058.Jul 3 2014, 9:07 AM
bubbles231 retitled this revision from to gcc compatibility: silent -finline-limit=1234 & -finline-limit.
bubbles231 updated this object.
bubbles231 edited the test plan for this revision. (Show Details)

We have 9 occurrences of this in our Debian rebuilds:

bubbles231 updated this object.Jul 4 2014, 4:33 AM
bubbles231 edited edge metadata.
rafael added a subscriber: Unknown Object (MLST).Jul 4 2014, 5:52 AM
rafael edited edge metadata.Jul 4 2014, 8:15 AM

adding cfe-commits

joerg added a subscriber: joerg.Jul 4 2014, 8:43 AM

I see two patches in pkgsrc removing use of this and the related -finline-functions-called-once. I don't think this option is popular enough for supporting it.

We have 8 occurrences in Debian of -finline-limit=XXXX and we are already ignoring -finline-limit. I don't see any issue to do the same with the value.

rnk edited edge metadata.Jul 7 2014, 2:30 PM

One alternative is to recognize the flag, but warn on it. An easy way to do this with a poor diagnostic experience is to simply add it to our option table, don't put it into clang_ignored_f_Group, and don't check it in the driver. Clang will emit 'warning: argument unused during compilation '-finline-limit=1234''.

For extra credit, we could have a diagnostic like "ignoring GCC optimization tuning flag" and use that for all GCC optimization flags that don't have analogues in Clang/LLVM.


This should be finline_limit_EQ.

joerg added a comment.Jul 8 2014, 4:51 AM

I agree, the second approach sounds like the best way forward.

bubbles231 abandoned this revision.Jul 11 2014, 5:59 AM

I am closing this revision because I have submitted a patch that
fixes -finline-limit and more: