dfmt: use `ldc` to build on ARM
Closes #119970. Signed-off-by: Patrick Linnane <patrick@linnane.io> Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>master
parent
46c618191c
commit
1d7abc6681
|
@ -17,18 +17,24 @@ class Dfmt < Formula
|
|||
sha256 cellar: :any_skip_relocation, x86_64_linux: "852cdd41ee99f72be5b7e22af09e07a5da3457791016a78ec0038f3172c96120"
|
||||
end
|
||||
|
||||
on_macos do
|
||||
on_arm do
|
||||
depends_on "ldc" => :build
|
||||
end
|
||||
|
||||
on_linux do
|
||||
on_intel do
|
||||
depends_on "dmd" => :build
|
||||
end
|
||||
|
||||
def install
|
||||
target = OS.mac? ? "ldc" : "dmd"
|
||||
target = if Hardware::CPU.arm?
|
||||
"ldc"
|
||||
else
|
||||
ENV.append "DFLAGS", "-fPIC" if OS.linux?
|
||||
"dmd"
|
||||
end
|
||||
system "make", target
|
||||
bin.install "bin/dfmt"
|
||||
bash_completion.install "bash-completion/completions/dfmt"
|
||||
end
|
||||
|
||||
test do
|
||||
|
|
Loading…
Reference in New Issue