aboutsummaryrefslogtreecommitdiff
path: root/SConscript
diff options
context:
space:
mode:
authorAdnan AlSinan <adnan.alsinan@arm.com>2021-08-06 12:44:51 +0100
committerGeorgios Pinitas <georgios.pinitas@arm.com>2021-08-12 19:18:33 +0000
commit39aebd13faab1d9159fbd701ca0d1d77a125b6b2 (patch)
tree21c98635e126c32d07dad035864242f16e435d6f /SConscript
parentfa1db17a9ad7d35a77e76bf9c61ebc8756149ab2 (diff)
downloadComputeLibrary-39aebd13faab1d9159fbd701ca0d1d77a125b6b2.tar.gz
Fixing the Issue when building for Android using compress_kernels=1 and python 3
Resolves COMPMID-4759 Signed-off-by: Adnan AlSinan <adnan.alsinan@arm.com> Change-Id: Iaa37c63682bbf900e42195f52f5264ea565cc46e Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6059 Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Gunes Bayir <gunes.bayir@arm.com> Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Diffstat (limited to 'SConscript')
-rw-r--r--SConscript4
1 files changed, 3 insertions, 1 deletions
diff --git a/SConscript b/SConscript
index 2f43e39e90..2eed75a1a5 100644
--- a/SConscript
+++ b/SConscript
@@ -25,6 +25,7 @@ import re
import subprocess
import zlib
import json
+import codecs
VERSION = "v0.0-unreleased"
LIBRARY_VERSION_MAJOR = 24
@@ -136,7 +137,8 @@ def resolve_includes(target, source, env):
with open(file[1].target_name.get_path(), 'w+') as out_file:
file_to_write = "\n".join( file[1].file_contents )
if env['compress_kernels']:
- file_to_write = zlib.compress(file_to_write, 9).encode("base64").replace("\n", "")
+ file_to_write = zlib.compress(file_to_write.encode('utf-8'), 9)
+ file_to_write = codecs.encode(file_to_write, "base64").decode('utf-8').replace("\n", "")
file_to_write = "R\"(" + file_to_write + ")\""
out_file.write(file_to_write)