Create shared library. Parameters ---------- output : str The target shared library. objects : List[str] List of object files. options : List[str] The list of additional options string. cc : Optional[str] The compiler command. cwd : Op
(output, objects, options=None, cc=None, cwd=None, ccache_env=None)
| 65 | |
| 66 | |
| 67 | def create_shared(output, objects, options=None, cc=None, cwd=None, ccache_env=None): |
| 68 | """Create shared library. |
| 69 | |
| 70 | Parameters |
| 71 | ---------- |
| 72 | output : str |
| 73 | The target shared library. |
| 74 | |
| 75 | objects : List[str] |
| 76 | List of object files. |
| 77 | |
| 78 | options : List[str] |
| 79 | The list of additional options string. |
| 80 | |
| 81 | cc : Optional[str] |
| 82 | The compiler command. |
| 83 | |
| 84 | cwd : Optional[str] |
| 85 | The current working directory. |
| 86 | |
| 87 | ccache_env : Optional[Dict[str, str]] |
| 88 | The environment variable for ccache. Set `None` to disable ccache by default. |
| 89 | """ |
| 90 | cc = cc or get_cc() |
| 91 | |
| 92 | if _is_linux_like(): |
| 93 | _linux_compile(output, objects, options, cc, cwd, ccache_env, compile_shared=True) |
| 94 | elif _is_windows_like(): |
| 95 | _windows_compile(output, objects, options, cwd, ccache_env) |
| 96 | else: |
| 97 | raise ValueError("Unsupported platform") |
| 98 | |
| 99 | |
| 100 | def _linux_ar(output, inputs, ar): |
nothing calls this directly
no test coverage detected
searching dependent graphs…