1 Star 0 Fork 1.2K

蓝色大魔王/build

forked from OpenHarmony/build 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
x86_64-w64-mingw32-clang 2.53 KB
一键复制 编辑 原始数据 按行查看 历史
wuhuiquan 提交于 2024-04-19 20:41 . [rust] update rust toolchain
#!/bin/sh
# Copyright (c) 2024 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DIR="$(cd "$(dirname "$0")" && pwd)"
BASENAME="$(basename "$0")"
TARGET="${BASENAME%-*}"
EXE="${BASENAME##*-}"
DEFAULT_TARGET=x86_64-w64-mingw32
if [ "$TARGET" = "$BASENAME" ]; then
TARGET=$DEFAULT_TARGET
fi
ARCH="${TARGET%%-*}"
TARGET_OS="${TARGET##*-}"
# Check if trying to compile Ada; if we try to do this, invoking clang
# would end up invoking <triplet>-gcc with the same arguments, which ends
# up in an infinite recursion.
case "$*" in
*-x\ ada*)
echo "Ada is not supported" >&2
exit 1
;;
*)
;;
esac
# Allow setting e.g. CCACHE=1 to wrap all building in ccache.
if [ -n "$CCACHE" ]; then
CCACHE=ccache
fi
# If changing this wrapper, change clang-target-wrapper.c accordingly.
CLANG="$DIR/clang++"
FLAGS=""
case $EXE in
clang++|g++|c++)
FLAGS="$FLAGS --driver-mode=g++"
;;
c99)
FLAGS="$FLAGS -std=c99"
;;
c11)
FLAGS="$FLAGS -std=c11"
;;
esac
case $ARCH in
i686)
# Dwarf is the default for i686.
;;
x86_64)
# SEH is the default for x86_64.
;;
armv7)
# SEH is the default for armv7.
;;
aarch64)
# SEH is the default for aarch64.
;;
esac
case $TARGET_OS in
mingw32uwp)
# the UWP target is for Windows 10
FLAGS="$FLAGS -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00"
# the UWP target can only use Windows Store APIs
FLAGS="$FLAGS -DWINAPI_FAMILY=WINAPI_FAMILY_APP"
# the Windows Store API only supports Windows Unicode (some rare ANSI ones are available)
FLAGS="$FLAGS -DUNICODE"
# add the minimum runtime to use for UWP targets
FLAGS="$FLAGS -Wl,-lwindowsapp"
# This still requires that the toolchain (in particular, libc++.a) has
# been built targeting UCRT originally.
FLAGS="$FLAGS -Wl,-lucrtapp"
# Force the Universal C Runtime
FLAGS="$FLAGS -D_UCRT"
;;
esac
FLAGS="$FLAGS -target $TARGET"
FLAGS="$FLAGS -rtlib=compiler-rt"
FLAGS="$FLAGS -unwindlib=libunwind"
FLAGS="$FLAGS -stdlib=libc++"
FLAGS="$FLAGS -fuse-ld=lld"
$CCACHE "$CLANG" $FLAGS "$@"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/the_big_blue_devil/build.git
git@gitee.com:the_big_blue_devil/build.git
the_big_blue_devil
build
build
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385