| Index: pnacl/driver/pnacl-ld.py
|
| diff --git a/pnacl/driver/pnacl-ld.py b/pnacl/driver/pnacl-ld.py
|
| index dc57ee1f9d86855caf6095ce51a43cf6a91296fa..fc0511533620971a7751488e6f87dc8f0a762cdb 100755
|
| --- a/pnacl/driver/pnacl-ld.py
|
| +++ b/pnacl/driver/pnacl-ld.py
|
| @@ -378,13 +378,18 @@ def main(argv):
|
| # reintroduce ConstantExprs. However, '-expand-getelementptr'
|
| # must follow '-expand-constant-expr' to expand the
|
| # getelementptr instructions it creates.
|
| - passes = ['-expand-constant-expr',
|
| + # We place '-strip-metadata' after optimization passes since
|
| + # optimizations depend on the metadata.
|
| + passes = ['-strip-metadata',
|
| + '-expand-constant-expr',
|
| '-expand-getelementptr']
|
| if (not env.getbool('DISABLE_ABI_CHECK') and
|
| not env.getbool('ALLOW_CXX_EXCEPTIONS') and
|
| len(native_objects) == 0):
|
| passes += ['-verify-pnaclabi-module',
|
| - '-verify-pnaclabi-functions']
|
| + '-verify-pnaclabi-functions',
|
| + # A flag for the above -verify-pnaclabi-* passes.
|
| + '-pnaclabi-allow-debug-metadata']
|
| chain.add(DoLLVMPasses(passes),
|
| 'expand_features_after_opt.' + bitcode_type)
|
| else:
|
|
|