Skip to content

Commit

Permalink
Build arm32 libc++ for the NDK with -mthumb
Browse files Browse the repository at this point in the history
Bug: android/ndk#1953

Change-Id: I6d51c995450e98490a70d0ac745bb46be601b102
Test: build.py and check size of arm32 libc++
  • Loading branch information
pirama-arumuga-nainar committed Nov 2, 2023
1 parent 4dbf991 commit 44302de
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,13 @@ def output_dir(self) -> Path:
suffix = '-apex' if self._config.extra_config['apex'] else ''
return old_path.parent / (old_path.name + suffix)

@property
def cflags(self) -> list[str]:
result = super().cflags
if self._config.target_arch is hosts.Arch.ARM and self._is_ndk:
result.append('-mthumb')
return result

@property
def cxxflags(self) -> list[str]:
base = super().cxxflags
Expand Down

0 comments on commit 44302de

Please sign in to comment.