Index: build/toolchain/gcc_ar_wrapper.py |
diff --git a/build/toolchain/gcc_ar_wrapper.py b/build/toolchain/gcc_ar_wrapper.py |
index de53df09e97582ab424b38c966beff262e8fd849..1c29df23e562889d50ca9875a5d56e09ffbb674a 100755 |
--- a/build/toolchain/gcc_ar_wrapper.py |
+++ b/build/toolchain/gcc_ar_wrapper.py |
@@ -40,12 +40,24 @@ def main(): |
help='Input files') |
args = parser.parse_args() |
- if args.resource_whitelist: |
- whitelist_candidates = wrapper_utils.ResolveRspLinks(args.inputs) |
- wrapper_utils.CombineResourceWhitelists( |
- whitelist_candidates, args.resource_whitelist) |
+ # Specifies the type of object file ar should examine. |
+ # The ar on linux ignores this option. |
+ object_mode = [] |
+ if sys.platform.startswith('aix'): |
+ # The @file feature is not avaliable on ar for AIX. |
+ # For linux (and other posix like systems), the @file_name |
+ # option reads the contents of file_name as command line arguments. |
+ # For AIX we must parse these (rsp files) manually. |
+ # Read rspfile. |
+ args.inputs = wrapper_utils.ResolveRspLinks(args.inputs) |
+ object_mode = ['-X64'] |
+ else: |
+ if args.resource_whitelist: |
+ whitelist_candidates = wrapper_utils.ResolveRspLinks(args.inputs) |
+ wrapper_utils.CombineResourceWhitelists( |
+ whitelist_candidates, args.resource_whitelist) |
- command = [args.ar, args.operation] |
+ command = [args.ar] + object_mode + [args.operation] |
if args.plugin is not None: |
command += ['--plugin', args.plugin] |
command.append(args.output) |