Skip to content

Commit defba3f

Browse files
authored
Merge pull request #306 from nathanchance/add-no-assertions
2 parents 449375c + 88a9e92 commit defba3f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

build-llvm.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@
1313
from tc_build.kernel import KernelBuilder, LinuxSourceManager, LLVMKernelBuilder
1414
from tc_build.tools import HostTools, StageTools
1515

16+
try:
17+
# pylint: disable-next=ungrouped-imports
18+
from argparse import BooleanOptionalAction
19+
# 'store_true' sets 'default' implicitly, do it explicitly to match
20+
BOOL_ARGS = {'action': BooleanOptionalAction, 'default': False}
21+
except ImportError:
22+
BOOL_ARGS = {'action': 'store_true'}
23+
1624
# This is a known good revision of LLVM for building the kernel
1725
GOOD_REVISION = 'd5802c30ae6cf296489daf12b36582e9e1d658bb'
1826

@@ -29,7 +37,7 @@
2937
issues when compiling but it will increase compile times by 15-20%%.
3038
3139
'''),
32-
action='store_true')
40+
**BOOL_ARGS)
3341
parser.add_argument('-b',
3442
'--build-folder',
3543
help=textwrap.dedent('''\

0 commit comments

Comments
 (0)