add objcopy for android

This commit is contained in:
Er2 2023-05-21 14:28:24 +03:00
parent c7895b28ed
commit 6ea7368483

View File

@ -211,6 +211,11 @@ class Android:
return 'llvm-strip' return 'llvm-strip'
return os.path.join(self.gen_binutils_path(), '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): def system_stl(self):
# TODO: proper STL support # TODO: proper STL support
return [ return [
@ -341,6 +346,7 @@ def configure(conf):
conf.environ['CC'] = android.cc() conf.environ['CC'] = android.cc()
conf.environ['CXX'] = android.cxx() conf.environ['CXX'] = android.cxx()
conf.environ['STRIP'] = android.strip() conf.environ['STRIP'] = android.strip()
conf.environ['OBJCOPY'] = android.objcopy()
conf.env.CFLAGS += android.cflags() conf.env.CFLAGS += android.cflags()
conf.env.CXXFLAGS += android.cflags(True) conf.env.CXXFLAGS += android.cflags(True)
conf.env.LINKFLAGS += android.linkflags() conf.env.LINKFLAGS += android.linkflags()