From 4a39946ef6d99b1ab38e008caba4fff2105ba872 Mon Sep 17 00:00:00 2001 From: winsoft666 Date: Mon, 4 Nov 2024 22:28:36 +0800 Subject: [PATCH] Add build argument: --arch (#5147) Signed-off-by: winsoft666 --- tools/build.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/build.py b/tools/build.py index fdfbeee220..9cb3eaa906 100755 --- a/tools/build.py +++ b/tools/build.py @@ -53,6 +53,8 @@ def devhelp(helpstring): """) buildgrp = parser.add_argument_group('general build options') + buildgrp.add_argument('--arch', metavar='OPT', default='', + help='Specify architecture if supported by cmake generator. (default: %(default)s)') buildgrp.add_argument('--builddir', metavar='DIR', default=os.path.join(settings.PROJECT_DIR, 'build'), help='specify build directory (default: %(default)s)') buildgrp.add_argument('--clean', action='store_true', default=False, @@ -261,6 +263,9 @@ def configure_jerry(arguments): cmake_cmd = ['cmake', '-B' + arguments.builddir, '-H' + settings.PROJECT_DIR] + if arguments.arch: + cmake_cmd.append('-A' + arguments.arch) + if arguments.install: cmake_cmd.append(f'-DCMAKE_INSTALL_PREFIX={arguments.install}')