mirror of
https://github.com/mappu/miqt.git
synced 2025-05-10 21:50:21 +00:00
miqt-docker: add -minify-build task
This commit is contained in:
parent
34e7429fe1
commit
6984b83aea
@ -43,6 +43,12 @@ func evaluateTask(taskArgs []string) (retArgs []string, fixup func(*exec.Cmd), a
|
|||||||
retArgs = append(retArgs, taskArgs[1:]...)
|
retArgs = append(retArgs, taskArgs[1:]...)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
case `-minify-build`:
|
||||||
|
// @ref https://github.com/mappu/miqt/issues/147#issuecomment-2800331135
|
||||||
|
retArgs = []string{`/bin/bash`, `-c`, "CGO_CFLAGS='-Os -ffunction-sections -fdata-sections -flto=auto' CGO_CXXFLAGS='-Os -ffunction-sections -fdata-sections -flto=auto' CGO_LDFLAGS='-Wl,--gc-sections -flto=auto -fwhole-program' go build -ldflags '-s -w'"}
|
||||||
|
retArgs = append(retArgs, taskArgs[1:]...)
|
||||||
|
return
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return nil, nil, false, fmt.Errorf("Unrecognized task %q", taskArgs[0])
|
return nil, nil, false, fmt.Errorf("Unrecognized task %q", taskArgs[0])
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user