userland: only link to lkmc.o if needed

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-05-05 00:00:00 +00:00
parent eba97f9cef
commit e5dbbcd8c2
6 changed files with 20 additions and 5 deletions

View File

@@ -206,7 +206,7 @@ Default: build all examples that have their package dependencies met, e.g.:
build_dir,
dirpath_relative_root
)
common_objs_dir = [common_obj]
common_objs_dir = []
cc_flags_after = []
cc_flags_dir = cc_flags.copy()
if dirpath_relative_root_components_len > 0:
@@ -270,12 +270,15 @@ Default: build all examples that have their package dependencies met, e.g.:
))
if my_path_properties['pedantic']:
cc_flags_file.extend(['-pedantic', LF])
common_objs_file = common_objs_dir.copy()
if my_path_properties['lkmc_common_obj']:
common_objs_file.append(common_obj)
error = thread_pool.submit({
'c_std': my_path_properties['c_std'],
'cc_flags': cc_flags_file + my_path_properties['cc_flags'],
'cc_flags_after': cc_flags_after,
'cxx_std': my_path_properties['cxx_std'],
'extra_objs': common_objs_dir,
'extra_objs': common_objs_file,
'in_path': in_path,
'out_path': self.resolve_userland_executable(in_path),
})