Merge "LinuxBionic supports arm64"

This commit is contained in:
Treehugger Robot
2020-09-14 15:59:16 +00:00
committed by Gerrit Code Review
6 changed files with 130 additions and 2 deletions

View File

@@ -16,5 +16,6 @@ bootstrap_go_package {
"x86_linux_host.go",
"x86_device.go",
"x86_64_device.go",
"arm64_linux_host.go",
],
}

View File

@@ -71,9 +71,16 @@ func (t *toolchainArm64) Supported() bool {
}
func Arm64ToolchainFactory(arch android.Arch) Toolchain {
archVariant := arch.ArchVariant
if archVariant == "" {
// arch variants defaults to armv8-a. This is mostly for
// the host target which borrows toolchain configs from here.
archVariant = "armv8-a"
}
toolchainRustFlags := []string{
"${config.Arm64ToolchainRustFlags}",
"${config.Arm64" + arch.ArchVariant + "VariantRustFlags}",
"${config.Arm64" + archVariant + "VariantRustFlags}",
}
toolchainRustFlags = append(toolchainRustFlags, deviceGlobalRustFlags...)

View File

@@ -0,0 +1,24 @@
// Copyright 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package config
import (
"android/soong/android"
)
func init() {
// Linux_cross-arm64 uses the same rust toolchain as the Android-arm64
registerToolchainFactory(android.LinuxBionic, android.Arm64, Arm64ToolchainFactory)
}