Skip to content

Commit

Permalink
Add build argument: --arch (#5147)
Browse files Browse the repository at this point in the history
Signed-off-by: winsoft666 <[email protected]>
  • Loading branch information
winsoft666 authored Nov 4, 2024
1 parent f5d3d90 commit 4a39946
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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}')

Expand Down

0 comments on commit 4a39946

Please sign in to comment.