Get the link flags needed to use the library. This will trigger a build if this library is not in the cache.
(self)
| 443 | return cache.get(self.get_path(), self.do_generate, force=USE_NINJA == 2, quiet=USE_NINJA) |
| 444 | |
| 445 | def get_link_flag(self): |
| 446 | """Get the link flags needed to use the library. |
| 447 | |
| 448 | This will trigger a build if this library is not in the cache. |
| 449 | """ |
| 450 | fullpath = self.build() |
| 451 | # For non-libraries (e.g. crt1.o) we pass the entire path to the linker |
| 452 | if self.get_ext() != '.a': |
| 453 | return fullpath |
| 454 | # For libraries (.a) files, we pass the abbreviated `-l` form. |
| 455 | base = utils.unsuffixed_basename(fullpath) |
| 456 | return '-l' + base.removeprefix('lib') |
| 457 | |
| 458 | def get_files(self): |
| 459 | """Get a list of source files for this library. |
no test coverage detected