From 6ea7368483b40dbdfec431873edafacdacb9e8e4 Mon Sep 17 00:00:00 2001 From: Er2 Date: Sun, 21 May 2023 14:28:24 +0300 Subject: [PATCH] add objcopy for android --- scripts/waifulib/xcompile.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/waifulib/xcompile.py b/scripts/waifulib/xcompile.py index 2db9b7f9..f5994cba 100644 --- a/scripts/waifulib/xcompile.py +++ b/scripts/waifulib/xcompile.py @@ -211,6 +211,11 @@ class Android: return 'llvm-strip' return os.path.join(self.gen_binutils_path(), 'strip') + def objcopy(self): + if self.is_host(): + return 'llvm-objcopy' + return os.path.join(self.gen_binutils_path(), 'objcopy') + def system_stl(self): # TODO: proper STL support return [ @@ -341,6 +346,7 @@ def configure(conf): conf.environ['CC'] = android.cc() conf.environ['CXX'] = android.cxx() conf.environ['STRIP'] = android.strip() + conf.environ['OBJCOPY'] = android.objcopy() conf.env.CFLAGS += android.cflags() conf.env.CXXFLAGS += android.cflags(True) conf.env.LINKFLAGS += android.linkflags()