pnacl-ld: Don't run expand-varargs with relocatable output
pnacl-ld: Don't run expand-varargs with relocatable output

When manually running expand-varargs in pnacl-ld (i.e. when not running the
other ABI simplifications due to use of zerocost EH or build ID), only run
expand-varargs when doing a final bitcode link. Otherwise the opt/simplify
step in the final link sees an inconsistent view of any functions that were
in the relocatable link.

Also move expand-varargs to before optimizations for consistency with the
"normal" case (as defined in LLVM).

BUG=none
(but causes breakage in the current LLVM 3.7 merge)

R=jfb@chromium.org, jvoung@chromium.org

Review URL: https://codereview.chromium.org/1135393006

cohortfsllc/cohort-cocl2-sandbox,cohortfsllc/cohort-cocl2-sandbox,cohortfsllc/cohort-cocl2-sandbox,cohortfsllc/cohort-cocl2-sandbox,cohortfsllc/cohort-cocl2-sandbox,cohortfsllc/cohort-cocl2-sandbox