Skip to content

Commit eb6e0f0

Browse files
committed
Try to see where @carlocab's truncation is occuring
1 parent 1b1f444 commit eb6e0f0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

wllvm/extraction.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ def extract_section_darwin(inputFile):
139139
octetline = m.group(1)
140140
octets.extend(octetline.split())
141141
retval = decode_hex(''.join(octets))[0].splitlines()
142+
# these have become bytes in the "evolution" of python
143+
retval = [ f.decode('utf8') for f in retval]
142144
if not retval:
143145
_logger.error('%s contained no %s segment', inputFile, darwinSegmentName)
144146
except Exception as e:
@@ -406,10 +408,7 @@ def handleArchiveDarwin(pArgs):
406408

407409
#write the manifest file if asked for
408410
if pArgs.manifestFlag:
409-
manifestFile = f'{pArgs.inputFile}.llvm.manifest'
410-
with open(manifestFile, 'w') as output:
411-
for f in bitCodeFiles:
412-
output.write(f'{f}\n')
411+
writeManifest(f'{pArgs.inputFile}.llvm.manifest', bitCodeFiles)
413412

414413
# Build bitcode archive
415414
os.chdir(originalDir)

0 commit comments

Comments
 (0)