mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
std_go_args: add -tags
flag
Signed-off-by: botantony <antonsm21@gmail.com>
This commit is contained in:
parent
c4fe6f2c29
commit
96eacb7fd9
@ -1820,10 +1820,12 @@ class Formula
|
||||
output: T.any(String, Pathname),
|
||||
ldflags: T.nilable(T.any(String, T::Array[String])),
|
||||
gcflags: T.nilable(T.any(String, T::Array[String])),
|
||||
tags: T.nilable(T.any(String, T::Array[String])),
|
||||
).returns(T::Array[String])
|
||||
}
|
||||
def std_go_args(output: bin/name, ldflags: nil, gcflags: nil)
|
||||
def std_go_args(output: bin/name, ldflags: nil, gcflags: nil, tags: nil)
|
||||
args = ["-trimpath", "-o=#{output}"]
|
||||
args += ["-tags=#{Array(tags).join(" ")}"] if tags
|
||||
args += ["-ldflags=#{Array(ldflags).join(" ")}"] if ldflags
|
||||
args += ["-gcflags=#{Array(gcflags).join(" ")}"] if gcflags
|
||||
args
|
||||
|
@ -517,7 +517,7 @@ The `std_*_args` methods, as well as the arguments they pass, are:
|
||||
"-o=#{output}"
|
||||
```
|
||||
|
||||
It also provides a convenient way to set `-ldflags` and `-gcflags`, see examples: [`babelfish`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/b/babelfish.rb) and [`wazero`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/w/wazero.rb) formulae.
|
||||
It also provides a convenient way to set `-ldflags`, `-gcflags`, and `-tags`, see examples: [`babelfish`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/b/babelfish.rb) and [`wazero`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/w/wazero.rb) formulae.
|
||||
|
||||
#### `std_meson_args`
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user