Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aa11e7d8 authored by Andre Braga's avatar Andre Braga
Browse files

Detect non x86_64 machine in build script.

This change adds functionality to detect whether the
host machine is x86_64, which is the only machine currently supported by
the build script.

Bug: 241967798
Tag: #floss
Test: run ./build.py on non x86_64 and observe script exiting, run on x86_64 and
observe normal behavior.

Change-Id: Ia9837e26c78559e85b00cc8637daa2874cb3d8d8
parent 6890f121
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ vendor repository as well.
import argparse
import multiprocessing
import os
import platform
import shutil
import six
import subprocess
@@ -802,6 +803,11 @@ if __name__ == '__main__':
    # Make sure we get absolute path + expanded path for bootstrap directory
    args.bootstrap_dir = os.path.abspath(os.path.expanduser(args.bootstrap_dir))

    # Possible values for machine() come from 'uname -m'
    # Since this script only runs on Linux, x86_64 machines must have this value
    if platform.machine() != 'x86_64':
        raise Exception("Only x86_64 machines are currently supported by this build script.")

    if args.run_bootstrap:
        bootstrap = Bootstrap(args.bootstrap_dir, os.path.dirname(__file__))
        bootstrap.bootstrap()