waifulib: xcompile: use llvm-strip on host

This commit is contained in:
Alibek Omarov 2019-09-19 18:18:42 +03:00
parent 0389d2495f
commit 16e60bbb5f

View file

@ -183,17 +183,17 @@ class Android:
def cc(self): def cc(self):
if self.is_host(): if self.is_host():
return 'clang' return 'clang --target=%s' % self.clang_host_triplet()
return self.toolchain_path + ('clang' if self.is_clang() else 'gcc') return self.toolchain_path + ('clang' if self.is_clang() else 'gcc')
def cxx(self): def cxx(self):
if self.is_host(): if self.is_host():
return 'clang++' return 'clang++ --target=%s' % self.clang_host_triplet()
return self.toolchain_path + ('clang++' if self.is_clang() else 'g++') return self.toolchain_path + ('clang++' if self.is_clang() else 'g++')
def strip(self): def strip(self):
if self.is_host(): if self.is_host():
return 'strip' return 'llvm-strip'
return os.path.join(self.gen_binutils_path(), 'strip') return os.path.join(self.gen_binutils_path(), 'strip')
def system_stl(self): def system_stl(self):
@ -230,7 +230,7 @@ class Android:
def cflags(self): def cflags(self):
cflags = [] cflags = []
if self.is_host(): if self.is_host():
cflags += ['-nostdlib', '--target=%s' % self.clang_host_triplet()] cflags += ['-nostdlib']
if self.ndk_rev < 20: if self.ndk_rev < 20:
cflags += ['--sysroot={0}'.format(self.sysroot())] cflags += ['--sysroot={0}'.format(self.sysroot())]