mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-22 17:55:57 +01:00
Allow extra make args to ./build-qemu -- arg0 arg1
configure args are now ./build-qemu --extra-config-args '"aa a" bb' Also factor out arg names with other builds through _add_argument. Fix #113.
This commit is contained in:
29
common.py
29
common.py
@@ -1613,33 +1613,46 @@ class BuildCliFunction(LkmcCliFunction):
|
||||
'default': '',
|
||||
'help': '''\
|
||||
Pass the given compiler flags to all languages (C, C++, Fortran, etc.)
|
||||
''',
|
||||
},
|
||||
'--configure': {
|
||||
'default': True,
|
||||
'help': '''\
|
||||
Also run the configuration step during build.
|
||||
''',
|
||||
},
|
||||
'--force-rebuild': {
|
||||
'default': False,
|
||||
"help": '''\
|
||||
Force rebuild even if sources didn't change.
|
||||
''',
|
||||
},
|
||||
'--configure': {
|
||||
'default': True,
|
||||
"help": '''\
|
||||
Also run the configuration step during build.
|
||||
''',
|
||||
},
|
||||
'--optimization-level': {
|
||||
'default': '0',
|
||||
'help': '''
|
||||
'help': '''\
|
||||
Use the given GCC -O optimization level.
|
||||
For some scripts, there are hard technical challenges why it cannot
|
||||
be implemented, e.g.: https://cirosantilli.com/linux-kernel-module-cheat#kernel-o0
|
||||
and for others such as gem5 have their custom mechanism:
|
||||
https://cirosantilli.com/linux-kernel-module-cheat#gem5-debug-build
|
||||
''',
|
||||
}
|
||||
},
|
||||
'extra_make_args': {
|
||||
'default': [],
|
||||
'help': '''\
|
||||
Extra arguments to pass to the Make command or analogous final build command,
|
||||
after configure, e.g. SCons. Usually contains specific targets or other build flags.
|
||||
''',
|
||||
'metavar': 'extra-make-args',
|
||||
'nargs': '*',
|
||||
},
|
||||
}
|
||||
|
||||
def _add_argument(self, argument_name):
|
||||
'''
|
||||
Enable build argument with a fixed name to provide an uniform CLI API
|
||||
across different builds.
|
||||
'''
|
||||
self.add_argument(
|
||||
argument_name,
|
||||
**self._build_arguments[argument_name]
|
||||
|
||||
Reference in New Issue
Block a user