Create a library from a set of input objects.
(libname, inputs)
| 149 | |
| 150 | |
| 151 | def create_lib(libname, inputs): |
| 152 | """Create a library from a set of input objects.""" |
| 153 | suffix = utils.suffix(libname) |
| 154 | |
| 155 | inputs = sorted(inputs, key=objectfile_sort_key) |
| 156 | if suffix in {'.bc', '.o'}: |
| 157 | if len(inputs) == 1: |
| 158 | if inputs[0] != libname: |
| 159 | shutil.copyfile(inputs[0], libname) |
| 160 | else: |
| 161 | building.link_to_object(inputs, libname) |
| 162 | else: |
| 163 | assert suffix == '.a' |
| 164 | create_lib_emar(libname, inputs) |
| 165 | |
| 166 | |
| 167 | def get_top_level_ninja_file(): |
no test coverage detected