• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env bash
2# Copyright 2021 The ChromiumOS Authors
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5set -ex
6
7rustup target add aarch64-unknown-linux-gnu
8
9# Generate a cross file for meson to compile for aarch64
10sudo mkdir -p -m 0755 /usr/local/share/meson/cross
11sudo tee /usr/local/share/meson/cross/aarch64 >/dev/null <<EOF
12[binaries]
13c = '/usr/bin/aarch64-linux-gnu-gcc'
14cpp = '/usr/bin/aarch64-linux-gnu-g++'
15ar = '/usr/bin/aarch64-linux-gnu-ar'
16strip = '/usr/bin/aarch64-linux-gnu-strip'
17objcopy = '/usr/bin/aarch64-linux-gnu-objcopy'
18ld= '/usr/bin/aarch64-linux-gnu-ld'
19pkgconfig = '/usr/bin/aarch64-linux-gnu-pkg-config'
20
21[properties]
22
23[host_machine]
24system = 'linux'
25cpu_family = 'aarch64'
26cpu = 'arm64'
27endian = 'little'
28EOF
29