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++
(cherry picked from commit 44302de)
  • Loading branch information
pirama-arumuga-nainar committed Dec 19, 2023
1 parent 9d4f2dd commit 1ed0f82
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 @@ -1007,6 +1007,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 1ed0f82

Please sign in to comment.