diff options
author | Dan Albert <danalbert@google.com> | 2015-10-15 16:20:56 -0700 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2015-10-15 16:20:56 -0700 |
commit | bbffcd9c3c1821797d2a2b36b73889cca4536973 (patch) | |
tree | f80c235eb505bb4942aad5a1dbb9dbb5e60e3e62 /checkbuild.py | |
parent | 678d9c988b631538a8caf71d919ca2d66fcd63e6 (diff) | |
download | ndk-bbffcd9c3c1821797d2a2b36b73889cca4536973.tar.gz |
Fix Windows binutils packaging.
Windows binaries end with .exe, and Windows doesn't have gold.
Bug: http://b/22387400
Change-Id: I65edab9869c09164f05b029a1347ccddc072aceb
Diffstat (limited to 'checkbuild.py')
-rw-r--r-- | checkbuild.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/checkbuild.py b/checkbuild.py index bc7700743..878e57f17 100644 --- a/checkbuild.py +++ b/checkbuild.py @@ -150,7 +150,7 @@ def fixup_toolchain_triple(toolchain): }.get(toolchain, toolchain) -def get_binutils_files(triple, has_gold): +def get_binutils_files(triple, has_gold, is_windows): files = [ 'ld.bfd', 'nm', @@ -166,6 +166,9 @@ def get_binutils_files(triple, has_gold): if has_gold: files.append('ld.gold') + if is_windows: + files = [f + '.exe' for f in files] + # binutils programs get installed to two locations: # 1: $INSTALL_DIR/bin/$TRIPLE-$PROGRAM # 2: $INSTALL_DIR/$TRIPLE/bin/$PROGRAM @@ -257,8 +260,9 @@ def build_binutils(out_dir, args): install_dir = os.path.join(tmpdir, 'binutils', host_tag, toolchain) os.makedirs(install_dir) - has_gold = not triple.startswith('mips') - for file_name in get_binutils_files(triple, has_gold): + is_windows = host_tag.startswith('windows') + has_gold = not triple.startswith('mips') and not is_windows + for file_name in get_binutils_files(triple, has_gold, is_windows): install_file(file_name, toolchain_path, install_dir) pack_binutils(toolchain, host_tag, out_dir, tmpdir, install_dir) finally: |