Skip to content

Commit

Permalink
gyp: fix android generator
Browse files Browse the repository at this point in the history
When generating Android .mk files, ready to be used within Android build
system, we don't need LOCAL_SDK_VERSION specified, since the Android
build system already uses the latest one.
By specifying LOCAL_SDK_VERSION in Android makefiles, the build using
Android build system will fail, because the build system won't set the
path to stlport from prebuilts.

Signed-off-by: Robert Chiras <robert.chiras@intel.com>
PR-URL: #889
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
robertchiras authored and bnoordhuis committed Mar 4, 2016
1 parent 7b10467 commit a981ef8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gyp/pylib/gyp/generator/android.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def Write(self, qualified_target, relative_target, base_path, output_filename,
if self.toolset == 'host':
self.WriteLn('LOCAL_IS_HOST_MODULE := true')
self.WriteLn('LOCAL_MULTILIB := $(GYP_HOST_MULTILIB)')
else:
elif sdk_version > 0:
self.WriteLn('LOCAL_MODULE_TARGET_ARCH := '
'$(TARGET_$(GYP_VAR_PREFIX)ARCH)')
self.WriteLn('LOCAL_SDK_VERSION := %s' % sdk_version)
Expand Down Expand Up @@ -965,7 +965,7 @@ def GenerateOutput(target_list, target_dicts, data, params):
builddir_name = generator_flags.get('output_dir', 'out')
limit_to_target_all = generator_flags.get('limit_to_target_all', False)
write_alias_targets = generator_flags.get('write_alias_targets', True)
sdk_version = generator_flags.get('aosp_sdk_version', 19)
sdk_version = generator_flags.get('aosp_sdk_version', 0)
android_top_dir = os.environ.get('ANDROID_BUILD_TOP')
assert android_top_dir, '$ANDROID_BUILD_TOP not set; you need to run lunch.'

Expand Down

0 comments on commit a981ef8

Please sign in to comment.