OSDN Git Service

Subzero: Fix -build-atts option.
authorJim Stichnoth <stichnot@chromium.org>
Wed, 13 Jan 2016 21:48:46 +0000 (13:48 -0800)
committerJim Stichnoth <stichnot@chromium.org>
Wed, 13 Jan 2016 21:48:46 +0000 (13:48 -0800)
commit686f35e569f7fac14d357550faed542de261415b
treeaf2e4f3276e0ade185cddbe76b833e53bfdd2c40
parentb0051dfaca6e957fa62ab61c0ef2a42df7964d37
Subzero: Fix -build-atts option.

If the default --target option is not actually included in the Subzero build (via llvm/Config/SZTargets.def), then "pnacl-sz --build-atts" will fail.  This is because the attribute printing is done after the GlobalContext is created, which does some amount of Target initialization.

The fix is to move the attribute printing to a point after the flags are parsed and the output streams are created, but before the GlobalContext is created.  This basically disables --build-atts in the browser build, but that should be OK.

BUG= none
R=kschimpf@google.com

Review URL: https://codereview.chromium.org/1584923002 .
src/IceCompileServer.cpp
src/IceCompiler.cpp