Commit 88a9e92
committed
build-llvm.py: Add ability to override "true" arguments
Users (such as myself) may have wrappers around 'build-llvm.py' to set
default arguments but allow additional arguments to be passed. Arguments
that take a value can be overridden by subsequent instances of the
arguments but boolean actions cannot.
Python 3.9 introduced the BooleanOptionalAction action in the argparse
package, which automatically defines '--foo' and '--no-foo', which would
allow one to override '--assertions' with '--no-assertions' for that one
invocation.
For now, start with '--no-assertions', as the presence of the '--no-'
value for the other boolean options is noisy and they are unlikely to
defaulted to with the need to override. This change can be done to
options as use cases appear.
Signed-off-by: Nathan Chancellor <nathan@kernel.org>1 parent 18c0282 commit 88a9e92
1 file changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
16 | 24 | | |
17 | 25 | | |
18 | 26 | | |
| |||
29 | 37 | | |
30 | 38 | | |
31 | 39 | | |
32 | | - | |
| 40 | + | |
33 | 41 | | |
34 | 42 | | |
35 | 43 | | |
| |||
0 commit comments