Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions specs/binary_install.anod
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ class binary_install(spec("common")):
@property
def tarball(self):
raise NotImplementedError

@property
def url(self):
raise NotImplementedError

@property
def remove_root_dir(self):
return True
Expand Down
35 changes: 19 additions & 16 deletions specs/gnatcov.anod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ from e3.fs import cp
from e3.anod.helper import Make
from e3.anod.spec import Anod
from e3.anod.loader import spec
from e3.diff import patch

import os

Expand All @@ -13,7 +12,7 @@ patch_name = "gnatcov.patch"
class GNATcov(spec("common")):
@property
def version(self):
return "22.0"
return "26.0"

@property
def tarball(self):
Expand All @@ -34,7 +33,6 @@ class GNATcov(spec("common")):
def build_source_list(self):
return [
Anod.Source(name=self.tarball, publish=True, dest=""),
self.Source(name=patch_name, publish=True, unpack_cmd=cp, dest="patches"),
]

@property
Expand All @@ -45,13 +43,14 @@ class GNATcov(spec("common")):
Anod.Dependency("libgpr", track=True),
Anod.Dependency("gnatcoll", track=True),
Anod.Dependency("gnatcoll-bindings", track=True),
Anod.Dependency("langkit", track=True),
Anod.Dependency("langkit_support", track=True),
Anod.Dependency("libadalang", track=True),
Anod.Dependency("binutils", track=True),
Anod.Dependency("gnatutil", track=True),
Anod.Dependency("xmlada", track=True),
Anod.Dependency("zlib", track=True),
Anod.Dependency("gmp", track=True)
Anod.Dependency("gmp", track=True),
Anod.Dependency("llvm", track=True),
]
if self.env.target.os.name == "windows":
deps.append(Anod.Dependency("libiconv"))
Expand All @@ -63,23 +62,14 @@ class GNATcov(spec("common")):
for m in [d for d in self.deps if d != "binutils"]:
self.deps[m].setenv()

# Little hack to apply the patch only once, there is probably a clean
# way to do that.
patched = os.path.join(self["SRC_DIR"], "patches", ".patched")
if not os.path.exists(patched):
patch(
os.path.join(self["SRC_DIR"], "patches", patch_name),
self.build_space.src_dir,
)
touch(patched)

build_mode = "prod"
exec_dir = os.path.join(self["SRC_DIR"], "tools", "gnatcov")

make_all = Make(self, exec_dir=exec_dir, jobs=1)
make_all.set_default_target("all")
make_all.set_var("BINUTILS_SRC_DIR", self.deps["binutils"]["SRC_DIR"])
make_all.set_var("BINUTILS_BUILD_DIR", self.deps["binutils"]["BUILD_DIR"])
make_all.set_var("C_SUPPORT", "False")

make_distrib = Make(self, exec_dir=exec_dir)
make_distrib.set_var("PREFIX", unixpath(self["INSTALL_DIR"]))
Expand All @@ -89,8 +79,21 @@ class GNATcov(spec("common")):
m.set_var("BITS_ARCH", str(self.env.target.cpu.bits))
m.set_var("DISTRIB_ARCH", self.env.build.cpu.name)
m.set_var("BUILD_MODE", build_mode)
m.set_var("ADAPTERS_LIST", "")
m.set_var("ADAPTERS_LIST", "llvm_json")

make_all()
make_distrib()

cp(
source=os.path.join(
self.deps["llvm"]["INSTALL_DIR"],
"bin",
"llvm-profdata" + self.env.build.os.exeext,
),
target=os.path.join(
self["PKG_DIR"],
"libexec",
"gnatcoverage",
),
)
self.clean()
2 changes: 1 addition & 1 deletion specs/gnatutil.anod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import os
class GNATUTIL(spec("common")):
@property
def version(self):
return "20.0w-20190814-1532A"
return "26.0w-20250825"

@property
def tarball(self):
Expand Down
40 changes: 40 additions & 0 deletions specs/llvm.anod
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
from e3.anod.loader import spec
from e3.fs import sync_tree
from e3.anod.spec import Anod
import os

class LLVM(spec("binary_install")):
@property
def version(self):
return "20.1.8"

@property
def platform(self):
if self.env.host.os.name == "windows":
return "x86_64-pc-windows-msvc"
if self.env.host.os.name == "darwin":
if self.env.host.cpu.name == "arm":
return "macos-arm64"
else:
# Unsupported
raise NotImplementedError
else:
if self.env.host.cpu.name == "x86_64":
return "linux-x64"
else:
return "linux-arm64"

@property
def tool(self):
if self.env.host.os.name == "windows":
return "clang+llvm"
else:
return "LLVM"

@property
def tarball(self):
return f"{self.tool}-{self.version}-{self.platform}.tar.xz"

@property
def url(self):
return f"https://github.com/llvm/llvm-project/releases/download/llvmorg-{self.version}/{self.tarball}"
Binary file not shown.
Binary file not shown.
Loading