bootstrap-toolchain/packages/sources/llvm/conanfile.py

42 lines
1.3 KiB
Python

# Toolchain builder for the Serene programming language
#
# Copyright (c) 2019-2023 Sameer Rahmani <lxsameer@gnu.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from conan import ConanFile
from conan.tools.files import get
from conf.utils import *
class LLVM(ConanFile):
name = "llvm-source"
version = get_version("llvm")
settings = "os", "arch"
def build(self):
get(
self,
f"https://github.com/llvm/llvm-project/archive/{self.version}.tar.gz",
destination=self.package_folder,
strip_root=True,
filename=f"llvm.tar.gz",
)
def package_info(self):
self.buildenv_info.define(
"LLVM_SOURCE_DIR",
self.package_folder,
)