summaryrefslogtreecommitdiffstats
path: root/native_client_sdk
diff options
context:
space:
mode:
authorbradnelson <bradnelson@google.com>2015-10-08 17:55:46 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-09 00:56:28 +0000
commit763ecc506ba8351f556523fdd779feb95d3ed827 (patch)
tree1275bdf9e9235c580c84d05fc9b90726ac29cc80 /native_client_sdk
parentc763083c48a650a3087df27105c1e5f70798ff23 (diff)
downloadchromium_src-763ecc506ba8351f556523fdd779feb95d3ed827.zip
chromium_src-763ecc506ba8351f556523fdd779feb95d3ed827.tar.gz
chromium_src-763ecc506ba8351f556523fdd779feb95d3ed827.tar.bz2
Fix create_nmf.py to handle nmfs mixing arm + x86.
create_nmf.py was correctly handling all x86 or all arm nmf files, but failing for glibc when both are combined. This was due to x86 using runnable-ld.so vs arm not. Eliminating the assuming that runnable-ld.so is either used for all archs or none. BUG=None TEST=manual R=sbc@chromium.org,binji@chromium.org CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:linux_nacl_sdk;tryserver.chromium.mac:mac_nacl_sdk;tryserver.chromium.win:win_nacl_sdk Review URL: https://codereview.chromium.org/1396583003 Cr-Commit-Position: refs/heads/master@{#353193}
Diffstat (limited to 'native_client_sdk')
-rwxr-xr-xnative_client_sdk/src/tools/create_nmf.py27
1 files changed, 16 insertions, 11 deletions
diff --git a/native_client_sdk/src/tools/create_nmf.py b/native_client_sdk/src/tools/create_nmf.py
index a97fd92..eabcc12 100755
--- a/native_client_sdk/src/tools/create_nmf.py
+++ b/native_client_sdk/src/tools/create_nmf.py
@@ -367,36 +367,41 @@ class NmfUtils(object):
needed = self.GetNeeded()
- runnable = any(n.endswith(RUNNABLE_LD) for n in needed)
-
extra_files_kv = [(key, ArchFile(name=key,
arch=arch,
path=url,
url=url))
for key, arch, url in self.extra_files]
- for need, archinfo in needed.items() + extra_files_kv:
+ manifest_items = needed.items() + extra_files_kv
+
+ # Add in runnable-ld.so entries to the program section.
+ for need, archinfo in manifest_items:
+ urlinfo = { URL_KEY: archinfo.url }
+ if need.endswith(RUNNABLE_LD):
+ manifest[PROGRAM_KEY][archinfo.arch] = urlinfo
+
+ for need, archinfo in manifest_items:
urlinfo = { URL_KEY: archinfo.url }
name = archinfo.name
+ arch = archinfo.arch
- # If starting with runnable-ld.so, make that the main executable.
- if runnable:
- if need.endswith(RUNNABLE_LD):
- manifest[PROGRAM_KEY][archinfo.arch] = urlinfo
- continue
+ if need.endswith(RUNNABLE_LD):
+ continue
if need in self.main_files:
if need.endswith(".nexe"):
# Place it under program if we aren't using the runnable-ld.so.
- if not runnable:
- manifest[PROGRAM_KEY][archinfo.arch] = urlinfo
+ program = manifest[PROGRAM_KEY]
+ if arch not in program:
+ program[arch] = urlinfo
continue
# Otherwise, treat it like another another file named main.nexe.
name = MAIN_NEXE
name = self.remap.get(name, name)
fileinfo = manifest[FILES_KEY].get(name, {})
- fileinfo[archinfo.arch] = urlinfo
+ fileinfo[arch] = urlinfo
manifest[FILES_KEY][name] = fileinfo
self.manifest = manifest