update build script
This commit is contained in:
parent
994feb5796
commit
766cf0772e
@ -53,6 +53,16 @@ def get_toolchain(cfg, build):
|
||||
return cfg['global']['tool']
|
||||
return 'GCC5'
|
||||
|
||||
def get_hostarch():
|
||||
mach = os.uname().machine
|
||||
if mach == 'x86_64':
|
||||
return 'X64'
|
||||
if mach == 'aarch64':
|
||||
return 'AARCH64'
|
||||
if mach == 'riscv64':
|
||||
return 'RISCV64'
|
||||
return 'UNKNOWN'
|
||||
|
||||
def get_version(cfg, silent = False):
|
||||
coredir = get_coredir(cfg)
|
||||
if version_override:
|
||||
@ -191,6 +201,9 @@ def build_one(cfg, build, jobs = None, silent = False, nologs = False):
|
||||
if jobs:
|
||||
cmdline += [ '-n', jobs ]
|
||||
for arch in b['arch'].split():
|
||||
if arch == 'HOST':
|
||||
cmdline += [ '-a', get_hostarch() ]
|
||||
else:
|
||||
cmdline += [ '-a', arch ]
|
||||
if 'opts' in b:
|
||||
for name in b['opts'].split():
|
||||
@ -362,7 +375,8 @@ def main():
|
||||
type = str, action = 'append', metavar = 'DIR',
|
||||
help = 'location(s) of additional packages '
|
||||
'(can be specified multiple times)')
|
||||
parser.add_argument('-t', '--toolchain', dest = 'toolchain', type = str, metavar = 'NAME',
|
||||
parser.add_argument('-t', '--toolchain', dest = 'toolchain',
|
||||
type = str, metavar = 'NAME',
|
||||
help = 'tool chain to be used to build edk2')
|
||||
parser.add_argument('--version-override', dest = 'version_override',
|
||||
type = str, metavar = 'VERSION',
|
||||
|
Loading…
Reference in New Issue
Block a user