Ying Wang | 34d5f1b | 2014-05-16 10:38:43 -0700 | [diff] [blame] | 1 | # Translate LOCAL_32_BIT_ONLY to LOCAL_MULTILIB, |
Colin Cross | e6e48f6 | 2014-03-21 12:29:32 -0700 | [diff] [blame] | 2 | # and check LOCAL_MULTILIB is a valid value. Returns module's multilib |
| 3 | # setting in my_module_multilib, or empty if not set. |
| 4 | |
| 5 | my_module_multilib := $(strip $(LOCAL_MULTILIB)) |
Colin Cross | 149d65b | 2014-04-11 16:00:23 -0700 | [diff] [blame] | 6 | |
Colin Cross | e6e48f6 | 2014-03-21 12:29:32 -0700 | [diff] [blame] | 7 | ifndef my_module_multilib |
Colin Cross | 149d65b | 2014-04-11 16:00:23 -0700 | [diff] [blame] | 8 | ifeq ($(LOCAL_32_BIT_ONLY),true) |
Colin Cross | e6e48f6 | 2014-03-21 12:29:32 -0700 | [diff] [blame] | 9 | my_module_multilib := 32 |
| 10 | endif |
Colin Cross | e6e48f6 | 2014-03-21 12:29:32 -0700 | [diff] [blame] | 11 | else # my_module_multilib defined |
Colin Cross | dc1c95a | 2014-04-10 11:28:04 -0700 | [diff] [blame] | 12 | ifeq (,$(filter 32 64 first both none,$(my_module_multilib))) |
Colin Cross | e6e48f6 | 2014-03-21 12:29:32 -0700 | [diff] [blame] | 13 | $(error $(LOCAL_PATH): Invalid LOCAL_MULTILIB specified for module $(LOCAL_MODULE)) |
| 14 | endif |
| 15 | endif # my_module_multilib defined |
Dan Albert | dc94137 | 2015-05-04 18:17:52 -0700 | [diff] [blame] | 16 | |
| 17 | # Windows is a special case. Linux and Darwin are both multilib builds, but we |
| 18 | # don't have a 64-bit Windows build, so make sure it's not a multilib build. |
| 19 | ifdef LOCAL_IS_HOST_MODULE |
| 20 | ifeq ($(HOST_OS),windows) |
| 21 | my_module_multilib := 32 |
| 22 | endif |
| 23 | endif |