未验证 提交 3f357861 编辑于 作者: Caleb Xu's avatar Caleb Xu
浏览文件

formula: allow optional output path in std_go_args

上级 f9105f61
......@@ -1528,9 +1528,9 @@ 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}"]
sig { params(output: T.any(String, Pathname), ldflags: T.nilable(String)).returns(T::Array[String]) }
def std_go_args(output: bin/name, ldflags: nil)
args = ["-trimpath", "-o=#{output}"]
args += ["-ldflags=#{ldflags}"] if ldflags
args
end
......
支持 Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册