20 Star 0 Fork 30

openEuler-RISC-V/bazel

forked from src-openEuler/bazel 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
bazel.spec 2.63 KB
一键复制 编辑 原始数据 按行查看 历史
吕晓倩 提交于 2022-01-19 05:38 . add support for riscv
%define __os_install_post %{nil}
Name: bazel
Version: 3.5.0
Release: 5
Summary: a fast, scalable, multi-language and extensible build system
License: Apache License 2.0
URL: https://www.bazel.build/
Source0: https://github.com/bazelbuild/bazel/releases/download/%{version}/bazel-%{version}-dist.zip
Patch1: fix-build-error-with-gcc10.patch
Patch2: support-mips64el-and-riscv64.patch
Patch3: add_toolchain_support_for_riscv64.patch
Patch4: add_cpu_riscv.patch
Patch5: env_python3.patch
BuildRequires: java-11-openjdk-devel python3 zip unzip python3-unversioned-command gcc-g++
Requires: libstdc++ libgcc java-11-openjdk-devel python3 zip unzip python3-unversioned-command
%description
{Fast, Correct} - Choose two
Build and test software of any size, quickly and reliably.
Speed up your builds and tests: Bazel rebuilds only what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.
One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.
Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.
Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.
%prep
unzip %{SOURCE0}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
cd derived/distdir
p=46993efdd33b73649796c5fc5c9efb193ae19d51
s=$(sha256sum < $p.zip)
unzip -q $p.zip
cat <<EOF >> platforms-$p/cpu/BUILD
constraint_value(
name = "riscv64",
constraint_setting = ":cpu",
)
EOF
zip -q $p.zip platforms-$p/cpu/BUILD
rm -rf platforms-$p
s2=$(sha256sum < $p.zip)
cd ../..
sed -i -e "s/${s% -}/${s2% -}/" WORKSPACE
%build
env EXTRA_BAZEL_ARGS="--host_javabase=@local_jdk//:jdk" bash ./compile.sh
chmod a+x output/bazel
%install
mkdir -p %{buildroot}%{_bindir}
install -m755 output/bazel %{buildroot}%{_bindir}
%files
%attr(0755,root,root) %{_bindir}/bazel
%changelog
* Thu 24 Mar 2022 xiaoqianlv <xiaoqian@nj.iscas.ac.cn> - 3.5.0-5
- add arch riscv
* Mon 9 Aug 2021 zhangtao <zhangtao221@huawei.com> - 3.5.0-4
- fix build error with gcc10
* Tue Jul 13 2021 guoxiaoqi <guoxiaoqi2@huawei.com> - 3.5.0-3
- Not strip %{_bindir}/bazel after install
* Mon May 31 2021 baizhonggui <baizhonggui@huawei.com> - 3.5.0-2
- Add gcc-g++ in BuildRequires
* Sun Sep 28 2020 Zhipeng Xie<xiezhipeng1@huawei.com> - 3.5.0-1
- Package init
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openeuler-risc-v/bazel.git
git@gitee.com:openeuler-risc-v/bazel.git
openeuler-risc-v
bazel
bazel
master

搜索帮助