diff options
author | Jiyong Park <jiyong@google.com> | 2020-09-14 19:43:17 +0900 |
---|---|---|
committer | Jiyong Park <jiyong@google.com> | 2020-09-24 14:14:31 +0900 |
commit | 1613e5541fd5aa5d22f093d8a53787b503aed624 (patch) | |
tree | 8e0b9ddf8d34c36eec946cf3604928e12972b519 /python | |
parent | d55be35331a77670e579655dfdc60f66df58d058 (diff) |
HostCross is an attribute of a Target, not OsType
A host target is considered as being cross-compiled when the target
can't run natively on the build machine. For example, linux_glibc/x86_64
is a non-cross target on a standard x86/Linux machine, but is a cross
host on Mac. Previously, whether cross or not was a static attribute of
an OsType. For example, Windows was always considered as cross host,
while linux_bionic was not. This becomes a problem when we support more
host targets like linux_bionic/arm64 which should be cross-host on
standard x86/Linux machines.
This change removes HostCross from the OsClass type and instead adds a
property HostCross to the Target type. When a target is being added, it
is initialized to true when the target can't run natively on the current
build machine.
Bug: 168086242
Test: m
Change-Id: Ic37c8db918873ddf324c86b12b5412952b0f2be2
Diffstat (limited to 'python')
-rw-r--r-- | python/binary.go | 2 | ||||
-rw-r--r-- | python/library.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/python/binary.go b/python/binary.go index 5a7492648..1d2400efd 100644 --- a/python/binary.go +++ b/python/binary.go @@ -79,7 +79,7 @@ func NewBinary(hod android.HostOrDeviceSupported) (*Module, *binaryDecorator) { } func PythonBinaryHostFactory() android.Module { - module, _ := NewBinary(android.HostSupportedNoCross) + module, _ := NewBinary(android.HostSupported) return module.Init() } diff --git a/python/library.go b/python/library.go index 65c1352e7..0c8d61313 100644 --- a/python/library.go +++ b/python/library.go @@ -26,7 +26,7 @@ func init() { } func PythonLibraryHostFactory() android.Module { - module := newModule(android.HostSupportedNoCross, android.MultilibFirst) + module := newModule(android.HostSupported, android.MultilibFirst) return module.Init() } |