未验证 提交 1a722a08 编辑于 作者: Carlo Cabrera's avatar Carlo Cabrera 提交者: GitHub
浏览文件

Merge pull request #12345 from alebcay/std_go_args-output-name

formula: allow optional output path in std_go_args
......@@ -1528,10 +1528,13 @@ class Formula
end
# Standard parameters for Go builds.
sig { params(ldflags: T.nilable(String)).returns(T::Array[String]) }
def std_go_args(ldflags: nil)
args = ["-trimpath", "-o=#{bin/name}"]
args += ["-ldflags=#{ldflags}"] if ldflags
sig {
params(output: T.any(String, Pathname),
ldflags: T.nilable(T.any(String, T::Array[String]))).returns(T::Array[String])
}
def std_go_args(output: bin/name, ldflags: nil)
args = ["-trimpath", "-o=#{output}"]
args += ["-ldflags=#{Array(ldflags).join(" ")}"] if ldflags
args
end
......
支持 Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册