commands: add linker options

This commit is contained in:
2024-06-17 18:00:35 +08:00
parent ca6dafa5f9
commit b0cb183204
2 changed files with 34 additions and 6 deletions

View File

@@ -8,3 +8,8 @@ export const optFlag = (flag: string, opt: string | undefined) => undefList(opt,
* Generate a switch flag, like "--rebuild", "--nobuild"
*/
export const optSwitch = (flag: string, opt: boolean | undefined) => undefList(opt, opt => opt ? [flag] : [])
export const optMultiFlag = (flag: string, opt: string[] | undefined) =>
undefList(
opt,
opt => opt.flatMap(name => [flag, name]))