• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2# Copyright (c) 2025 Huawei Device Co., Ltd.
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15ARK_VERSION=15.0.4-0d8b9c-ark
16LLVM_ARK_VERSION=llvm-15.0.4-ark18
17
18curl -Lo /opt/${LLVM_ARK_VERSION:?}-release-ohos.tar.xz  https://repo.huaweicloud.com/harmonyos/compiler/clang/${ARK_VERSION:?}/${LLVM_ARK_VERSION:?}-release-ohos.tar.xz && \
19mkdir -p /opt/llvm-15-release-ohos && \
20curl -Lo /opt/${LLVM_ARK_VERSION:?}-release-x86_64.tar.xz -q https://repo.huaweicloud.com/harmonyos/compiler/clang/${ARK_VERSION:?}/${LLVM_ARK_VERSION:?}-release-x86_64.tar.xz && \
21mkdir -p /opt/llvm-15-release-x86_64 && \
22curl -Lo /opt/${LLVM_ARK_VERSION:?}-release-aarch64.tar.xz -q https://repo.huaweicloud.com/harmonyos/compiler/clang/${ARK_VERSION:?}/${LLVM_ARK_VERSION:?}-release-aarch64.tar.xz && \
23mkdir -p /opt/llvm-15-release-aarch64 && \
24curl -Lo /opt/${LLVM_ARK_VERSION:?}-debug-aarch64.tar.xz -q https://repo.huaweicloud.com/harmonyos/compiler/clang/${ARK_VERSION:?}/${LLVM_ARK_VERSION:?}-debug-aarch64.tar.xz && \
25mkdir -p /opt/llvm-15-debug-aarch64 && \
26curl -Lo /opt/${LLVM_ARK_VERSION:?}-debug-x86_64.tar.xz -q https://repo.huaweicloud.com/harmonyos/compiler/clang/${ARK_VERSION:?}/${LLVM_ARK_VERSION:?}-debug-x86_64.tar.xz && \
27mkdir -p /opt/llvm-15-debug-x86_64 && \
28tar -xJf /opt/${LLVM_ARK_VERSION:?}-release-ohos.tar.xz -C /opt/llvm-15-release-ohos && \
29tar -xJf /opt/${LLVM_ARK_VERSION:?}-release-x86_64.tar.xz -C /opt/llvm-15-release-x86_64 && \
30tar -xJf /opt/${LLVM_ARK_VERSION:?}-release-aarch64.tar.xz -C /opt/llvm-15-release-aarch64 && \
31tar -xJf /opt/${LLVM_ARK_VERSION:?}-debug-x86_64.tar.xz -C /opt/llvm-15-debug-x86_64 && \
32tar -xJf /opt/${LLVM_ARK_VERSION:?}-debug-aarch64.tar.xz -C /opt/llvm-15-debug-aarch64 && \
33rm -fr /opt/${LLVM_ARK_VERSION:?}*
34