mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-25 19:21:35 +01:00
mtops.h is perfect now
This commit is contained in:
38
common.py
38
common.py
@@ -1240,14 +1240,6 @@ class BuildCliFunction(LkmcCliFunction):
|
||||
default=False,
|
||||
help='Clean the build instead of building.',
|
||||
),
|
||||
self.add_argument(
|
||||
'--force-rebuild',
|
||||
default=False,
|
||||
help='''\
|
||||
Force rebuild even if sources didn't chage.
|
||||
TODO: not yet implemented on all scripts.
|
||||
'''
|
||||
)
|
||||
self.add_argument(
|
||||
'-j',
|
||||
'--nproc',
|
||||
@@ -1256,6 +1248,36 @@ TODO: not yet implemented on all scripts.
|
||||
help='Number of processors to use for the build.',
|
||||
)
|
||||
self.test_results = []
|
||||
self._build_arguments = {
|
||||
'--ccflags': {
|
||||
'default': '',
|
||||
'help': '''\
|
||||
Pass the given compiler flags to all languages (C, C++, Fortran, etc.)
|
||||
''',
|
||||
},
|
||||
'--force-rebuild': {
|
||||
'default': False,
|
||||
"help": '''\
|
||||
Force rebuild even if sources didn't change.
|
||||
''',
|
||||
},
|
||||
'--optimization-level': {
|
||||
'default': '0',
|
||||
'help': '''
|
||||
Use the given GCC -O optimization level.
|
||||
For some scripts, there are hard technical challenges why it cannot
|
||||
be implemented, e.g.: https://github.com/cirosantilli/linux-kernel-module-cheat#kernel-o0
|
||||
and for others such as gem5 have their custom mechanism:
|
||||
https://github.com/cirosantilli/linux-kernel-module-cheat#gem5-debug-build
|
||||
''',
|
||||
}
|
||||
}
|
||||
|
||||
def _add_argument(self, argument_name):
|
||||
self.add_argument(
|
||||
argument_name,
|
||||
**self._build_arguments[argument_name]
|
||||
)
|
||||
|
||||
def clean(self):
|
||||
build_dir = self.get_build_dir()
|
||||
|
||||
Reference in New Issue
Block a user