Skip to content

Commit 1e142f3

Browse files
committed
build-llvm.py: Add experimental targets option
Add argument to pass experimental targets to the builder.
1 parent 22b9162 commit 1e142f3

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

build-llvm.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,19 @@
389389
390390
Example: -t AArch64 ARM X86
391391
392+
'''),
393+
nargs='+')
394+
parser.add_argument('-T',
395+
'--experimental-targets',
396+
help=textwrap.dedent('''\
397+
LLVM is multitargeted by default. Currently, this script doesn't enable any experiemtnal,
398+
backends. If you would like to override this, you can use this parameter and supply
399+
a list of targets supported by LLVM_EXPERIMENTAL_TARGETS_TO_BUILD:
400+
401+
https://llvm.org/docs/CMake.html#llvm-specific-variables
402+
403+
Example: -T ARC CSKY M68k Xtensa
404+
392405
'''),
393406
nargs='+')
394407
clone_options.add_argument('--use-good-revision',
@@ -492,8 +505,11 @@
492505
# that the user can correct the issue sooner rather than later.
493506
final = def_llvm_builder_cls()
494507
final.folders.source = llvm_folder
495-
if args.targets:
496-
final.targets = args.targets
508+
if args.targets or args.experimental_targets:
509+
if args.targets:
510+
final.targets = args.targets
511+
if args.experimental_targets:
512+
final.experimental_targets = args.experimental_targets
497513
final.validate_targets()
498514
else:
499515
final.targets = ['all'] if args.full_toolchain else llvm_source.default_targets()

0 commit comments

Comments
 (0)