Chromium Code Reviews| Index: tools/utils.py |
| =================================================================== |
| --- tools/utils.py (revision 38203) |
| +++ tools/utils.py (working copy) |
| @@ -242,6 +242,13 @@ |
| def GetArchFamily(arch): |
| return ARCH_FAMILY[arch] |
| +def IsCrossBuild(target_os, arch): |
| + host_arch = ARCH_GUESS |
| + if ((GetArchFamily(host_arch) != GetArchFamily(arch)) or |
|
Bill Hesse
2014/07/16 07:35:43
Why not just return the boolean expression?
zra
2014/07/16 14:48:20
Done.
|
| + (target_os != GuessOS())): |
| + return True |
| + return False |
| + |
| def GetBuildConf(mode, arch, conf_os=None): |
| if conf_os == 'android': |
| return '%s%s%s' % (GetBuildMode(mode), conf_os.title(), arch.upper()) |
| @@ -260,7 +267,7 @@ |
| def GetBuildRoot(host_os, mode=None, arch=None, target_os=None): |
| build_root = GetBuildDir(host_os, target_os) |
| if mode: |
| - build_root = os.path.join(build_root, GetBuildConf(mode, arch)) |
| + build_root = os.path.join(build_root, GetBuildConf(mode, arch, target_os)) |
| return build_root |
| def GetBaseDir(): |