diff --git a/board-config/liteos_a/config.gni b/board-config/liteos_a/config.gni new file mode 100644 index 0000000000000000000000000000000000000000..4195db39f2d1e7881548dc28549d1046951f55bd --- /dev/null +++ b/board-config/liteos_a/config.gni @@ -0,0 +1,78 @@ +# Copyright (C) 2023 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. + +# Kernel type, e.g. "linux", "liteos_a", "liteos_m". +kernel_type = "liteos_a" + +# Kernel version. +kernel_version = "None" + +declare_args() { + musl_lite_multi = "" +} + +# Board CPU type, e.g. "cortex-a7", "riscv32". +if (musl_lite_multi == ""){ + board_cpu = "" +} else { + board_cpu = "cortex-a7" +} + + +# Board arch, e.g. "armv7-a", "rv32imac". +board_arch = "armv7-a" + +# Toolchain name used for system compiling. +# E.g. gcc-arm-none-eabi, arm-linux-harmonyeabi-gcc, ohos-clang, riscv32-unknown-elf. +# Note: The default toolchain is "ohos-clang". It's not mandatory if you use the default toolchain. +board_toolchain = "" + +# The toolchain path installed, it's not mandatory if you have added toolchain path to your ~/.bashrc. +board_toolchain_path = "" + +# Compiler prefix. +board_toolchain_prefix = "" + +# Compiler type, "gcc" or "clang". +board_toolchain_type = "clang" + +# Board related common compile flags. +if (musl_lite_multi == "" || musl_lite_multi == "a7_soft" ) { + board_cflags = [ + "-mfloat-abi=soft", + ] +} else if (musl_lite_multi == "a7_hard_neon-vfpv4") { + board_cflags = [ + "-mfloat-abi=hard", + "-mfpu=neon-vfpv4", + ] +} else if (musl_lite_multi == "a7_softfp_neon-vfpv4") { + board_cflags = [ + "-mfloat-abi=softfp", + "-mfpu=neon-vfpv4", + ] +} +board_cxx_flags = [] +board_ld_flags = [] + +# Board related headfiles search path. +board_include_dirs = [] + +# Board adapter dir for OHOS components. +board_adapter_dir = "" + +# Sysroot path. +board_configed_sysroot = "" + +# Board storage type, it used for file system generation. +storage_type = "emmc" diff --git a/llvm-19.1.7.tar.gz.aa b/llvm-19.1.7.tar.gz.aa deleted file mode 100644 index 6cd75546a74260db1586be10f7c2602133e315dc..0000000000000000000000000000000000000000 --- a/llvm-19.1.7.tar.gz.aa +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3dae36a25f12f73c7bb3e69dd00ca4c67698d0866f327af033484cca1f902639 -size 838860800 diff --git a/llvm-19.1.7.tar.gz.ab b/llvm-19.1.7.tar.gz.ab deleted file mode 100644 index ce407803f121716ba52b1aac09257c9478ee192a..0000000000000000000000000000000000000000 --- a/llvm-19.1.7.tar.gz.ab +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e357f1e90193e823371947eb77ad0676a066edd3b21b575f6a64e3e6f6c33337 -size 838860800 diff --git a/llvm-19.1.7.tar.gz.ac b/llvm-19.1.7.tar.gz.ac deleted file mode 100644 index 7fa27984a4a1936e66229855ee38d1c45c9f73ea..0000000000000000000000000000000000000000 --- a/llvm-19.1.7.tar.gz.ac +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:15ed8418b026b17c1694d34ecb812fe123b87b3aaf84a8909b834bac5b21e496 -size 838860800 diff --git a/llvm-19.1.7.tar.gz.ad b/llvm-19.1.7.tar.gz.ad deleted file mode 100644 index c60785185a7de3dd35540554d20c9de7b2324fe0..0000000000000000000000000000000000000000 --- a/llvm-19.1.7.tar.gz.ad +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bc9a1d06b3470e373bed82da37509b717534c29bc36f3c66ee30479c589cf6cb -size 28966004 diff --git a/llvm-build/BUILD.gn b/llvm-build/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..4d170b282dbcd166ab327fe64d7344d00a82a979 --- /dev/null +++ b/llvm-build/BUILD.gn @@ -0,0 +1,45 @@ +# Copyright (C) 2023 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. + +import("//build/ohos.gni") +import("//build/ohos_var.gni") + +group("new_crt") { + deps = [ + ":llvm_test" + ] +} + +declare_args() { + llvm_lib = "" + build_libs_flags = "" +} + +action("build_libs") { + script = "build.py" + outputs = ["${target_out_dir}/libs/crts" ] + inputs = ["//toolchain/llvm-project/llvm-build/build.py"] + + args = [ + "--build-libs", + llvm_lib, + "--build-libs-flags", + build_libs_flags + ] +} + +ohos_executable("llvm_test") { + print("ohos_executable llvm_test") + sources = [ "//toolchain/llvm-project/llvm/test/tools/llvm-symbolizer/pdb/Inputs/test.cpp" ] +} + diff --git a/llvm-build/MakeLiblzma b/llvm-build/MakeLiblzma new file mode 100644 index 0000000000000000000000000000000000000000..5a98a98e4f1f2a0c1ca710a28529338cb5032930 --- /dev/null +++ b/llvm-build/MakeLiblzma @@ -0,0 +1,105 @@ +# Copyright (C) 2023 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. + +SYSROOT := +INSTALL_DIR := +BUILD_DIR := +TARGET_TRIPLE := +CC := +AR := +SRCS := 7zAlloc.c 7zArcIn.c 7zBuf2.c 7zBuf.c 7zCrc.c 7zCrcOpt.c 7zDec.c 7zFile.c 7zStream.c Alloc.c Bcj2.c Bra86.c Bra.c BraIA64.c CpuArch.c Delta.c LzFind.c Lzma2Dec.c Lzma2Enc.c Lzma86Dec.c Lzma86Enc.c LzmaDec.c LzmaEnc.c LzmaLib.c Ppmd7.c Ppmd7Dec.c Ppmd7Enc.c Sha256.c Sha256Opt.c Sort.c Xz.c XzCrc64.c XzCrc64Opt.c XzDec.c XzEnc.c XzIn.c MtDec.c MtCoder.c LzFindMt.c LzFindOpt.c Threads.c + +SRC_PREFIX := +LIB_VERSION := +C_CFLAGS_COMMON := -D_7ZIP_ST -Wall -Werror -Wno-empty-body -Wno-enum-conversion -Wno-logical-op-parentheses -Wno-self-assign -fPIC -fstack-protector-strong +C_CFLAGS_OHOS := -D_IS_TRY_USE_HW_SHA=0 -DZ7_AFFINITY_DISABLE -Wno-implicit-function-declaration +IS_STATIC := + +ifeq ($(IS_STATIC), True) + LDFLAGS_IS_STATIC := -static + TARGET_NAME := liblzma.a +else + LDFLAGS_IS_STATIC := -shared + TARGET_NAME := liblzma.so +endif + +$(info TARGET TRIPLE:$(TARGET_TRIPLE)) +ifeq ($(TARGET_TRIPLE),linux-x86_64) +CFLAGS := --target=x86_64-unknown-linux-gnu $(C_CFLAGS_COMMON) +LDFLAGS := -shared -fuse-ld=lld -Wl,-z,relro,-z,now -Wl,-z,noexecstack +TARGET := liblzma.so +else +ifeq ($(TARGET_TRIPLE),windows-x86_64) +CFLAGS := --target=x86_64-pc-windows-gnu --sysroot=$(SYSROOT) $(C_CFLAGS_COMMON) +LDFLAGS := -shared -fuse-ld=lld --rtlib=compiler-rt -Wl,--out-implib=liblzma.dll.a +TARGET := liblzma.dll +TARGET_A := liblzma.dll.a +else +ifeq ($(findstring darwin,$(TARGET_TRIPLE)),darwin) +SDKROOT := $(shell xcrun --sdk macosx --show-sdk-path) +CFLAGS := $(C_CFLAGS_COMMON) -current_version $(LIB_VERSION) -compatibility_version $(LIB_VERSION) +LDFLAGS := -dynamiclib -fuse-ld=lld -Wl,-syslibroot,$(SDKROOT) -install_name @rpath/liblzma.$(LIB_VERSION).dylib +TARGET := liblzma.$(LIB_VERSION).dylib +else +ifeq ($(TARGET_TRIPLE),arm-linux-ohos) +CFLAGS := --target=arm-linux-ohos -march=armv7-a -mfloat-abi=softfp --sysroot=$(SYSROOT) $(C_CFLAGS_COMMON) $(C_CFLAGS_OHOS) -I$(SYSROOT)/$(TARGET_TRIPLE)/usr/include +LDFLAGS := $(LDFLAGS_IS_STATIC) -fuse-ld=lld -Wl,-z,relro,-z,now -Wl,-z,noexecstack --sysroot=$(SYSROOT) -L$(SYSROOT)/$(TARGET_TRIPLE)/usr/lib -lc --rtlib=compiler-rt -lpthread -lunwind +TARGET := $(TARGET_NAME) +else +ifeq ($(TARGET_TRIPLE),aarch64-linux-ohos) +CFLAGS := --target=aarch64-linux-ohos --sysroot=$(SYSROOT) $(C_CFLAGS_COMMON) $(C_CFLAGS_OHOS) -I$(SYSROOT)/$(TARGET_TRIPLE)/usr/include +LDFLAGS := $(LDFLAGS_IS_STATIC) -fuse-ld=lld -Wl,-z,relro,-z,now -Wl,-z,noexecstack --sysroot=$(SYSROOT) -L$(SYSROOT)/$(TARGET_TRIPLE)/usr/lib -lc --rtlib=compiler-rt -lpthread -lunwind +TARGET := $(TARGET_NAME) +else +$(warning *** warning: TARGET_TRIPLE $(TARGET_TRIPLE) has not been set in rights) +endif +endif +endif +endif +endif + +lzma_header_install: + @echo "begin header install" + mkdir -p $(INSTALL_DIR)/include + cp -rf $(SRC_PREFIX)* $(INSTALL_DIR)/include + +ifeq ($(IS_STATIC), True) +# Compile the source file as .o +OBJECTS := $(addprefix $(BUILD_DIR)/, $(SRCS:.c=.o)) +$(BUILD_DIR): + mkdir -p $(BUILD_DIR) +$(BUILD_DIR)/%.o: $(SRC_PREFIX)/%.c | $(BUILD_DIR) + $(CC) $(CFLAGS) -c $< -o $@ +# Link. o as a static library +$(TARGET): $(OBJECTS) lzma_header_install + $(AR) rc $(TARGET) $(OBJECTS) +else +$(TARGET): lzma_header_install + $(CC) $(CFLAGS) $(LDFLAGS) -o $(TARGET) $(addprefix $(SRC_PREFIX), $(SRCS)) +endif + +.PHONY: clean + +clean: + rm -f $(TARGET) $(SRC_PREFIX)*.o $(BUILD_DIR)/*.o + +.PHONY:install + +install: $(TARGET) + @echo "begin install" + mkdir -p $(INSTALL_DIR)/lib + mv $(TARGET) $(INSTALL_DIR)/lib +ifeq ($(TARGET_TRIPLE),windows-x86_64) + mv $(TARGET_A) $(INSTALL_DIR)/lib +endif + @echo "install success!" diff --git a/llvm-build/Makefile b/llvm-build/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..22e78063318b3eff22f292dd594bc837fb26bdb7 --- /dev/null +++ b/llvm-build/Makefile @@ -0,0 +1,245 @@ +# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved. +# Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without modification, +# are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, this list of +# conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, this list +# of conditions and the following disclaimer in the documentation and/or other materials +# provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its contributors may be used +# to endorse or promote products derived from this software without specific prior written +# permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +ARCH = arm +ifneq ($(GCC),) +TARGET = +CROSS_COMPILE = $(GCC:%gcc=%) +CC = $(GCC) $(ARCH_CFLAGS) +MULTILIB = $(patsubst %.,%,$(shell $(CC) -print-multi-directory)) +else +TARGET = $(ARCH)-liteos-ohos +CLANG ?= clang +CROSS_COMPILE = $(CLANG:%clang=%llvm-) +CC = $(CLANG) --target=$(TARGET) $(ARCH_CFLAGS) +BUILD=x86_64-linux-gnu +MULTILIB = $(patsubst $(dir $(shell $(filter-out $(ARCH_CFLAGS),$(CC)) -print-libgcc-file-name))%,/%,$(dir $(shell $(CC) -print-libgcc-file-name))) +endif +MUSLBUILDDIR = build_$(or $(TARGET),$(ARCH))$(subst /,_,$(MULTILIB:%/=%)) +HIDE = @ +BUILD_DEBUG = false +SED_ARGS = -e '/install-libs:/s/if/and/g' + +TOPDIR = $(shell pwd)/../../../.. +MUSLDIR = $(TOPDIR)/third_party/musl +LINUXKERNELDIR = $(TOPDIR)/third_party/Linux_Kernel +OPTRTDIR = $(TOPDIR)/third_party/optimized-routines +NUTTXDIR = $(TOPDIR)/third_party/NuttX +SYSROOTDIR = $(TOPDIR)/prebuilts/lite/sysroot +LITEOSADIR = $(TOPDIR)/kernel/liteos_a +LINUXDIR = $(TOPDIR)/kernel/linux/linux-5.10 +MUSLCOPYDIR = $(TOPDIR) + +TARGETS = $(if $(wildcard $(LITEOSADIR)),liteos_a_user,) +TARGETS += $(if $(wildcard $(LINUXDIR)),linux_user,) + +define LINUX_TYPES_H +#ifndef _LINUX_TYPES_H +#define _LINUX_TYPES_H +#include +typedef uint32_t __u32, __le32; +#endif +endef +export LINUX_TYPES_H + +ifeq ($(ARCH),arm) +ARCH_CFLAGS = -mfloat-abi=softfp -mcpu=cortex-a7 -mfpu=neon-vfpv4 +else +ifeq ($(ARCH),aarch64) +ARCH_CFLAGS = +else +ifeq ($(ARCH),riscv64) +ARCH_CFLAGS = +else +ifeq ($(ARCH),loongarch64) +ARCH_CFLAGS = +else +ifeq ($(ARCH),mips) +ARCH_CFLAGS = +else +ifeq ($(ARCH),x86_64) +ARCH_CFLAGS = +else +$(warning *** warning: ARCH $(ARCH) has not been tested yet, use with cautions!) +ARCH_CFLAGS = +endif +endif +endif +endif +endif +endif + +ifeq ($(ARCH),aarch64) +ifeq ($(BUILD_DEBUG),true) +CFLAGS = -march=armv8 -g -gdwarf-4 -O0 -Wall -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now,-z,noexecstack +else +CFLAGS = -march=armv8 -O2 -Wall -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now,-z,noexecstack +endif +else +ifeq ($(ARCH),riscv64) +CFLAGS = -march=rv64gc -O2 -Wall -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now,-z,noexecstack +else +ifeq ($(ARCH),loongarch64) +CFLAGS = -march=loongarch64 -O2 -Wall -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now,-z,noexecstack +else +ifeq ($(ARCH),mips) +CFLAGS = -march=mips32r2 -O2 -Wall -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now,-z,noexecstack +else +ifeq ($(ARCH),x86_64) +CFLAGS = -march=x86-64 -O2 -Wall -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now,-z,noexecstack +else +CFLAGS = -march=armv7-a -O2 -Wall -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now,-z,noexecstack +endif +endif +endif +endif +endif + +CFLAGS += -Wno-int-conversion + +.PHONY: $(TARGETS:%=musl_copy_for_%) +.PHONY: $(TARGETS:%=musl_patch_for_%) +.PHONY: $(TARGETS:%=musl_install_for_%) +.PHONY: $(TARGETS:%=musl_header_install_for_%) +.PHONY: $(TARGETS:%=linux_header_install_for_%) +.PHONY: $(TARGETS:%=nuttx_header_install_for_%) +.PHONY: $(TARGETS:%=optimized_routines_install_for_%) +.PHONY: all clean distclean + +all: $(TARGETS:%=musl_install_for_%) + +$(TARGETS:%=musl_copy_for_%): + $(HIDE) mkdir -p $(MUSLCOPYDIR)/$@ + $(HIDE) cp -rfu $(MUSLDIR)/[!p]* $(MUSLCOPYDIR)/$@ + +optimized_routines_install_for_liteos_a_user: musl_copy_for_liteos_a_user +ifneq ($(ARCH),) + $(HIDE) cp -rfp $(OPTRTDIR)/string/$(ARCH)/* $(MUSLCOPYDIR)/$> $(MUSLCOPYDIR)/$ $(MUSLCOPYDIR)/$ $(MUSLCOPYDIR)/$/dev/null && \ + make -sj install-headers + +musl_install_for_liteos_a_user: musl_patch_for_liteos_a_user + $(HIDE) cd $(MUSLCOPYDIR)/musl_copy_for_liteos_a_user && mkdir -p $(MUSLBUILDDIR) && cd $(MUSLBUILDDIR) && \ + ../configure --prefix=$(SYSROOTDIR)/$(TARGET)/usr --target=$(TARGET) \ + --includedir=$(SYSROOTDIR)/$(TARGET)/usr/include \ + --libdir=$(SYSROOTDIR)/$(TARGET)/usr/lib/$(MULTILIB) \ + --syslibdir=$(SYSROOTDIR)/$(TARGET)/usr/lib/$(MULTILIB) \ + --build=$(BUILD) \ + $(if $(LDFLAGS),LDFLAGS="$(LDFLAGS)",) \ + CC="$(CC)" CROSS_COMPILE="$(CROSS_COMPILE)" CFLAGS="$(CFLAGS)" >/dev/null && \ + make -sj install + +musl_patch_for_linux_user: musl_copy_for_linux_user + $(HIDE) cp -rfp $(MUSLDIR)/porting/linux/user/* $(MUSLCOPYDIR)/$/dev/null && \ + make -sj install-headers + +musl_install_for_linux_user: musl_patch_for_linux_user + $(HIDE) cd $(MUSLCOPYDIR)/musl_copy_for_linux_user && mkdir -p $(MUSLBUILDDIR) && cd $(MUSLBUILDDIR) && \ + ../configure --prefix=$(SYSROOTDIR)/$(TARGET)/usr --target=$(TARGET) \ + --includedir=$(SYSROOTDIR)/$(TARGET)/usr/include \ + --libdir=$(SYSROOTDIR)/$(TARGET)/usr/lib/$(MULTILIB) \ + --syslibdir=$(SYSROOTDIR)/$(TARGET)/usr/lib/$(MULTILIB) \ + --build=$(BUILD) \ + CC="$(CC)" CROSS_COMPILE="$(CROSS_COMPILE)" CFLAGS="$(CFLAGS)" >/dev/null && \ + make -sj install + +clean: + ifeq ($(BUILD_DEBUG),false) + $(HIDE) rm -rf musl_copy_for_* linux_header_install_for_* + endif + +distclean: clean + $(HIDE) rm -rf $(SYSROOTDIR)/lib $(SYSROOTDIR)/usr diff --git a/llvm-build/OHOS.cmake b/llvm-build/OHOS.cmake new file mode 100644 index 0000000000000000000000000000000000000000..df2c08ce41ba84d48fd24b5c2d2b7a7ff7a566ac --- /dev/null +++ b/llvm-build/OHOS.cmake @@ -0,0 +1,22 @@ +# Copyright (C) 2021 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. + +include(Platform/Linux) + +# OHOS has soname, but binary names must end in ".so" so we cannot append +# a version number. Also we cannot portably represent symlinks on the host. +set(CMAKE_PLATFORM_NO_VERSIONED_SONAME 1) + +# OHOS reportedly ignores RPATH, and we cannot predict the install +# location anyway. +set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") diff --git a/llvm-build/README.md b/llvm-build/README.md new file mode 100644 index 0000000000000000000000000000000000000000..a1dfc1f1e4dfb09d7fb36f68f96d57b5ecccc07b --- /dev/null +++ b/llvm-build/README.md @@ -0,0 +1,257 @@ +## Overview + +This readme briefly describes the functionality of our LLVM toolchain and how to build it + +1. [Build WIKI](#build_wiki) +2. [Function Introduction](#function_introduction) + + +## Build WIKI +
+ +### System Requirements for Toolchain BUild + +Ubuntu >= 16.04 +MacOS X >= 10.15.4 + +
+ +### Environmental preparation + +ubuntu +``` +sudo apt-get install build-essential swig python3-dev libedit-dev libncurses5-dev binutils-dev gcc-multilib abigail-tools elfutils pkg-config autoconf autoconf-archive +``` +mac +``` +brew install swig git-lfs java coreutils wget +``` + +
+ +### Get Code +``` +repo init -u https://gitee.com/OpenHarmony/manifest.git -b master -m llvm-toolchain.xml +repo sync -c +repo forall -c 'git lfs pull' +``` +
+ +### Toolchain build process + +Here is an example of starting build process on Linux or MacOS: +``` +# update prebuilts, no need to run each time +./toolchain/llvm-project/llvm-build/env_prepare.sh +# build +python3 ./toolchain/llvm-project/llvm-build/build.py +``` + +1. env_prepare (one time only) +![输入图片说明](data/one_time_setup.png) + +2. build +![输入图片说明](data/llvm_build.png) + +
+ +### Options + +build.py options: + +``` +--skip-build # skip compile and goto package step +--skip-package # do compile without package step +--enable-assertions # enable assertion when compiling +--build-name # specify release package name +--debug # build debug version llvm toolchain +--target-debug # build debug version of target llvm libraries, runtimes, and lldb-server +--strip # strip llvm toolchain binaries +--no-strip-libs # used with -- strip to preserve the symbols of the lib library +--no-build-arm # skip triplet arm +--no-build-aarch64 # skip triplet arm64 +--no-build-x86_64 # skip triplet x86_64 +--no-lto # disable LTO optimization when build toolchain +--build-instrumented # enable instrument pgo when build toolchain +--xunit-xml-output # specify LLVM unit test XML report path +--build-lldb-static # build statically lldb tool for ARM and AARCH64 +--build-python # build python (not using prebuilt one, currently effective for Windows and OHOS) +--build-ncurses # build ncurses tool for linux, Mac x86-64 or M1 +--build-libedit # build libedit tool for linux, Mac x86-64 or M1 +--build-libxml2 # build libxml2 tool for linux, windows, Mac x86_64 or M1 +--lldb-timeout # automatically exit when timeout (currently effective for lldb-server) +--no-build # optional, skip some targets + windows + libs + lldb-server + linux + check-api +--build-clean # delete out folder after build packages +--build_libs_flags # which kind of flags for build_crts and build_runtimes + OH + LLVM + BOTH +--build-only # build only some targets, skip building windows, lldb-server and package step + lld + llvm-readelf + llvm-objdump + musl + compiler-rt + libcxx +--enable-check-abi # Check libc++_shared.so ABI. If the ABI was changed then interrupt a build process and report an error. +--separate-libs # Separate the cross compilation library (compiler-rt and libcxx) in Linux. +``` +
+ +### Output Layout + +When build successfully completed. following artifacts will be available in `out` directory + +`sysroot` -> sysroots for OHOS targets +`install` -> toolchain build +`*.tar.bz2` -> archived versions of toolchain and sysroots +
+ +### OHOS Archive + +1. llvm +``` +contains: +1. toolchain which provides clang compiler, lldb(-mi), clang-tidy etc. tools +2. libc++/clang_rt/asan/fuzzer libs for target device + +OHOS sync from: https://mirrors.huaweicloud.com/openharmony/compiler/clang/ +Which is the same as: out/clang-dev-${platform}-${arch}.tar.bz2 +OHOS archive to: prebuilts/clang/ohos//${platform}/llvm + +License: Apache License v2.0 with LLVM Exceptions +``` + +2. libcxx-ndk +``` +contains: provide libc++ for ndk in target device + +OHOS fetch prebuilts from: https://mirrors.huaweicloud.com/openharmony/compiler/clang/ and archive it to prebuilts/clang/ohos//${platform}/libcxx-ndk. This tar is + +License: Apache License v2.0 with LLVM Exceptions +``` + +### Build process of AArch64 toolchain + +First build toolchain on Linux. +Here is an example of starting build process on Linux: +``` +# build +python3 ./toolchain/llvm-project/llvm-build/build-ohos-aarch64.py +``` + +
+ +build-ohos-aarch64.py options: + +``` +--enable-assertions # enable assertion when compiling +--debug # build debug version llvm toolchain +--strip # strip llvm toolchain binaries +--build-python # build python and enable script in debugger +--build-ncurses # build ncurses and enable ncurses in debugger +--build-libedit # build libedit and enable libedit in debugger +--build-libxml2 # build libxml2 and enable libxml in debugger +``` +
+ +When build successfully completed, artifacts will be available in `out/ohos-aarch64-install` directory, including clang, lld, runtimes, LLVM tools and libLLVM.so for aarch64. + + +## Function Introduction +
+ +### Build process of Arm debugger + +First build toolchain on Linux. +Here is an example of starting build process on Linux: +``` +# build +python3 ./toolchain/llvm-project/llvm-build/build-ohos-arm.py +``` + +
+ +build-ohos-arm.py options: + +``` +--build-python # build python and enable script in debugger +--build-ncurses # build ncurses and enable ncurses in debugger +--build-libedit # build libedit and enable libedit in debugger +--build-libxml2 # build libxml2 and enable libxml in debugger +``` +
+ +When build successfully completed, artifacts will be available in `out/ohos-arm-install` directory, including lldb for arm. + + +## Function Introduction +
+ +### Build process of AArch64 toolchain for Ubuntu (aarch64-linux-gnu triple) + +First build toolchain on Linux. +Install additional package libstdc++-11-dev-arm64-cross. + +Here is an example of starting build process on Linux: +``` +# build +python3 ./toolchain/llvm-project/llvm-build/build-linux-aarch64.py +``` + +
+ +build-linux-aarch64.py options: + +``` +--enable-assertions # enable assertion when compiling +--debug # build debug version llvm toolchain +--strip # strip llvm toolchain binaries +--build-python # build python and enable script in debugger +--build-ncurses # build ncurses and enable ncurses in debugger +--build-libedit # build libedit and enable libedit in debugger +--build-libxml2 # build libxml2 and enable libxml in debugger +``` +
+ +When build successfully completed, artifacts will be available in `out/linux-aarch64-install` directory, including clang, lld, runtimes, LLVM tools and libLLVM.so for aarch64. + +
+ +### Functionality + +The LLVM toolchain is built based on LLVM 15.0.4. It is used to provide capability of building ohos image. For detailed information about LLVM 15.0.4, please refer to [LLVM 15.0.4](https://discourse.llvm.org/t/llvm-15-0-4-released/66337). +
+ +### Specifically Included Triplets + +Despite all the components provided by LLVM community, we included several triplets for different types of ohos devices to our LLVM toochain, listed as below. For specification, liteos is a newly included OS name which indicate the simplified linux kernel. + +| Triplet Name | Architecture | System Kernel | System | +| ---------------------- | ------------ | ------------- | --------------- | +| arm-liteos-ohos | ARM 32bits | LiteOS | Small system | +| arm-linux-ohos | ARM 32bits | Linux | Small system | +| arm-linux-ohos | ARM 32bits | Linux | Standard system | +| aarch64-linux-ohos | ARM 64bits | Linux | Standard system | + +For detailed definition of Small System and Standard System, please refer to [System Types](https://gitee.com/openharmony/docs/blob/master/en/device-dev/Readme-EN.md). + +### Testing musl libc + +Toolchain build process includes musl libc build. libc.so is available in sysroot. +Sometimes it's needed to build libc tests. + +Here is an example of starting build process on Linux: +``` +# build +python3 ./toolchain/llvm-project/llvm-build/build-libc-test.py +``` + +When build successfully completed, artifacts will be available in `out/llvm_build/musl` directory, including test libraries, libc tests and musl_unittest. +Scripts to execute libc tests could be found in `third_party/musl/scripts` directory. +For detailed information about musl, please refer to [third_party_musl](https://gitee.com/openharmony/third_party_musl). diff --git a/llvm-build/abi_check.py b/llvm-build/abi_check.py new file mode 100755 index 0000000000000000000000000000000000000000..e3d6621881d07e2fffa6c4e1c9ce5bf8a2e0bb78 --- /dev/null +++ b/llvm-build/abi_check.py @@ -0,0 +1,212 @@ +#!/usr/bin/env python3 +# 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. + +import argparse +import subprocess +import sys +import logging + + +class AbiCheck: + + def __init__(self, args) -> None: + self.args = argparse.Namespace( + action=None, + suppressions=None, + no_show_locs=None, + headers_dir=None, + debug_info_dir=None, + load_all_types=None, + annotate=None, + abi_file=None, + elf_file=None, + debug_info_dir1=None, + debug_info_dir2=None, + headers_dir1=None, + headers_dir2=None, + show_size_offset=None, + compare_files=None + ) + source_dict = vars(args) + self.args.__dict__.update(source_dict) + logging.basicConfig(level=logging.INFO) + return + + @classmethod + def exec_command(cls, command, timeout=10): + with subprocess.Popen(command, stderr=subprocess.PIPE, stdout=subprocess.PIPE, close_fds=True, + start_new_session=True) as process: + output, errs = process.communicate(timeout=timeout) + out_str = output.decode() + errs_str = errs.decode() + if out_str != '': + logging.info(out_str) + if errs_str != '': + logging.error(errs_str) + + @classmethod + def get_show_size_offset(cls, argument): + if argument == "bytes": + return "bytes" + elif argument == "bits": + return "bits" + elif argument == "hex" or argument == "hexadecimal": + return "hex" + elif argument == "dec" or argument == "decimal": + return "dec" + else: + return "bytes" + + def run(self) -> None: + if self.args.action == "gen_abi": + self.gen_abi_file() + elif self.args.action == "compare_abi": + self.compare_abi_files() + else: + logging.info("do nothing") + + def build_gen_command(self): + all_args = ["--no-corpus-path"] + if self.args.suppressions is not None: + all_args.extend(["--suppressions", self.args.suppressions]) + if self.args.debug_info_dir is not None: + all_args.extend(["--debug-info-dir", self.args.debug_info_dir]) + if self.args.headers_dir is not None: + all_args.extend(["--headers-dir", self.args.headers_dir]) + if self.args.no_show_locs is not None and self.args.no_show_locs is not False: + all_args.extend(["--no-show-locs"]) + if self.args.load_all_types is not None and self.args.load_all_types is not False: + all_args.extend(["--load-all-types"]) + if self.args.annotate is not None and self.args.annotate is not False: + all_args.extend(["--annotate"]) + all_args.extend(["--out-file", self.args.abi_file]) + all_args.extend([self.args.elf_file]) + command = ["abidw"] + all_args + return command + + def gen_abi_file(self): + if self.args.elf_file is None: + logging.error("elf-file is None, please check your file") + return + if self.args.abi_file is None: + logging.error("abi-file path is None, please check your config") + return + command = self.build_gen_command() + self.exec_command(command) + + def build_compare_command(self): + all_args = ["--no-corpus-path", + "--deleted-fns", + "--drop-private-types", + "--changed-fns", + "--added-fns", + "--deleted-vars", + "--changed-vars", + "--added-vars", + "--harmless", + "--no-redundant"] + if self.args.suppressions is not None: + all_args.extend(["--suppressions", self.args.suppressions]) + if self.args.debug_info_dir1 is not None: + all_args.extend(["--debug-info-dir1", self.args.debug_info_dir1]) + if self.args.debug_info_dir2 is not None: + all_args.extend(["--debug-info-dir2", self.args.debug_info_dir2]) + if self.args.headers_dir1 is not None: + all_args.extend(["--headers-dir1", self.args.headers_dir1]) + if self.args.headers_dir2 is not None: + all_args.extend(["--headers-dir2", self.args.headers_dir2]) + if self.args.show_size_offset is not None: + size_offset = self.get_show_size_offset(self.args.show_size_offset) + all_args.extend([f"--show-{size_offset}"]) + all_args.extend(self.args.compare_files) + command = ["abidiff"] + all_args + return command + + def compare_abi_files(self, timeout=10): + if self.args.compare_files is None: + logging.error("elf_file is None, please check your file") + return False + command = self.build_compare_command() + cmd_string = " ".join(command) + with subprocess.Popen(command, stderr=subprocess.PIPE, stdout=subprocess.PIPE, close_fds=True, + start_new_session=True) as process: + output, errs = process.communicate(timeout=timeout) + out_str = output.decode() + if out_str is not None and out_str != "": + logging.warning("cmd_string is : %s", cmd_string) + logging.warning(out_str) + return True + else: + return False + + +def parse_abi_check_args(): + parser = argparse.ArgumentParser(description='Generate ABI files and compare ABI files') + parser.add_argument('--action', help='gen_abi or compare_abi') + parser.add_argument('--suppressions', help=' specify a suppression file') + parser.add_argument('--no-show-locs', action='store_true', default=False, help='do not show location information') + gen_abi = parser.add_argument_group("gen_abi_file") + gen_abi.add_argument( + '--elf-file', + help='elf-file to gen abi-file') + gen_abi.add_argument( + '--abi-file', + help=' write the output to file-path') + gen_abi.add_argument( + '--debug-info-dir', + help=' look for debug info under dir-path') + gen_abi.add_argument( + '--headers-dir', + help=' the path to headers of the elf file') + gen_abi.add_argument( + '--load-all-types', + action='store_true', + default=False, + help='read all types including those not reachable from exported declarations') + gen_abi.add_argument( + '--annotate', + action='store_true', + default=False, + help='annotate the ABI artifacts emitted in the output') + compare_abi = parser.add_argument_group("compare_abi") + compare_abi.add_argument( + '--compare-files', + nargs=2, + metavar='FILE', help='compare two abi files') + compare_abi.add_argument( + '--debug-info-dir1', + help=' the root for the debug info of file1') + compare_abi.add_argument( + '--debug-info-dir2', + help=' the root for the debug info of file1') + compare_abi.add_argument( + '--headers-dir1', + help=' the path to headers of file1') + compare_abi.add_argument( + '--headers-dir2', + help=' the path to headers of file2') + compare_abi.add_argument( + '--show-size-offset', + help='show size offsets in bytes/bits/hexadecimal/decimal') + return parser.parse_args() + + +def main(args): + abi_check = AbiCheck(args) + abi_check.run() + + +if __name__ == '__main__': + sys.exit(main(parse_abi_check_args())) diff --git a/llvm-build/build-libc-test.py b/llvm-build/build-libc-test.py new file mode 100755 index 0000000000000000000000000000000000000000..13be68413d4b3a8f5e0c493de3c5e1679c6ce7d7 --- /dev/null +++ b/llvm-build/build-libc-test.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python3 +# 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. + +import os + +from build import BuildConfig, SysrootComposer + +def main(): + print('Start building musl libc tests') + build_config = BuildConfig() + sysroot_composer = SysrootComposer(build_config) + + product_name = 'llvm_build' + target_cpu = 'arm64' + gn_args = '' + + os.chdir(build_config.LLVM_BUILD_DIR) + sysroot_composer.run_hb_build(product_name, target_cpu, 'libctest', gn_args) + sysroot_composer.run_hb_build(product_name, target_cpu, 'libc_gtest', gn_args) + + +if __name__ == "__main__": + main() + + + diff --git a/llvm-build/build-linux-aarch64.py b/llvm-build/build-linux-aarch64.py new file mode 100755 index 0000000000000000000000000000000000000000..109f2a094f3ca9de5bc25218ca4ee4618932be5f --- /dev/null +++ b/llvm-build/build-linux-aarch64.py @@ -0,0 +1,96 @@ +#!/usr/bin/env python3 +# Copyright (C) 2023 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. + +import os +from cross_toolchain_builder import CrossToolchainBuilder + + +class UbuntuAarch64ToolchainBuilder(CrossToolchainBuilder): + def __init__(self) -> None: + super().__init__("aarch64-linux-gnu", True) + + def _update_build_args(self): + self._cflags.extend( + [ + "-v", + "-funwind-tables", + ] + ) + + cflags_debug = "-O0 -g -fno-limit-debug-info" + cflags_release = "-O2 -DNDEBUG" + + self._ldflags.extend(["-static-libstdc++"]) + + env = {**self._build_config.ORIG_ENV, 'LD_LIBRARY_PATH': os.path.join(self._llvm_root, "lib")} + + # We do not build runtimes, since they will be copied from main toolchain build + self._llvm_defines.update( + { + "CMAKE_SYSTEM_NAME": "Linux", + "CMAKE_SYSROOT": "", + "OHOS": "0", + "CMAKE_C_FLAGS_DEBUG": cflags_debug, + "CMAKE_CXX_FLAGS_DEBUG": cflags_debug, + "CMAKE_ASM_FLAGS_DEBUG": cflags_debug, + "CMAKE_C_FLAGS_RELEASE": cflags_release, + "CMAKE_CXX_FLAGS_RELEASE": cflags_release, + "CMAKE_ASM_FLAGS_RELEASE": cflags_release, + "OPENMP_STANDALONE_BUILD": "ON", + "LLVM_DIR": os.path.join(self._llvm_root, "lib", "cmake", "llvm"), + "LLVM_ENABLE_FFI": "OFF", + "LLVM_BUILD_LLVM_DYLIB": "ON", + "CMAKE_LIBRARY_ARCHITECTURE": self._llvm_triple, + "LLVM_INCLUDE_BENCHMARKS": "OFF", + "LLVM_INCLUDE_EXAMPLES": "OFF", + "LLVM_INCLUDE_TESTS": "OFF", + "LLVM_BUILD_TOOLS": "ON", + "LLVM_INSTALL_UTILS": "ON", + "LLVM_ENABLE_ZLIB": "OFF", + "LLVM_ENABLE_PROJECTS": ";".join(self._build_config.host_projects), + "CMAKE_NM": os.path.join(self._llvm_root, "bin", "llvm-nm"), + "CMAKE_RANLIB": os.path.join(self._llvm_root, "bin", "llvm-ranlib"), + "CMAKE_OBJCOPY": os.path.join(self._llvm_root, "bin", "llvm-objcopy"), + "CMAKE_OBJDUMP": os.path.join(self._llvm_root, "bin", "llvm-objdump"), + "CMAKE_READELF": os.path.join(self._llvm_root, "bin", "llvm-readelf"), + "CMAKE_STRIP": os.path.join(self._llvm_root, "bin", "llvm-strip"), + "CMAKE_LINKER": os.path.join(self._llvm_root, "bin", "ld.lld"), + "CMAKE_POSITION_INDEPENDENT_CODE": "True", + "CMAKE_CXX_FLAGS": " ".join(self._cflags), + "CMAKE_ASM_FLAGS": " ".join(self._cflags), + "CMAKE_C_FLAGS": " ".join(self._cflags), + "CMAKE_SHARED_LINKER_FLAGS": " ".join(self._ldflags), + "CMAKE_MODULE_LINKER_FLAGS": " ".join(self._ldflags), + "CMAKE_EXE_LINKER_FLAGS": " ".join(self._ldflags) + + " -Wl,--gc-sections", + } + ) + + if self._build_config.enable_assertions: + self._llvm_defines["LLVM_ENABLE_ASSERTIONS"] = "ON" + + if not self._build_config.build_libxml2: + self._llvm_defines["LLDB_ENABLE_LIBXML2"] = "OFF" + + self._build_config.build_python = False + + +def main(): + print("Start cross-compiling LLVM toolchain for Ubuntu AArch64 host on linux") + UbuntuAarch64ToolchainBuilder().build() + + +if __name__ == "__main__": + main() diff --git a/llvm-build/build-ohos-aarch64.py b/llvm-build/build-ohos-aarch64.py new file mode 100755 index 0000000000000000000000000000000000000000..c66388e18997ca80bbc92a952f91b176a6e76d1e --- /dev/null +++ b/llvm-build/build-ohos-aarch64.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python3 +# Copyright (C) 2023 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. + +import os +from cross_toolchain_builder import CrossToolchainBuilder + + +class OHOSAarch64ToolchainBuilder(CrossToolchainBuilder): + def __init__(self) -> None: + super().__init__("aarch64-linux-ohos") + + def _update_build_args(self): + self._cflags.extend( + [ + "-v", + "-funwind-tables", + "-no-canonical-prefixes", + "-D__MUSL__", + ] + ) + + cflags_debug = "-O0 -g -fno-limit-debug-info" + cflags_release = "-O2 -DNDEBUG" + + self._ldflags.extend(["-static-libstdc++"]) + + llvm_extra_env = {} + llvm_extra_env["LD_LIBRARY_PATH"] = os.path.join(self._llvm_root, "lib") + env = dict(self._build_config.ORIG_ENV) + if llvm_extra_env is not None: + env.update(llvm_extra_env) + + # We do not build runtimes, since they will be copied from main toolchain build + self._llvm_defines.update( + { + "CMAKE_C_FLAGS_DEBUG": cflags_debug, + "CMAKE_CXX_FLAGS_DEBUG": cflags_debug, + "CMAKE_ASM_FLAGS_DEBUG": cflags_debug, + "CMAKE_C_FLAGS_RELEASE": cflags_release, + "CMAKE_CXX_FLAGS_RELEASE": cflags_release, + "CMAKE_ASM_FLAGS_RELEASE": cflags_release, + "OPENMP_STANDALONE_BUILD": "ON", + "LLVM_DIR": os.path.join(self._llvm_root, "lib", "cmake", "llvm"), + "LLVM_ENABLE_FFI": "OFF", + "LLVM_BUILD_LLVM_DYLIB": "ON", + "CMAKE_LIBRARY_ARCHITECTURE": self._llvm_triple, + "LLVM_INCLUDE_BENCHMARKS": "OFF", + "LLVM_INCLUDE_EXAMPLES": "OFF", + "LLVM_INCLUDE_TESTS": "OFF", + "LLVM_BUILD_TOOLS": "ON", + "LLVM_INSTALL_UTILS": "ON", + "LLVM_ENABLE_ZLIB": "OFF", + "LLVM_ENABLE_PROJECTS": ";".join(self._build_config.host_projects), + "CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN": self._llvm_root, + "CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN": self._llvm_root, + "CMAKE_ASM_COMPILER_EXTERNAL_TOOLCHAIN": self._llvm_root, + "CMAKE_NM": os.path.join(self._llvm_root, "bin", "llvm-nm"), + "CMAKE_RANLIB": os.path.join(self._llvm_root, "bin", "llvm-ranlib"), + "CMAKE_OBJCOPY": os.path.join(self._llvm_root, "bin", "llvm-objcopy"), + "CMAKE_OBJDUMP": os.path.join(self._llvm_root, "bin", "llvm-objdump"), + "CMAKE_READELF": os.path.join(self._llvm_root, "bin", "llvm-readelf"), + "CMAKE_STRIP": os.path.join(self._llvm_root, "bin", "llvm-strip"), + "CMAKE_LINKER": os.path.join(self._llvm_root, "bin", "ld.lld"), + "CMAKE_POSITION_INDEPENDENT_CODE": "True", + "CMAKE_CXX_FLAGS": " ".join(self._cflags) + " -stdlib=libc++", + "CMAKE_ASM_FLAGS": " ".join(self._cflags), + "CMAKE_C_FLAGS": " ".join(self._cflags), + "CMAKE_SHARED_LINKER_FLAGS": " ".join(self._ldflags), + "CMAKE_MODULE_LINKER_FLAGS": " ".join(self._ldflags), + "CMAKE_EXE_LINKER_FLAGS": " ".join(self._ldflags) + + " -Wl,--gc-sections", + } + ) + + if self._build_config.enable_assertions: + self._llvm_defines["LLVM_ENABLE_ASSERTIONS"] = "ON" + + +def main(): + print("Start cross-compiling LLVM toolchain for OHOS AArch64 host on linux") + OHOSAarch64ToolchainBuilder().build() + + +if __name__ == "__main__": + main() diff --git a/llvm-build/build-ohos-arm.py b/llvm-build/build-ohos-arm.py new file mode 100755 index 0000000000000000000000000000000000000000..fe2f621cb46c7e8a1778fae8a02fae968b35ca86 --- /dev/null +++ b/llvm-build/build-ohos-arm.py @@ -0,0 +1,74 @@ +#!/usr/bin/env python3 +# 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. + +import os +from cross_toolchain_builder import CrossToolchainBuilder + + +class OHOSArmToolchainBuilder(CrossToolchainBuilder): + def __init__(self) -> None: + super().__init__("arm-linux-ohos") + self._llvm_prebuilt_path = self._build_utils.merge_out_path("llvm_make") + + def _update_build_args(self): + self._cflags.extend( + [ + "-march=armv7-a -mfloat-abi=soft", + ] + ) + + self._llvm_defines.update( + { + "CMAKE_CXX_FLAGS": " ".join(self._cflags), + "CMAKE_ASM_FLAGS": " ".join(self._cflags), + "CMAKE_C_FLAGS": " ".join(self._cflags), + "CMAKE_SHARED_LINKER_FLAGS": " ".join(self._ldflags), + "CMAKE_MODULE_LINKER_FLAGS": " ".join(self._ldflags), + "CMAKE_EXE_LINKER_FLAGS": " ".join(self._ldflags), + "LLVM_ENABLE_ASSERTIONS": "OFF", + "LLVM_USE_NEWPM": "ON", + "LLVM_ENABLE_BINDINGS": "OFF", + "CLANG_REPOSITORY_STRING": "llvm-project", + "COMPILER_RT_BUILD_XRAY": "OFF", + "CMAKE_POSITION_INDEPENDENT_CODE": "ON", + "LLVM_ENABLE_PER_TARGET_RUNTIME_DIR": "ON", + "COMPILER_RT_USE_BUILTINS_LIBRARY": "ON", + "LLVM_ENABLE_LIBCXX": "ON", + "LLVM_ENABLE_PROJECTS": "clang;lldb", + "CLANG_TABLEGEN": os.path.join( + self._llvm_root, + "..", + self._llvm_prebuilt_path, + "bin", + "clang-tblgen", + ), + "LLDB_TABLEGEN": os.path.join( + self._llvm_root, + "..", + self._llvm_prebuilt_path, + "bin", + "lldb-tblgen", + ), + } + ) + + +def main(): + print("Start building LLDB tools for OHOS ARM host") + OHOSArmToolchainBuilder().build(build_target=["lldb", "lldb-server"]) + + +if __name__ == "__main__": + main() diff --git a/llvm-build/build.py b/llvm-build/build.py new file mode 100755 index 0000000000000000000000000000000000000000..c05ec8742fe5b9898048b9b8925d8f2801cdd483 --- /dev/null +++ b/llvm-build/build.py @@ -0,0 +1,3214 @@ +#!/usr/bin/env python3 +# Copyright (C) 2021 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. +# 2021.3.15 build for OHOS LLVM. +# Copyright (c) 2021 Huawei Device Co., Ltd. All rights reserved. + +import os +import platform +import re +import datetime +import logging +import glob +import subprocess +import shutil +import argparse +import mingw +import stat +import json +import sys + +from python_builder import MinGWPythonBuilder +from prebuilts_clang_version import prebuilts_clang_version +from get_ohos_flags import get_ohos_cflags, get_ohos_ldflags +from abi_check import AbiCheck + +class BuildConfig(): + # Defines public methods and functions and obtains script parameters. + + def __init__(self): + self.discover_paths() + args = self.parse_args() + + assert not(args.no_build and args.build_only), "Error! --no-build and --build-only flags aren't compatible." + + self.no_strip_libs = args.no_strip_libs + self.do_build = not args.skip_build + self.do_package = not args.skip_package and not args.build_only + self.build_name = args.build_name + self.debug = args.debug + self.target_debug = args.target_debug + self.strip = args.strip + self.no_lto = args.no_lto + self.build_instrumented = args.build_instrumented + self.xunit_xml_output = args.xunit_xml_output + self.enable_assertions = args.enable_assertions + self.build_gtest_libs = args.build_gtest_libs + self.build_clean = args.build_clean + self.need_libs = self.do_build and 'libs' not in args.no_build + self.need_lldb_server = self.do_build and 'lldb-server' not in args.no_build and not args.build_only + self.build_python = args.build_python + self.build_with_debug_info = args.build_with_debug_info + self.buildtools_path = os.path.join(self.REPOROOT_DIR , 'prebuilts') + + self.build_only = True if args.build_only else False + self.build_only_llvm = args.build_only["llvm"] if self.build_only else [] + self.build_only_libs = args.build_only["libs"] if self.build_only else [] + + self.build_xvm = (not args.skip_build) and args.build_xvm + self.no_build_arm = args.skip_build or args.no_build_arm + self.no_build_aarch64 = args.skip_build or args.no_build_aarch64 + self.no_build_riscv64 = args.skip_build or args.no_build_riscv64 + self.no_build_mipsel = args.skip_build or args.no_build_mipsel + self.no_build_x86_64 = args.skip_build or args.no_build_x86_64 + self.no_build_loongarch64 = args.skip_build or args.no_build_loongarch64 + self.build_ncurses = args.build_ncurses + self.build_libedit = args.build_libedit + self.build_lldb_static = args.build_lldb_static + self.need_lldb_tools = self.need_lldb_server or self.build_lldb_static + self.build_libxml2 = args.build_libxml2 + self.lldb_timeout = args.lldb_timeout + self.enable_monitoring = args.enable_monitoring + self.enable_lzma_7zip = args.enable_lzma_7zip + self.build_libs = args.build_libs + self.build_libs_flags = args.build_libs_flags + self.adlt_debug_build = args.adlt_debug_build + self.compression_format = args.compression_format + self.enable_check_abi = args.enable_check_abi + self.separate_libs = args.separate_libs + + #self.TARGETS = 'AArch64;ARM;BPF;Mips;RISCV;X86;LoongArch' + self.TARGETS = 'AArch64;X86' + self.ORIG_ENV = dict(os.environ) + self.VERSION = None # autodetected + + self.OPENHOS_SFX = '-linux-ohos' + self.LITEOS_SFX = '-liteos-ohos' + self.LLDB_PY_VERSION = '3.11' + self.LLDB_PYTHON = 'python3' + self.LLDB_PY_DETAILED_VERSION = self.LLDB_PY_VERSION + '.4' + self.CLANG_VERSION = prebuilts_clang_version + self.MINGW_TRIPLE = 'x86_64-windows-gnu' + self.build_libs_with_hb = self.build_libs_flags == 'OH' or self.build_libs_flags == 'BOTH' + + self.ARCHIVE_EXTENSION = '.tar.' + self.compression_format + self.ARCHIVE_OPTION = '-c' + ('j' if self.compression_format == "bz2" else 'z') + self.LIBXML2_VERSION = None + self.NCURSES_VERSION = None + self.LIBEDIT_VERSION = None + self.LZMA_VERSION = None + logging.basicConfig(level=logging.INFO) + + self.host_projects = args.host_build_projects + if 'clang' not in self.host_projects: + # Clang not found in the project list, + # but it is mandatory to build other projects/runtimes. + # Adding clang to project list. + self.host_projects.append('clang') + self.host_runtimes = args.host_build_runtimes + + def discover_paths(self): + # Location of llvm-build directory + self.LLVM_BUILD_DIR = os.path.abspath(os.path.dirname(__file__)) + + parent_of_llvm_build = os.path.basename(os.path.dirname(self.LLVM_BUILD_DIR)) + if parent_of_llvm_build == 'toolchain': + self.REPOROOT_DIR = os.path.abspath(os.path.join(self.LLVM_BUILD_DIR, '../..')) + else: + assert parent_of_llvm_build == 'llvm-project' + self.REPOROOT_DIR = os.path.abspath(os.path.join(self.LLVM_BUILD_DIR, '../../..')) + + self.LLVM_PROJECT_DIR = os.path.join(self.REPOROOT_DIR, 'toolchain', 'llvm-project') + self.OUT_PATH = os.path.join(self.REPOROOT_DIR, 'out') + self.PACKAGES_PATH = os.path.join(self.REPOROOT_DIR, 'packages') + + @staticmethod + def parse_add_argument(parser): + + parser.add_argument( + '--no-strip-libs', + action='store_true', + default=False, + help='Strip others but not strip libs(use with --strip)') + + parser.add_argument( + '--enable-assertions', + action='store_true', + default=False, + help='Apply assertions, some parameters are affected.') + + parser.add_argument( + '--build-gtest-libs', + action='store_true', + default=False, + help='Build gtest libraries.') + + parser.add_argument( + '--build-name', + default='dev', + help='Release name for the package.') + + parser.add_argument( + '--debug', + action='store_true', + default=False, + help='Building Clang and LLVM Tools for Debugging (only affects stage2)') + + parser.add_argument( + '--target-debug', + action='store_true', + default=False, + help='Building libraries, runtimes and lldb for the target for debugging') + + parser.add_argument( + '--strip', + action='store_true', + default=False, + help='Strip final LLVM binaries.') + + parser.add_argument( + '--build-xvm', + action='store_true', + default=False, + help='Add building XVM target.') + + parser.add_argument( + '--no-build-arm', + action='store_true', + default=False, + help='Omit build os target: arm.') + + parser.add_argument( + '--no-build-aarch64', + action='store_true', + default=False, + help='Omit build os target: aarch64.') + + parser.add_argument( + '--no-build-riscv64', + action='store_true', + default=False, + help='Omit build os target: 64-bit RISC-V.') + + parser.add_argument( + '--no-build-mipsel', + action='store_true', + default=False, + help='Omit build os target: mipsel.') + + parser.add_argument( + '--no-build-x86_64', + action='store_true', + default=False, + help='Omit build os target: x86_64.') + + parser.add_argument( + '--no-build-loongarch64', + action='store_true', + default=False, + help='Omit build os target: loongarch64.') + + parser.add_argument( + '--no-lto', + action='store_true', + default=False, + help='Accelerate builds by disabling LTO (only affects llvm product)') + + parser.add_argument( + '--build-instrumented', + action='store_true', + default=False, + help='Using the PGO instrumentation to build LLVM tool') + + parser.add_argument( + '--xunit-xml-output', + default=None, + help='Output path for LLVM unit tests XML report') + + parser.add_argument( + '--build-lldb-static', + action='store_true', + default=False, + help='Build statically lldb tool for ARM and AARCH64') + + parser.add_argument( + '--build-clean', + action='store_true', + default=False, + help='Delete out folder after build packages') + + parser.add_argument( + '--build-python', + action='store_true', + default=True, + help='Build Python (not using prebuilt one, currently effective for Windows and OHOS)') + + parser.add_argument( + '--build-ncurses', + action='store_true', + default=False, + help='Build ncurses tool for Linux, Mac x86-64 or M1') + + parser.add_argument( + '--build-libedit', + action='store_true', + default=False, + help='Build libedit tool for Linux, Mac x86-64 or M1') + + parser.add_argument( + '--build-libxml2', + action='store_true', + default=False, + help='Build libxml2 tool') + + parser.add_argument( + '--enable-lzma-7zip', + action='store_true', + default=False, + help='Build 7zip tool and enable LZMA compression support in LLDB') + + parser.add_argument( + '--lldb-timeout', + action='store_true', + default=False, + help='Automatically exit when timeout (currently effective for lldb-server)') + + parser.add_argument( + '--enable-monitoring', + action='store_true', + default=False, + help='Enable lldb performance monitoring') + + compression_formats = ['bz2', 'gz'] + + parser.add_argument( + '--compression-format', + choices=compression_formats, + default='bz2', + help='Choose compression output format (bz2 or gz)' + ) + + parser.add_argument( + '--build-with-debug-info', + action='store_true', + default=False, + help='Append -g to build flags in build_libs') + + parser.add_argument( + '--adlt-debug-build', + action='store_true', + default=False, + help='Build adlt with debug flags') + + parser.add_argument( + '--enable-check-abi', + nargs='?', + const=True, + default=False, + help='check libc++_shared.so abi') + + parser.add_argument( + '--separate-libs', + action='store_true', + default=False, + help='Separate compiler-rt and libcxx in Linux') + + def parse_args(self): + + parser = argparse.ArgumentParser(description='Process some integers.') + + # Options to skip build or packaging, can't skip two + build_package_group = parser.add_mutually_exclusive_group() + build_package_group.add_argument( + '--skip-build', + '-sb', + action='store_true', + default=False, + help='Omit the build, perform the packaging step directly.') + + build_package_group.add_argument( + '--skip-package', + '-sp', + action='store_true', + default=False, + help='Omit the packaging, perform the packaging step directly.') + + self.parse_add_argument(parser) + + class SeparatedListByCommaAction(argparse.Action): + + def __init__(self, choice_list, *args, **kwargs): + super().__init__(*args, **kwargs) + self.choice_list = choice_list + + def __call__(self, parser, namespace, vals, option_string): + if not vals: + setattr(namespace, self.dest, []) + return + vals = vals.split(',') + for val in vals: + if val not in self.choice_list: + error = f'"{val}" is invalid. Choose from: {self.choice_list}' + raise argparse.ArgumentError(self, error) + setattr(namespace, self.dest, vals) + + def choice_wrapper(choices): + return lambda *args, **kwargs: SeparatedListByCommaAction(choices, *args, **kwargs) + + known_platforms = ('windows', 'libs', 'lldb-server', 'linux', 'check-api') + parser.add_argument( + '--no-build', + action=choice_wrapper(known_platforms), + default=list(), + help=f"Don't build toolchain for specified platforms. Choices: {', '.join(known_platforms)}") + + known_libs = ['crts_first_time', 'crts_not_first_time', 'runtimes_libunwind', 'runtimes_libcxx', 'runtimes_libcxx_ndk'] + known_libs_flags = ['OH', 'BOTH', 'LLVM'] + + parser.add_argument( + '--build-libs', + choices=known_libs, + default=None, + help=argparse.SUPPRESS) + + parser.add_argument( + '--build-libs-flags', + choices=known_libs_flags, + default="LLVM", + help='which kind of flags for build_crts and build_runtimes') + + llvm_projects = ('clang', 'lld', 'clang-tools-extra', 'openmp', 'lldb') + parser.add_argument( + '--host-build-projects', + action=choice_wrapper(llvm_projects), + default=llvm_projects, + help=f'Projects to build for host. Choices: {", ".join(llvm_projects)}') + + llvm_runtimes = ('libunwind', 'libcxxabi', 'libcxx', 'compiler-rt') + parser.add_argument( + '--host-build-runtimes', + action=choice_wrapper(llvm_runtimes), + default=llvm_runtimes, + help=f'Runtimes to build for host. Choices: {", ".join(llvm_runtimes)}') + + llvm_components = ("lld", "llvm-readelf", "llvm-objdump") + libs_components = ("musl", "compiler-rt", "libcxx") + + class SeparatedListByCommaToDictAction(argparse.Action): + def __call__(self, parser, namespace, vals, option_string): + vals_dct = {"llvm": [], "libs": []} + for val in vals.split(','): + if val in llvm_components: + vals_dct["llvm"].append(val) + continue + elif val in libs_components: + vals_dct["libs"].append(val) + continue + else: + error = '\'{}\' invalid. Choose from {}, {}'.format(val, llvm_components, libs_components) + raise argparse.ArgumentError(self, error) + setattr(namespace, self.dest, vals_dct) + + parser.add_argument( + '--build-only', + action=SeparatedListByCommaToDictAction, + default=dict(), + help=f'Build only {", ".join(llvm_components)} llvm components and {", ".join(libs_components)} lib components.') + return parser.parse_args() + + +class ClangVersion(object): + """Parse and save clang version from version file.""" + + def __init__(self, version_file): + self._parse_version_file(version_file) + + @staticmethod + def _parse(text, key): + return re.findall(r'%s\s+(\d+)' % key, text)[0] + + def _parse_version_file(self, version_file): + with open(version_file, 'r') as fp: + text = fp.read() + self.major = self._parse(text, 'CLANG_VERSION_MAJOR') + self.minor = self._parse(text, 'CLANG_VERSION_MINOR') + self.patch = self._parse(text, 'CLANG_VERSION_PATCHLEVEL') + + def long_version(self): + return '.'.join([self.major, self.minor, self.patch]) + + def short_version(self): + return '.'.join([self.major, self.minor]) + + def major_version(self): + return self.major + + +class BuildUtils(object): + + def __init__(self, build_config): + self.build_config = build_config + self.buildtools_path = os.path.join(self.build_config.REPOROOT_DIR, 'prebuilts') + + if self.host_is_linux(): + self.CMAKE_BIN_DIR = os.path.abspath( + os.path.join(self.buildtools_path, 'cmake', self.platform_prefix(), 'bin') + ) + elif self.host_is_darwin(): + self.CMAKE_BIN_DIR = os.path.abspath( + os.path.join(self.buildtools_path, 'cmake', 'darwin-universal', 'bin') + ) + self._mingw_python_dir = None + + def open_ohos_triple(self, arch): + return arch + self.build_config.OPENHOS_SFX + + def liteos_triple(self, arch): + return arch + self.build_config.LITEOS_SFX + + def set_clang_version(self, install_dir): + self.build_config.VERSION = self.get_clang_version(install_dir).long_version() + + def invoke_ninja(self, + out_path, + env, + target=None, # target support list type + install=True, + build_threads=False): + + ninja_bin_path = os.path.join(self.buildtools_path, 'build-tools', self.platform_prefix(), 'bin', 'ninja') + + ninja_list = ['-l{}'.format(build_threads)] if build_threads else [] + + ninja_target = target if target else [] + + self.check_call([ninja_bin_path] + ninja_list + ninja_target, cwd=out_path, env=env) + if install: + self.check_call([ninja_bin_path, 'install'], cwd=out_path, env=env) + + def invoke_cmake(self, + cmake_path, + out_path, + invoke_defines, + env): + + cmake_bin_path = os.path.join(self.CMAKE_BIN_DIR, 'cmake') + flags = ['-G', 'Ninja'] + flags += ['-DCMAKE_PREFIX_PATH=%s' % self.CMAKE_BIN_DIR] + + ninja_bin_path = os.path.join(self.buildtools_path, 'build-tools', self.platform_prefix(), 'bin', 'ninja') + flags += ['-DCMAKE_MAKE_PROGRAM=%s' % ninja_bin_path] + + for key in invoke_defines: + newdef = ''.join(['-D', key, '=', invoke_defines[key]]) + flags += [newdef] + + flags += [cmake_path] + self.check_create_dir(out_path) + + self.check_call([cmake_bin_path] + flags, cwd=out_path, env=env) + + @staticmethod + def logger(): + """Returns the module level logger.""" + return logging.getLogger(__name__) + + @staticmethod + def get_clang_version(llvm_install): + version_file = os.path.join(llvm_install, 'include', 'clang', 'Basic', + 'Version.inc') + return ClangVersion(version_file) + + def check_create_dir(self, path): + if not os.path.exists(path): + """Proxy for os.makedirs with logging and dry-run support.""" + self.logger().info('makedirs %s', path) + os.makedirs(path) + + def check_rm_tree(self, tree_dir): + """Removes directory tree.""" + def chmod_and_retry(func, path, _): + if not os.access(path, os.W_OK): + os.chmod(path, stat.S_IWUSR) + return func(path) + raise IOError("rmtree on %s failed" % path) + + if os.path.exists(tree_dir): + self.logger().info('shutil rmtree %s', tree_dir) + shutil.rmtree(tree_dir, onerror=chmod_and_retry) + + def check_copy_tree(self, src_dir, dst_dir): + self.check_rm_tree(dst_dir) + """Proxy for shutil.copytree with logging and dry-run support.""" + self.logger().info('copytree %s %s', src_dir, dst_dir) + shutil.copytree(src_dir, dst_dir, symlinks=True) + + def check_copy_file(self, src_file, dst_file): + if os.path.exists(src_file): + """Proxy for shutil.copy2 with logging and dry-run support.""" + self.logger().info('copy %s %s', src_file, dst_file) + shutil.copy2(src_file, dst_file) + + def check_call(self, cmd, *args, **kwargs): + """subprocess.check_call with logging.""" + self.logger().info('check_call:%s %s', + datetime.datetime.now().strftime("%H:%M:%S"), subprocess.list2cmdline(cmd)) + + subprocess.check_call(cmd, *args, **kwargs) + + @staticmethod + def force_symlink(src, dst): + if os.path.exists(dst): + os.remove(dst) + os.symlink(src, dst) + + def merge_out_path(self, *args): + return os.path.abspath(os.path.join(self.build_config.OUT_PATH, *args)) + + def merge_packages_path(self, *args): + return os.path.abspath(os.path.join(self.build_config.PACKAGES_PATH, *args)) + + @staticmethod + def use_platform(): + sysstr = platform.system().lower() + arch = platform.machine() + return "%s-%s" % (sysstr, arch) + + def platform_prefix(self): + prefix = self.use_platform() + if (prefix.endswith('x86_64')): + return prefix[:-3] + return prefix + + def host_is_linux(self): + return self.use_platform().startswith('linux-') + + def host_is_darwin(self): + return self.use_platform().startswith('darwin-') + + def host_is_linux_aarch64(self): + return self.use_platform() == 'linux-aarch64' + + def rm_cmake_cache(self, cache_dir): + for dirpath, dirs, files in os.walk(cache_dir): + if 'CMakeCache.txt' in files: + self.logger().info('rm CMakeCache.txt on %s', cache_dir) + os.remove(os.path.join(dirpath, 'CMakeCache.txt')) + if 'CMakeFiles' in dirs: + self.logger().info('rm CMakeFiles on %s', cache_dir) + self.check_rm_tree(os.path.join(dirpath, 'CMakeFiles')) + + @staticmethod + def find_program(name): + # FIXME: Do we need Windows support here? + return os.popen('which ' + name).read().strip() + + # Base cmake options such as build type that are common across all invocations + def base_cmake_defines(self): + mac_min_version = '10.9' + defines = {} + + defines['CMAKE_BUILD_TYPE'] = 'Release' + defines['LLVM_ENABLE_ASSERTIONS'] = 'OFF' + defines['LLVM_ENABLE_TERMINFO'] = 'OFF' + defines['LLVM_ENABLE_THREADS'] = 'ON' + defines['LLVM_USE_NEWPM'] = 'ON' + defines['LLVM_ENABLE_BINDINGS'] = 'OFF' + defines['CLANG_REPOSITORY_STRING'] = 'llvm-project' + defines['Python3_EXECUTABLE'] = os.path.join(self.get_python_dir(), 'bin', self.build_config.LLDB_PYTHON) + defines['Python3_INCLUDE_DIRS'] = os.path.join(self.get_python_dir(), 'include', + 'python%s' % self.build_config.LLDB_PY_VERSION) + + if self.host_is_darwin(): + defines['CMAKE_OSX_DEPLOYMENT_TARGET'] = mac_min_version + defines['LLDB_INCLUDE_TESTS'] = 'OFF' + defines['LIBCXX_INCLUDE_TESTS'] = 'OFF' + defines['Python3_LIBRARIES'] = os.path.join(self.get_python_dir(), + 'lib', 'libpython%s.dylib' % self.build_config.LLDB_PY_VERSION) + defines['Python3_RPATH'] = os.path.join('@loader_path', '..', 'python3', 'lib') + else: + defines['Python3_LIBRARIES'] = os.path.join(self.get_python_dir(), + 'lib', 'libpython%s.so' % self.build_config.LLDB_PY_VERSION) + defines['Python3_RPATH'] = os.path.join('$ORIGIN', '..', 'python3', 'lib') + + defines['COMPILER_RT_BUILD_XRAY'] = 'OFF' + defines['LIBUNWIND_USE_FRAME_HEADER_CACHE'] = 'ON' + defines['OPENMP_ENABLE_LIBOMPTARGET'] = 'OFF' + defines['LIBOMP_INSTALL_ALIASES'] = 'False' + return defines + + def get_python_dir(self): + platform_path = self.platform_prefix() + python_dir = os.path.join(self.buildtools_path, self.build_config.LLDB_PYTHON, + platform_path, self.build_config.LLDB_PY_DETAILED_VERSION) + return python_dir + + def get_prebuilts_dir(self, name): + prebuilts_dir = os.path.abspath(os.path.join(self.buildtools_path, name)) + return prebuilts_dir + + def rm_build_output(self): + return self.check_rm_tree(self.build_config.OUT_PATH) + + def set_mingw_python_dir(self, mingw_python_dir): + self._mingw_python_dir = mingw_python_dir + + def get_mingw_python_dir(self): + return self._mingw_python_dir + + def get_version(self, fileName, prog): + if os.path.exists(fileName): + with open(fileName, 'r') as file: + lines = file.readlines() + for line in lines: + version_match = prog.match(line) + if version_match: + return version_match.group(1) + return None + + def get_ncurses_version(self): + ncurses_spec = os.path.join(self.build_config.REPOROOT_DIR, 'third_party', 'ncurses', 'ncurses.spec') + prog = re.compile(r'Version:\s*(\S+)') + return self.get_version(ncurses_spec, prog) + + def get_lzma_version(self): + lzma_version_file = os.path.join(self.build_config.REPOROOT_DIR, 'third_party', 'lzma', 'C', '7zVersion.h') + prog = re.compile(r'#define MY_VERSION_NUMBERS "(.*?)"') + return self.get_version(lzma_version_file, prog) + + def merge_install_dir(self, name, platform_triple, *args): + return self.merge_out_path('third_party', name, 'install', platform_triple, *args) + + def merge_build_dir(self, name, platform_triple, *args): + return self.merge_out_path('third_party', name, 'build', platform_triple, *args) + + def merge_ncurses_install_dir(self, platform_triple, *args): + return self.merge_out_path('third_party', 'ncurses', 'install', platform_triple, *args) + + def get_ncurses_dependence_libs(self, platform_triple): + ncurses_libs = ['libncurses', 'libpanel', 'libform'] + if self.use_platform() != platform_triple: + ncurses_libs.append('libtinfo') + return ncurses_libs + + def merge_ncurses_build_dir(self, platform_triple, *args): + return self.merge_out_path('third_party', 'ncurses', 'build', platform_triple, *args) + + def get_libxml2_version(self): + version_file = os.path.join(self.build_config.REPOROOT_DIR, 'third_party', 'libxml2', 'libxml2.spec') + if os.path.isfile(version_file): + pattern = r'Version:\s+(\d+\.\d+\.\d+)' + with open(version_file, 'r') as file: + lines = file.readlines() + VERSION = '' + for line in lines: + if 'Version: ' in line: + VERSION = re.search(pattern, line).group(1) + if VERSION != '': + return VERSION + return None + + return None + + def merge_libxml2_install_dir(self, platform_triple, *args): + return self.merge_out_path('third_party', 'libxml2', 'install', platform_triple, *args) + + def merge_libxml2_build_dir(self, platform_triple, *args): + return self.merge_out_path('third_party', 'libxml2', 'build', platform_triple, *args) + + def get_libedit_version(self): + libedit_spec = os.path.join(self.build_config.REPOROOT_DIR, 'third_party', 'libedit', 'libedit.spec') + if os.path.exists(libedit_spec): + with open(libedit_spec, 'r') as file: + lines = file.readlines() + + prog = re.compile(r'Version:\s*(\S+)') + for line in lines: + version_match = prog.match(line) + if version_match: + return version_match.group(1) + + return None + + def merge_libedit_install_dir(self, platform_triple, *args): + return self.merge_out_path('third_party', 'libedit', 'install', platform_triple, *args) + + def merge_libedit_build_dir(self, platform_triple, *args): + return self.merge_out_path('third_party', 'libedit', 'build', platform_triple, *args) + + def merge_python_install_dir(self, platform_triple, *args): + return self.merge_out_path('third_party', 'python', 'install', platform_triple, *args) + + def merge_python_build_dir(self, platform_triple, *args): + return self.merge_out_path('third_party', 'python', 'build', platform_triple, *args) + + def get_libxml2_source_path(self): + return self.merge_out_path('third_party', 'libxml2', ('libxml2-' + self.build_config.LIBXML2_VERSION)) + +class LlvmCore(BuildUtils): + + def __init__(self, build_config): + super(LlvmCore, self).__init__(build_config) + + def build_llvm(self, + targets, + build_dir, + install_dir, + build_name, + build_target=None, + extra_defines=None, + extra_env=None): + + common_defines = self.base_cmake_defines() + common_defines['CMAKE_INSTALL_PREFIX'] = install_dir + common_defines['LLVM_INSTALL_UTILS'] = 'ON' + common_defines['LLVM_TARGETS_TO_BUILD'] = targets + common_defines['LLVM_BUILD_LLVM_DYLIB'] = 'ON' + + build_number = '' + if re.match(r'\d+-.\D*$', build_name): + build_number, build_name = build_name.split('-', 1) + elif re.match(r'^\d+$', build_name): + build_number = build_name + build_name = '' + elif re.match(r'^\D+$', build_name): + build_name = build_name + else: + raise Exception('Warning! Build name is invalid, because it must not contain digits. ' + 'If you want to pass digit version, please, use follow template: {NUMBER}-{SUFFIX} ' + 'or just pass number. Otherwise unit tests will fail with assertions') + + common_defines['CLANG_VENDOR'] = 'OHOS (%s) ' % build_name + common_defines['CLANG_VENDOR_BUILD_VERSION'] = build_number + common_defines.update(extra_defines) + + env = dict(self.build_config.ORIG_ENV) + if extra_env is not None: + env.update(extra_env) + + install = not self.build_config.build_only + llvm_project_path = os.path.abspath(os.path.join(self.build_config.LLVM_PROJECT_DIR, 'llvm')) + + self.invoke_cmake(llvm_project_path, + build_dir, + common_defines, + env=env) + + # First of all build compiler-rt because it's needed to be built before libunwind and etc. + if not self.build_config.build_only and not 'windows-x86_64' in build_dir: + self.invoke_ninja(out_path=build_dir, + env=env, + target=["compiler-rt"], + install=install) + + self.invoke_ninja(out_path=build_dir, + env=env, + target=build_target, + install=install) + if not install: + self.llvm_manual_install(build_dir, install_dir) + + def llvm_manual_install(self, build_dir, install_dir): + target_dirs = ["bin", "include", "lib", "libexec", "share"] + for target_dir in target_dirs: + target_dir = f"{build_dir}/{target_dir}" + if not os.path.exists(target_dir): + continue + for (src_path, dirs, files) in os.walk(target_dir): + dst_path = src_path.replace(build_dir, install_dir) + for file in files: + src = os.path.join(src_path, file) + dst = os.path.join(dst_path, file) + if file.endswith(".cpp.o") or file == "cmake_install.cmake": + continue + if os.path.exists(dst) and os.stat(src) == os.stat(dst): + continue + os.makedirs(dst_path, exist_ok=True) + shutil.copy2(src, dst) + + def llvm_compile_darwin_defines(self, llvm_defines): + if self.host_is_darwin(): + llvm_defines['LIBUNWIND_ENABLE_SHARED'] = 'OFF' + llvm_defines['LLDB_NO_DEBUGSERVER'] = 'ON' + llvm_defines['COMPILER_RT_BUILD_LIBFUZZER'] = 'OFF' + llvm_defines['LLVM_BUILD_EXTERNAL_COMPILER_RT'] = 'ON' + llvm_defines['LLVM_ENABLE_ZSTD'] = 'OFF' + llvm_defines['LLDB_PYTHON_EXT_SUFFIX'] = '.dylib' + if self.build_config.build_ncurses: + ncurses_libs = ';'.join([ + self.merge_ncurses_install_dir( + self.use_platform(), + 'lib', + f'{lib_name}.6.dylib') for lib_name in self.get_ncurses_dependence_libs(self.use_platform())]) + llvm_defines['CURSES_LIBRARIES'] = ncurses_libs + llvm_defines['PANEL_LIBRARIES'] = ncurses_libs + + if self.build_config.enable_lzma_7zip: + llvm_defines['LIBLZMA_LIBRARIES'] = self.merge_install_dir('lzma', self.use_platform(), 'lib', f'liblzma.{self.build_config.LZMA_VERSION}.dylib') + + if self.build_config.build_libedit: + llvm_defines['LibEdit_LIBRARIES'] = \ + self.merge_libedit_install_dir(self.use_platform(), 'lib', 'libedit.0.dylib') + + if self.build_config.build_libxml2: + llvm_defines['LIBXML2_LIBRARIES'] = \ + self.merge_libxml2_install_dir(self.use_platform(), 'lib', f'libxml2.{self.build_config.LIBXML2_VERSION}.dylib') + + def llvm_compile_linux_defines(self, + llvm_defines, + debug_build=False, + no_lto=False, + build_instrumented=False): + if self.host_is_linux(): + llvm_defines['LLVM_ENABLE_LLD'] = 'ON' + llvm_defines['COMPILER_RT_BUILD_LIBFUZZER'] = 'ON' + llvm_defines['LIBCXX_ENABLE_STATIC_ABI_LIBRARY'] = 'ON' + llvm_defines['LIBCXX_ENABLE_ABI_LINKER_SCRIPT'] = 'OFF' + llvm_defines['LIBCXX_USE_COMPILER_RT'] = 'ON' + llvm_defines['LIBCXXABI_USE_LLVM_UNWINDER'] = 'ON' + llvm_defines['LIBCXXABI_ENABLE_STATIC_UNWINDER'] = 'ON' + llvm_defines['LIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY'] = 'YES' + llvm_defines['LIBCXXABI_USE_COMPILER_RT'] = 'ON' + llvm_defines['COMPILER_RT_USE_LLVM_UNWINDER'] = 'ON' + llvm_defines['COMPILER_RT_ENABLE_STATIC_UNWINDER'] = 'ON' + llvm_defines['COMPILER_RT_USE_BUILTINS_LIBRARY'] = 'ON' + llvm_defines['COMPILER_RT_BUILD_ORC'] = 'OFF' + llvm_defines['LIBUNWIND_USE_COMPILER_RT'] = 'ON' + llvm_defines['LLVM_BINUTILS_INCDIR'] = '/usr/include' + llvm_defines['LLDB_PYTHON_EXT_SUFFIX'] = '.so' + ncurses_version = self.get_ncurses_version() + if self.build_config.build_ncurses and ncurses_version is not None: + ncurses_libs = ";".join( + [ + self.merge_ncurses_install_dir( + self.use_platform(), + "lib", + f"{lib_name}.so.{ncurses_version}", + ) + for lib_name in self.get_ncurses_dependence_libs( + self.use_platform() + ) + ] + ) + llvm_defines['CURSES_LIBRARIES'] = ncurses_libs + llvm_defines['PANEL_LIBRARIES'] = ncurses_libs + + if self.build_config.enable_lzma_7zip: + llvm_defines['LIBLZMA_LIBRARIES'] = self.merge_install_dir('lzma', self.use_platform(), 'lib', 'liblzma.so') + + if self.build_config.build_libedit: + llvm_defines['LibEdit_LIBRARIES'] = \ + self.merge_libedit_install_dir(self.use_platform(), 'lib', 'libedit.so.0.0.68') + + if not build_instrumented and not no_lto and not debug_build: + llvm_defines['LLVM_ENABLE_LTO'] = 'Thin' + + if self.build_config.build_libxml2: + llvm_defines['LIBXML2_LIBRARY'] = \ + self.merge_libxml2_install_dir(self.use_platform(), 'lib', f'libxml2.so.{self.build_config.LIBXML2_VERSION}') + + def llvm_compile_llvm_defines(self, llvm_defines, llvm_root, cflags, ldflags): + llvm_defines['LLVM_ENABLE_PROJECTS'] = ';'.join(self.build_config.host_projects) + llvm_defines['LLVM_ENABLE_RUNTIMES'] = ';'.join(self.build_config.host_runtimes) + llvm_defines['LLVM_ENABLE_BINDINGS'] = 'OFF' + llvm_defines['CMAKE_C_COMPILER'] = os.path.join(llvm_root, 'bin', 'clang') + llvm_defines['CMAKE_CXX_COMPILER'] = os.path.join(llvm_root, 'bin', 'clang++') + llvm_defines['CMAKE_AR'] = os.path.join(llvm_root, 'bin', 'llvm-ar') + llvm_defines['CMAKE_RANLIB'] = os.path.join(llvm_root, 'bin', 'llvm-ranlib') + llvm_defines['LLVM_ENABLE_LIBCXX'] = 'ON' + llvm_defines['SANITIZER_ALLOW_CXXABI'] = 'OFF' + llvm_defines['LIBOMP_ENABLE_SHARED'] = 'FALSE' + llvm_defines['OPENMP_TEST_FLAGS'] = '-Wl,-ldl -fuse-ld=lld' + llvm_defines['CLANG_BUILD_EXAMPLES'] = 'OFF' + llvm_defines['LLDB_ENABLE_LIBEDIT'] = 'OFF' + llvm_defines['COMPILER_RT_BUILD_SANITIZERS'] = 'OFF' + llvm_defines['COMPILER_RT_BUILD_MEMPROF'] = 'OFF' + llvm_defines['CMAKE_ASM_FLAGS'] = cflags + llvm_defines['CMAKE_C_FLAGS'] = cflags + llvm_defines['CMAKE_CXX_FLAGS'] = cflags if self.host_is_linux_aarch64() else '%s -stdlib=libc++' % cflags + llvm_defines['CMAKE_EXE_LINKER_FLAGS'] = ldflags + llvm_defines['CMAKE_SHARED_LINKER_FLAGS'] = ldflags + llvm_defines['CMAKE_MODULE_LINKER_FLAGS'] = ldflags + llvm_defines['CMAKE_POSITION_INDEPENDENT_CODE'] = 'ON' + llvm_defines['LLDB_ENABLE_PYTHON'] = 'ON' + llvm_defines['LLDB_EMBED_PYTHON_HOME'] = 'ON' + llvm_defines['LLDB_PYTHON_HOME'] = os.path.join('..', self.build_config.LLDB_PYTHON) + llvm_defines['LLDB_PYTHON_RELATIVE_PATH'] = os.path.join('bin', 'python', 'lib', 'python%s' + % self.build_config.LLDB_PY_VERSION) + llvm_defines['LLDB_PYTHON_EXE_RELATIVE_PATH'] = os.path.join('bin', self.build_config.LLDB_PYTHON) + llvm_defines['SWIG_EXECUTABLE'] = self.find_program('swig') + llvm_defines['LLDB_ENABLE_CURSES'] = 'OFF' + + #Control the security compile flags which used by LLVM_ENABLE_RUNTIMES + if not self.host_is_darwin(): + llvm_defines['SECURITY_LINKER_FLAGS_FOR_RUNTIMES'] = ' -Wl,-z,relro,-z,now -Wl,-z,noexecstack' + llvm_defines['SECURITY_COMPILE_FLAGS_FOR_RUNTIMES'] = '-fstack-protector-strong' + + if self.build_config.build_ncurses and self.get_ncurses_version() is not None: + llvm_defines['LLDB_ENABLE_CURSES'] = 'ON' + llvm_defines['CURSES_INCLUDE_DIRS'] = self.merge_ncurses_install_dir(self.use_platform(), 'include') + + if self.build_config.enable_lzma_7zip: + llvm_defines['LLDB_ENABLE_LZMA'] = 'ON' + llvm_defines['LLDB_ENABLE_LZMA_7ZIP'] = 'ON' + llvm_defines['LIBLZMA_INCLUDE_DIRS'] = self.merge_install_dir('lzma', self.use_platform(), 'include') + + if self.build_config.build_libedit: + llvm_defines['LLDB_ENABLE_LIBEDIT'] = 'ON' + llvm_defines['LibEdit_INCLUDE_DIRS'] = self.merge_libedit_install_dir(self.use_platform(), 'include') + + if self.build_config.build_libxml2: + llvm_defines['LLDB_ENABLE_LIBXML2'] = 'ON' + llvm_defines['LIBXML2_INCLUDE_DIR'] = self.merge_libxml2_install_dir(self.use_platform(), 'include', 'libxml2') + + if self.build_config.enable_monitoring: + llvm_defines['LLDB_ENABLE_PERFORMANCE'] = 'ON' + + def llvm_build_install_xvm_dylib_so(self, build_name, + out_dir, + build_target, + llvm_extra_env, + debug_build): + llvm_path = self.merge_out_path('llvm_make') + llvm_path_dylib_so = self.merge_out_path('llvm_make_dylib_so') + install_dir_dylib_so = self.merge_out_path('llvm-install-dylib-so') + llvm_defines_dylib_so = {} + llvm_defines_dylib_so['LLVM_SPLIT_LLVM_DYLIB_TARGETS'] = 'ON' + if debug_build: + llvm_defines_dylib_so['CMAKE_BUILD_TYPE'] = 'Debug' + self.build_llvm(targets='XVM', + build_dir=llvm_path_dylib_so, + install_dir=install_dir_dylib_so, + build_name=build_name, + build_target=build_target, + extra_defines=llvm_defines_dylib_so, + extra_env=llvm_extra_env) + build_lib_xvm_dylib_so = os.path.join(llvm_path_dylib_so, 'lib', 'LLVMXVMTarget.so') + build_lib_folder = os.path.join(llvm_path, 'lib') + if os.path.exists(build_lib_xvm_dylib_so) and os.path.exists(build_lib_folder): + self.check_copy_file(build_lib_xvm_dylib_so, build_lib_folder) + else: + self.logger().error('Failed to copy ' + build_lib_xvm_dylib_so + ' to ' + build_lib_folder) + + build_lib_install_folder = os.path.join(out_dir, 'lib') + if os.path.exists(build_lib_xvm_dylib_so) and os.path.exists(build_lib_install_folder): + self.check_copy_file(build_lib_xvm_dylib_so, build_lib_install_folder) + else: + self.logger().error('Failed to copy ' + build_lib_xvm_dylib_so + ' to ' + build_lib_install_folder) + if not debug_build: + self.check_rm_tree(llvm_path_dylib_so) + self.check_rm_tree(install_dir_dylib_so) + + def llvm_compile(self, + build_name, + out_dir, + debug_build=False, + no_lto=False, + build_instrumented=False, + build_target=None, + xunit_xml_output=None, + build_xvm=False): + + llvm_clang_install = os.path.abspath(os.path.join(self.buildtools_path, 'clang/ohos', self.use_platform(), + 'clang-%s' % self.build_config.CLANG_VERSION)) + llvm_path = self.merge_out_path('llvm_make') + llvm_profdata = os.path.join(llvm_clang_install, 'bin', 'llvm-profdata') + + if self.host_is_darwin(): + ldflags = '' + else: + ldflags = '-fuse-ld=lld' + ldflags = '%s -L%s' % (ldflags, os.path.join(llvm_clang_install, 'lib')) + + llvm_extra_env = {} + llvm_extra_env['LD_LIBRARY_PATH'] = os.path.join(llvm_clang_install, 'lib') + + llvm_defines = {} + + self.llvm_compile_darwin_defines(llvm_defines) + self.llvm_compile_linux_defines(llvm_defines, debug_build, no_lto, build_instrumented) + + if self.host_is_linux(): + if not self.host_is_linux_aarch64(): + ldflags += ' -l:libunwind.a -l:libc++abi.a --rtlib=compiler-rt -stdlib=libc++' + ldflags += ' -static-libstdc++' + + if xunit_xml_output: + llvm_defines['LLVM_LIT_ARGS'] = "--xunit-xml-output={} -sv".format(xunit_xml_output) + + if self.build_config.enable_assertions: + llvm_defines['LLVM_ENABLE_ASSERTIONS'] = 'ON' + + if debug_build: + llvm_defines['CMAKE_BUILD_TYPE'] = 'Debug' + + if build_instrumented: + llvm_defines['LLVM_BUILD_INSTRUMENTED'] = 'ON' + llvm_defines['LLVM_PROFDATA'] = llvm_profdata + + resource_dir = os.path.join(llvm_clang_install, 'lib', 'clang', self.build_config.CLANG_VERSION, + 'lib', 'x86_64-unknown-linux-gnu', 'libclang_rt.profile.a') + ldflags += ' %s' % resource_dir + + cflags = '-fstack-protector-strong' + if not self.host_is_darwin(): + ldflags += ' -Wl,-z,relro,-z,now -pie -Wl,-z,noexecstack' + if self.build_config.strip: + ldflags += ' -s' + + self.llvm_compile_llvm_defines(llvm_defines, llvm_clang_install, cflags, ldflags) + + linker_path = os.path.join(llvm_clang_install, 'bin', 'ld.lld') + llvm_defines['CMAKE_LINKER'] = linker_path + + if build_xvm: + target_list = self.build_config.TARGETS + ";XVM" + else: + target_list = self.build_config.TARGETS + self.build_llvm(targets=target_list, + build_dir=llvm_path, + install_dir=out_dir, + build_name=build_name, + build_target=build_target, + extra_defines=llvm_defines, + extra_env=llvm_extra_env) + if build_xvm: + self.llvm_build_install_xvm_dylib_so(build_name, + out_dir, + build_target, + llvm_extra_env, + debug_build) + + def llvm_compile_windows_defines(self, + windows_defines, + cc, + cxx, + windows_sysroot): + + win_projects = list(self.build_config.host_projects) + if 'openmp' in win_projects: + # Currently we have build problems with + # windows openmp target (lack of ml.exe) + win_projects.remove('openmp') + + if self.build_config.enable_assertions: + + windows_defines['LLVM_ENABLE_ASSERTIONS'] = 'ON' + + mingw_python_dir = self.get_mingw_python_dir() + if mingw_python_dir: + py_dir = mingw_python_dir + py_lib_dir = os.path.join(py_dir, 'lib') + py_inc_dir = os.path.join(py_dir, 'include') + else: + raise Exception('Invalid Python information, please check if the Python tool is valid') + windows_defines['LLDB_RELOCATABLE_PYTHON'] = 'OFF' + windows_defines['LLDB_ENABLE_PYTHON'] = 'ON' + windows_defines['LLDB_PYTHON_HOME'] = os.path.join('..', self.build_config.LLDB_PYTHON) + windows_defines['LLDB_PYTHON_RELATIVE_PATH'] = \ + 'bin/python/lib/python%s' % (self.build_config.LLDB_PY_VERSION) + windows_defines['LLDB_PYTHON_EXE_RELATIVE_PATH'] = os.path.join('bin', self.build_config.LLDB_PYTHON) + windows_defines['LLDB_PYTHON_EXT_SUFFIX'] = '.pys' + windows_defines['Python3_INCLUDE_DIRS'] = os.path.join(py_inc_dir, + 'python%s' % self.build_config.LLDB_PY_VERSION) + windows_defines['Python3_LIBRARIES'] = os.path.join(py_lib_dir, 'libpython%s.dll.a' + % self.build_config.LLDB_PY_VERSION) + windows_defines['Python3_EXECUTABLE'] = os.path.join(self.get_python_dir(), 'bin', + self.build_config.LLDB_PYTHON) + windows_defines['SWIG_EXECUTABLE'] = self.find_program('swig') + + windows_defines['CMAKE_C_COMPILER'] = cc + windows_defines['CMAKE_CXX_COMPILER'] = cxx + windows_defines['CMAKE_SYSTEM_NAME'] = 'Windows' + windows_defines['CMAKE_BUILD_TYPE'] = 'Debug' if self.build_config.debug else 'Release' + windows_defines['LLVM_BUILD_RUNTIME'] = 'OFF' + windows_defines['LLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD'] = 'ON' + windows_defines['LLVM_TOOL_OPENMP_BUILD'] = 'OFF' + windows_defines['LLVM_INCLUDE_TESTS'] = 'OFF' + windows_defines['LLVM_ENABLE_LIBCXX'] = 'ON' + windows_defines['LLVM_ENABLE_PROJECTS'] = ';'.join(win_projects) + windows_defines['LLVM_BUILD_LLVM_DYLIB'] = 'OFF' + windows_defines['CLANG_BUILD_EXAMPLES'] = 'OFF' + windows_defines['CMAKE_SYSROOT'] = windows_sysroot + windows_defines['CMAKE_FIND_ROOT_PATH_MODE_INCLUDE'] = 'ONLY' + windows_defines['CMAKE_FIND_ROOT_PATH_MODE_LIBRARY'] = 'ONLY' + windows_defines['CMAKE_FIND_ROOT_PATH_MODE_PACKAGE'] = 'ONLY' + windows_defines['CMAKE_FIND_ROOT_PATH_MODE_PROGRAM'] = 'NEVER' + windows_defines['LLDB_ENABLE_LIBEDIT'] = 'OFF' + windows_defines['LLDB_RELOCATABLE_PYTHON'] = 'OFF' + + if self.build_config.build_libxml2: + windows_defines['LLDB_ENABLE_LIBXML2'] = 'ON' + windows_defines['LIBXML2_INCLUDE_DIR'] = self.merge_libxml2_install_dir('windows-x86_64', 'include', 'libxml2') + windows_defines['LIBXML2_LIBRARY'] = self.merge_libxml2_install_dir('windows-x86_64', 'lib', 'libxml2.dll.a') + + if self.build_config.enable_monitoring: + windows_defines['LLDB_ENABLE_PERFORMANCE'] = 'ON' + + if self.build_config.enable_lzma_7zip: + windows_defines['LLDB_ENABLE_LZMA'] = 'ON' + windows_defines['LLDB_ENABLE_LZMA_7ZIP'] = 'ON' + windows_defines['LIBLZMA_INCLUDE_DIRS'] = self.merge_install_dir('lzma', 'windows-x86_64', 'include') + windows_defines['LIBLZMA_LIBRARIES'] = self.merge_install_dir('lzma', 'windows-x86_64', 'lib', 'liblzma.dll.a') + + def llvm_compile_windows_flags(self, + windows_defines, + windowstool_path, + windows64_install, + ldflags, + cflags): + + windows_defines['CROSS_TOOLCHAIN_FLAGS_NATIVE'] = ';'.join([ + '-DCMAKE_PREFIX_PATH=%s' % self.CMAKE_BIN_DIR, + '-DCOMPILER_RT_BUILD_LIBFUZZER=OFF', + '-DLLVM_ENABLE_LIBCXX=ON', + '-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE', + '-DCMAKE_INSTALL_RPATH=%s' % os.path.join(windowstool_path, 'lib')] + ) + + ldflag = ['-fuse-ld=lld', + '-Wl,--gc-sections', + '-stdlib=libc++', + '--rtlib=compiler-rt', + '-lunwind', + '-Wl,--dynamicbase', + '-Wl,--nxcompat', + '-lucrt', + '-lucrtbase', + '-L', + os.path.join(windows64_install, 'lib'), + '-Wl,--high-entropy-va'] + ldflags.extend(ldflag) + + cflag = ['-fstack-protector-strong', + '-stdlib=libc++', + '--target=x86_64-pc-windows-gnu', + '-fdata-sections', + '-D_LARGEFILE_SOURCE', + '-D_FILE_OFFSET_BITS=64', + '-D_WIN32_WINNT=0x0600', + '-DWINVER=0x0600', + '-D__MSVCRT_VERSION__=0x1400', + '-DMS_WIN64'] + cflags.extend(cflag) + + def llvm_compile_windows_cmake(self, + cflags, + cxxflags, + ldflags, + windows_defines): + + zlib_path = self.merge_out_path(self.buildtools_path, 'clang', 'host', 'windows-x86', 'toolchain-prebuilts', + 'zlib') + zlib_inc = os.path.join(zlib_path, 'include') + zlib_lib = os.path.join(zlib_path, 'lib') + + cflags.extend(['-I', zlib_inc]) + cxxflags.extend(['-I', zlib_inc]) + ldflags.extend(['-L', zlib_lib]) + + windows_defines['CMAKE_ASM_FLAGS'] = ' '.join(cflags) + windows_defines['CMAKE_C_FLAGS'] = ' '.join(cflags) + windows_defines['CMAKE_CXX_FLAGS'] = ' '.join(cxxflags) + windows_defines['CMAKE_EXE_LINKER_FLAGS'] = ' '.join(ldflags) + windows_defines['CMAKE_SHARED_LINKER_FLAGS'] = ' '.join(ldflags) + windows_defines['CMAKE_MODULE_LINKER_FLAGS'] = ' '.join(ldflags) + + def llvm_compile_for_windows(self, + targets, + enable_assertions, + build_name): + + self.logger().info('Building llvm for windows.') + + build_dir = self.merge_out_path("windows-x86_64") + windowstool_path = self.merge_out_path('llvm-install') + windows64_install = self.merge_out_path('windows-x86_64-install') + windows_sysroot = self.merge_out_path('mingw', self.build_config.MINGW_TRIPLE) + + self.check_create_dir(build_dir) + + # Write a NATIVE.cmake in windows_path that contains the compilers used + # to build native tools such as llvm-tblgen and llvm-config. This is + # used below via the CMake variable CROSS_TOOLCHAIN_FLAGS_NATIVE. + cc = os.path.join(windowstool_path, 'bin', 'clang') + cxx = os.path.join(windowstool_path, 'bin', 'clang++') + + # Extra cmake defines to use while building for Windows + windows_defines = {} + self.llvm_compile_windows_defines(windows_defines, cc, cxx, windows_sysroot) + + # Set CMake path, toolchain file for native compilation (to build tablegen + # etc). Also disable libfuzzer build during native compilation. + + ldflags = [] + cflags = [] + + self.llvm_compile_windows_flags(windows_defines, + windowstool_path, windows64_install, ldflags, cflags) + + cxxflags = list(cflags) + + windows_extra_env = dict() + + cxxflags.append('-fuse-cxa-atexit') + cxxflags.extend(('-I', os.path.join(windows64_install, 'include', 'c++', 'v1'))) + + self.llvm_compile_windows_cmake(cflags, cxxflags, ldflags, windows_defines) + + self.build_llvm(self.build_config.TARGETS, + build_dir, + windows64_install, + build_name, + extra_defines=windows_defines, + extra_env=windows_extra_env) + + +class SysrootComposer(BuildUtils): + + def __init__(self, build_config): + super(SysrootComposer, self).__init__(build_config) + + def setup_cmake_platform(self, llvm_install): + + # OHOS.cmake already exsit on cmake prebuilts, + # but it didn't contain these two lines, so we still need OHOS.cmake. + ohos_cmake = 'OHOS.cmake' + dst_dir = self.merge_out_path( + self.buildtools_path, 'cmake/%s/share/cmake-3.28/Modules/Platform' % self.platform_prefix()) + src_file = '%s/%s' % (self.build_config.LLVM_BUILD_DIR, ohos_cmake) + if os.path.exists(os.path.join(dst_dir, ohos_cmake)): + os.remove(os.path.join(dst_dir, ohos_cmake)) + shutil.copy2(src_file, dst_dir) + + def run_hb_build(self, product_name, target_cpu, target_name, gn_args=''): + self.logger().info('run product-name %s target-cpu %s target-name %s gn-args %s', + product_name, target_cpu, target_name, gn_args) + hb_build_py = os.path.join( + self.build_config.REPOROOT_DIR, 'build', 'hb', 'main.py') + python_execute_dir = os.path.join( + self.get_python_dir(), 'bin', self.build_config.LLDB_PYTHON) + llvm_gn_args = 'is_llvm_build=true startup_init_with_param_base=true use_thin_lto=false' + subprocess.run([python_execute_dir, hb_build_py, 'build', '--product-name', product_name, '--target-cpu', + target_cpu, '--build-target', target_name, '--gn-args', + gn_args, llvm_gn_args, '--deps-guard=false'], + shell=False, stdout=subprocess.PIPE, cwd=self.build_config.REPOROOT_DIR) + + def build_musl_libs(self, product_name, target_cpu, target_name, ohos_lib_dir, sysroot_lib_dir, + ld_musl_lib, gn_args=''): + if (self.build_config.adlt_debug_build): + gn_args = f"is_debug=true ohos_extra_cflags=-O0 {gn_args}" + + self.run_hb_build(product_name, target_cpu, target_name, gn_args) + libc_name = 'libc.so' + crtplus_lib = self.merge_out_path('llvm_build', 'obj', 'out', 'llvm_build', 'obj', 'third_party', 'musl', + 'intermidiates', 'linux', 'musl_src_ported', 'crt', 'soft_musl_crt', 'crtplus.o') + self.check_copy_tree(ohos_lib_dir, sysroot_lib_dir) + if product_name == 'llvm_build': + self.check_copy_file(crtplus_lib, sysroot_lib_dir) + os.symlink(libc_name, ld_musl_lib) + + def build_musl_header(self, arch, target): + product_name = 'llvm_build' + target_name = 'musl_headers' + target_cpu = arch + if arch == 'riscv': + target_cpu = 'riscv64' + ohos_header_dir = self.merge_out_path( + 'llvm_build', 'obj', 'third_party', 'musl', 'usr', 'include', target) + sysroot_header_dir = self.merge_out_path( + 'sysroot', target, 'usr', 'include') + + if target == self.liteos_triple('arm'): + product_name = 'llvm_build_lite' + target_name = 'build_sysroot_header' + ohos_header_dir = self.merge_out_path( + 'llvm_build', product_name, 'sysroot', 'usr', 'include', target) + + os.chdir(self.build_config.LLVM_BUILD_DIR) + self.logger().info('run product-name %s target-name %s', product_name, target_name) + self.run_hb_build(product_name, target_cpu, target_name) + self.check_copy_tree(ohos_header_dir, sysroot_header_dir) + + def build_musl(self, arch, target): + product_name = 'llvm_build' + target_name = 'soft_musl_libs' + gn_args = '' + if arch == 'arm64': + target_cpu = 'arm64' + ld_arch = 'aarch64' + elif arch == 'riscv': + target_cpu = 'riscv64' + ld_arch = 'riscv64' + else: + target_cpu = arch + ld_arch = arch + ohos_lib_dir = self.merge_out_path('llvm_build', 'obj', 'third_party', 'musl', 'usr', 'lib', target) + sysroot_lib_dir = self.merge_out_path('sysroot', target, 'usr', 'lib') + + os.chdir(self.build_config.LLVM_BUILD_DIR) + + if target == self.liteos_triple('arm'): + product_name = 'llvm_build_lite' + target_name = 'sysroot_lite' + a7_products = ["", "a7_soft", "a7_softfp_neon-vfpv4", "a7_hard_neon-vfpv4"] + + for a7_key in a7_products: + gn_args = 'musl_lite_multi=' + a7_key + ohos_lib_dir = self.merge_out_path('llvm_build', product_name, 'sysroot', 'usr', 'lib', target, a7_key) + sysroot_lib_dir = self.merge_out_path('sysroot', target, 'usr', 'lib', a7_key) + if a7_key == "a7_hard_neon-vfpv4": + ld_musl_lib = os.path.join(sysroot_lib_dir, 'ld-musl-armhf.so.1') + else: + ld_musl_lib = os.path.join(sysroot_lib_dir, 'ld-musl-arm.so.1') + self.build_musl_libs(product_name, target_cpu, target_name, ohos_lib_dir, + sysroot_lib_dir, ld_musl_lib, gn_args) + return + + ld_musl_lib = os.path.join(sysroot_lib_dir, 'ld-musl-{}.so.1'.format(ld_arch)) + self.build_musl_libs(product_name, target_cpu, target_name, ohos_lib_dir, + sysroot_lib_dir, ld_musl_lib) + + if target_cpu == 'arm': + a7_args = { + "a7_soft": "arm_float_abi=soft board_cpu=cortex-a7", + "a7_softfp_neon-vfpv4": "arm_fpu=neon-vfpv4 arm_float_abi=softfp board_cpu=cortex-a7", + "a7_hard_neon-vfpv4": "arm_fpu=neon-vfpv4 arm_float_abi=hard board_cpu=cortex-a7" + } + + for a7_key in a7_args.keys(): + target_triple_arg = 'musl_target_multilib='+a7_key + gn_args = a7_args[a7_key] + ' ' + target_triple_arg + multi_lib_dir = os.path.join(ohos_lib_dir, a7_key) + sysroot_multi_lib_dir = os.path.join(sysroot_lib_dir, a7_key) + if a7_key == "a7_hard_neon-vfpv4": + ld_musl_lib = os.path.join(sysroot_multi_lib_dir, 'ld-musl-armhf.so.1') + else: + ld_musl_lib = os.path.join(sysroot_multi_lib_dir, 'ld-musl-arm.so.1') + self.logger().info('run a7 product-name %s target-name %s', product_name, target_name) + self.build_musl_libs(product_name, target_cpu, target_name, multi_lib_dir, + sysroot_multi_lib_dir, ld_musl_lib, gn_args) + + if target_cpu == 'mipsel': + gn_args += ' musl_is_legacy=true musl_target_multilib=nanlegacy' + multi_lib_dir = os.path.join(ohos_lib_dir, 'nanlegacy') + sysroot_multi_lib_dir = os.path.join(sysroot_lib_dir, 'nanlegacy') + ld_musl_lib = os.path.join(sysroot_multi_lib_dir, 'ld-musl-{}.so.1'.format(ld_arch)) + self.build_musl_libs(product_name, target_cpu, target_name, multi_lib_dir, + sysroot_multi_lib_dir, ld_musl_lib, gn_args) + + + def install_linux_headers(self, arch, target): + dir_suffix = arch + if arch == 'x86_64': + dir_suffix = 'x86' + elif arch == 'mipsel': + dir_suffix = 'mips' + elif arch == 'loongarch64': + dir_suffix = 'loongarch' + linux_kernel_dir = os.path.join('kernel', 'linux', 'patches', 'linux-5.10') + linux_kernel_path = os.path.join(self.build_config.OUT_PATH, '..', linux_kernel_dir) + ohosmusl_sysroot_dst = self.merge_out_path('sysroot', target, 'usr') + headers_tmp_dir = os.path.join(linux_kernel_path, 'prebuilts', 'usr', 'include') + self.check_copy_tree(os.path.join(headers_tmp_dir, 'linux'), + os.path.join(ohosmusl_sysroot_dst, 'include/linux')) + self.check_copy_tree(os.path.join(headers_tmp_dir, 'asm-%s' % dir_suffix,'asm'), + os.path.join(ohosmusl_sysroot_dst, 'include', 'asm')) + self.check_copy_tree(os.path.join(headers_tmp_dir, 'asm-generic'), + os.path.join(ohosmusl_sysroot_dst, 'include/asm-generic')) + + def copy_libz_to_sysroot(self, libz_path, llvm_triple): + # Install to sysroot + dest_usr = self.merge_out_path('sysroot', llvm_triple, 'usr') + dest_usr_include = os.path.join(dest_usr, 'include') + + # Copy over usr/include. + zlib_h = self.merge_out_path('../third_party/zlib', 'zlib.h') + self.check_copy_file(zlib_h, dest_usr_include) + + zconf_h = os.path.join(libz_path, 'zconf.h') + self.check_copy_file(zconf_h, dest_usr_include) + + # Copy over usr/lib. + dest_usr_lib = os.path.join(dest_usr, 'lib') + static_zlib = os.path.join(libz_path, 'libz.a') + self.check_copy_file(static_zlib, dest_usr_lib) + + +class LlvmLibs(BuildUtils): + + def __init__(self, build_config, sysroot_composer, llvm_package): + super(LlvmLibs, self).__init__(build_config) + self.sysroot_composer = sysroot_composer + self.llvm_package = llvm_package + + def build_crt_libs(self, configs, llvm_install): + for (arch, target) in configs: + self.sysroot_composer.build_musl_header(arch, target) + if target.endswith(self.build_config.OPENHOS_SFX): + self.sysroot_composer.install_linux_headers(arch, target) + if self.build_config.build_libs_with_hb: + self.run_hb_build_libs('crts_first_time') + else: + for (arch, target) in configs: + self.build_libs(llvm_install, + target, + precompilation=True) + for (arch, target) in configs: + self.sysroot_composer.build_musl(arch, target) + + def build_libs_defines(self, + llvm_triple, + defines, + cc, + cxx, + ar, + llvm_config, + ldflags, + cflags, + extra_flags): + + sysroot = self.merge_out_path('sysroot') + + defines['CMAKE_C_COMPILER'] = cc + defines['CMAKE_CXX_COMPILER'] = cxx + defines['CMAKE_AR'] = ar + defines['LLVM_CONFIG_PATH'] = llvm_config + defines['CMAKE_SYSROOT'] = sysroot + defines['CMAKE_FIND_ROOT_PATH_MODE_INCLUDE'] = 'ONLY' + defines['CMAKE_FIND_ROOT_PATH_MODE_LIBRARY'] = 'ONLY' + defines['CMAKE_FIND_ROOT_PATH_MODE_PACKAGE'] = 'ONLY' + defines['CMAKE_FIND_ROOT_PATH_MODE_PROGRAM'] = 'NEVER' + defines['CMAKE_POSITION_INDEPENDENT_CODE'] = 'ON' + + ldflag = [ + '-fuse-ld=lld', + '-Wl,--gc-sections', + '-Wl,--build-id=sha1', + '--rtlib=compiler-rt', + '-stdlib=libc++', ] + + if not self.host_is_darwin(): + ldflag.append('-Wl,-z,relro,-z,now -pie') + if self.build_config.strip and not self.build_config.no_strip_libs: + ldflag.append('-s') + + ldflags.extend(ldflag) + + cflag = [ + '-fstack-protector-strong', + '--target=%s' % llvm_triple, + '-ffunction-sections', + '-fdata-sections', + extra_flags, ] + if self.build_config.build_with_debug_info: + cflag.append('-g') + + cflags.extend(cflag) + + def run_hb_build_libs(self, libs_name): + gn_args = 'build_libs_flags={} llvm_lib={}'.format(self.build_config.build_libs_flags, libs_name) + self.sysroot_composer.run_hb_build('llvm_build', 'arm', 'build_libs', gn_args) + + def libs_argument(self, llvm_install): + configs_list = [ + #('arm', self.liteos_triple('arm'), '-march=armv7-a -mfloat-abi=soft', ''), + #('arm', self.liteos_triple('arm'), '-march=armv7-a -mcpu=cortex-a7 -mfloat-abi=soft', 'a7_soft'), + #('arm', self.liteos_triple('arm'), + # '-march=armv7-a -mcpu=cortex-a7 -mfloat-abi=softfp -mfpu=neon-vfpv4', 'a7_softfp_neon-vfpv4'), + #('arm', self.liteos_triple('arm'), + # '-march=armv7-a -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4', 'a7_hard_neon-vfpv4'), + + #('arm', self.open_ohos_triple('arm'), '-march=armv7-a -mfloat-abi=soft', ''), + #('arm', self.open_ohos_triple('arm'), '-march=armv7-a -mcpu=cortex-a7 -mfloat-abi=soft', 'a7_soft'), + #('arm', self.open_ohos_triple('arm'), + # '-march=armv7-a -mcpu=cortex-a7 -mfloat-abi=softfp -mfpu=neon-vfpv4', 'a7_softfp_neon-vfpv4'), + #('arm', self.open_ohos_triple('arm'), + # '-march=armv7-a -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4', 'a7_hard_neon-vfpv4'), + ('aarch64', self.open_ohos_triple('aarch64'), '', ''), + #('riscv64', self.open_ohos_triple('riscv64'), '', ''), + #('mipsel', self.open_ohos_triple('mipsel'), '', ''), + #('mipsel', self.open_ohos_triple('mipsel'), '-mnan=legacy', 'nanlegacy'), + ('x86_64', self.open_ohos_triple('x86_64'), '', '') + #('loongarch64', self.open_ohos_triple('loongarch64'), '', '') + ] + + cc = os.path.join(llvm_install, 'bin', 'clang') + cxx = os.path.join(llvm_install, 'bin', 'clang++') + ar = os.path.join(llvm_install, 'bin', 'llvm-ar') + llvm_config = os.path.join(llvm_install, 'bin', 'llvm-config') + self.set_clang_version(llvm_install) + return configs_list, cc, cxx, ar, llvm_config + + def build_libs(self, llvm_install, llvm_build, precompilation=False): + configs_list, cc, cxx, ar, llvm_config = self.libs_argument(llvm_install) + seen_arch_list = [self.liteos_triple('arm')] + + self.set_clang_version(llvm_install) + for (arch, llvm_triple, extra_flags, multilib_suffix) in configs_list: + if llvm_build != llvm_triple: + continue + + has_lldb_tools = arch not in ['riscv64', 'mipsel'] + + defines = self.base_cmake_defines() + ldflags = [] + cflags = [] + if self.build_config.adlt_debug_build: + cflags.append("-g -gdwarf-4 -O0") + self.logger().info('Build libs for %s', llvm_triple) + if self.build_config.target_debug: + defines['CMAKE_BUILD_TYPE'] = 'Debug' + self.build_libs_defines(llvm_triple, defines, cc, cxx, ar, llvm_config, ldflags, cflags, extra_flags) + if arch == 'mipsel': + ldflags.append('-Wl,-z,notext') + ldflags.append('-Wl,--no-check-dynamic-relocations') + + llvm_path = self.merge_out_path('llvm_make') + arch_list = [ + #self.liteos_triple('arm'), self.open_ohos_triple('arm'), + self.open_ohos_triple('aarch64'), + #self.open_ohos_triple('riscv64'), + #self.open_ohos_triple('mipsel'), + self.open_ohos_triple('x86_64') + #self.open_ohos_triple('loongarch64') + ] + #omp_list = [self.open_ohos_triple("aarch64"), self.open_ohos_triple("arm"), self.open_ohos_triple('x86_64')] + omp_list = [self.open_ohos_triple("aarch64"), self.open_ohos_triple('x86_64')] + libcxx_ndk_install = self.merge_out_path('libcxx-ndk') + self.check_create_dir(libcxx_ndk_install) + + if precompilation: + self.build_crts(llvm_install, arch, llvm_triple, cflags, ldflags, multilib_suffix, defines) + continue + # libunwind is added to linker command line by OHOS toolchain, so we have to use two step build + self.build_runtimes(llvm_install, "libunwind", ldflags, cflags, llvm_triple, arch, multilib_suffix, defines) + self.build_runtimes(llvm_install, "libunwind;libcxxabi;libcxx", ldflags, cflags, llvm_triple, arch, multilib_suffix, defines) + + self.build_runtimes(libcxx_ndk_install, "libunwind;libcxxabi;libcxx", ldflags, cflags, llvm_triple, + arch, multilib_suffix, defines, True) + + self.build_crts(llvm_install, arch, llvm_triple, cflags, ldflags, multilib_suffix, defines, + first_time=False) + + if llvm_triple in arch_list: + if self.build_config.need_lldb_tools and has_lldb_tools and llvm_triple not in seen_arch_list: + self.build_lldb_tools(llvm_install, llvm_path, arch, llvm_triple, cflags, ldflags, + defines) + seen_arch_list.append(llvm_triple) + if llvm_triple in omp_list: + self.build_libomp(llvm_install, arch, llvm_triple, cflags, ldflags, multilib_suffix, defines, 'TRUE') + self.build_libomp(llvm_install, arch, llvm_triple, cflags, ldflags, multilib_suffix, defines, 'FALSE') + continue + + self.build_libz(arch, llvm_triple, cflags, ldflags, defines) + if self.build_config.need_lldb_tools and has_lldb_tools and llvm_triple not in seen_arch_list: + self.build_lldb_tools(llvm_install, llvm_path, arch, llvm_triple, cflags, ldflags, defines) + seen_arch_list.append(llvm_triple) + + def build_libs_by_type(self, compiler_path, llvm_install, llvm_build, libs_type, is_first_time, is_ndk_install): + configs_list, cc, cxx, ar, llvm_config = self.libs_argument(compiler_path) + + for (arch, llvm_triple, extra_flags, multilib_suffix) in configs_list: + if llvm_build != llvm_triple: + continue + defines = self.base_cmake_defines() + ldflags = [] + cflags = [] + if self.build_config.adlt_debug_build: + cflags.append("-g -gdwarf-4 -O0") + self.logger().info('Build %s libs for %s', libs_type, llvm_triple) + out_path = self.merge_out_path('llvm_build') + + self.logger().info('Make %s libs for %s build_libs_flags: %s', libs_type, llvm_triple, self.build_config.build_libs_flags) + if self.build_config.target_debug: + defines['CMAKE_BUILD_TYPE'] = 'Debug' + self.build_libs_defines(llvm_triple, defines, cc, cxx, ar, llvm_config, ldflags, cflags, extra_flags) + if arch == 'mipsel': + ldflags.append('-Wl,-z,notext') + ldflags.append('-Wl,--no-check-dynamic-relocations') + if self.build_config.build_libs_flags == 'OH': + extra_cflags = [extra_flags, '--target=%s' % llvm_triple] + cflags = get_ohos_cflags(out_path, extra_cflags) + ldflags = get_ohos_ldflags(out_path, []) + if self.build_config.build_libs_flags == 'BOTH': + cflags = get_ohos_cflags(out_path, cflags) + ldflags = get_ohos_ldflags(out_path, ldflags) + if libs_type == 'crts': + if is_first_time: + self.build_crts(llvm_install, arch, llvm_triple, cflags, ldflags, multilib_suffix, defines) + else: + self.build_crts(llvm_install, arch, llvm_triple, cflags, ldflags, multilib_suffix, defines, + first_time=False) + elif libs_type == 'runtimes': + if is_first_time: + self.build_runtimes(llvm_install, "libunwind", ldflags, cflags, llvm_triple, arch, multilib_suffix, defines) + elif is_ndk_install: + libcxx_ndk_install = self.merge_out_path('libcxx-ndk') + self.check_create_dir(libcxx_ndk_install) + self.build_runtimes(libcxx_ndk_install, "libunwind;libcxxabi;libcxx", ldflags, cflags, llvm_triple, + arch, multilib_suffix, defines, True) + else: + self.build_runtimes(llvm_install, "libunwind;libcxxabi;libcxx", ldflags, cflags, llvm_triple, arch, multilib_suffix, defines) + + def build_runtimes(self, + llvm_install, + rt_list, + ldflags, + cflags, + llvm_triple, + arch, + multilib_suffix, + defines, + is_libcxx_ndk_install=False): + + self.logger().info('Building runtimes(%s) for %s', rt_list, arch) + + ndk_suffix = '-ndk' if is_libcxx_ndk_install else '' + multi_suffix = '-' + multilib_suffix if multilib_suffix else '' + out_path = self.merge_out_path('lib', rt_list.replace(';', '-') + ndk_suffix + '-' + str(llvm_triple) + multi_suffix) + + libcxx_install_include_path = self.merge_out_path(llvm_install, 'include', 'libcxx-ohos', 'include', 'c++', 'v1') + + rt_cflags = list(cflags) + rt_cflags.append('-fstack-protector-strong') + rt_cflags.append('-funwind-tables') + rt_cflags.append('-fno-omit-frame-pointer') + + rt_defines = defines.copy() + rt_defines['OHOS'] = '1' + rt_defines['LLVM_ENABLE_PER_TARGET_RUNTIME_DIR'] = 'ON' + rt_defines['LLVM_TARGET_MULTILIB_SUFFIX'] = multilib_suffix + rt_defines['LLVM_DEFAULT_TARGET_TRIPLE'] = llvm_triple + rt_defines['LLVM_ENABLE_RUNTIMES'] = rt_list + rt_defines['LIBUNWIND_USE_COMPILER_RT'] = 'ON' + rt_defines['LIBUNWIND_ENABLE_SHARED'] = 'OFF' + rt_defines['LIBCXXABI_USE_COMPILER_RT'] = 'ON' + rt_defines['LIBCXXABI_USE_LLVM_UNWINDER'] = 'ON' + rt_defines['LIBCXXABI_ENABLE_STATIC_UNWINDER'] = 'ON' + rt_defines['LIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY'] = 'OFF' + rt_defines['LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL'] = 'OFF' + rt_defines['LIBCXXABI_ENABLE_SHARED'] = 'OFF' + rt_defines['LIBCXXABI_LIBCXX_INCLUDES'] = os.path.abspath(os.path.join(self.build_config.LLVM_PROJECT_DIR, 'libcxx', 'include')) + rt_defines['LIBCXXABI_INSTALL_INCLUDE_DIR'] = libcxx_install_include_path + rt_defines['LIBCXX_USE_COMPILER_RT'] = 'ON' + rt_defines['LIBCXX_ENABLE_ABI_LINKER_SCRIPT'] = 'OFF' + rt_defines['LIBCXX_ENABLE_STATIC_ABI_LIBRARY'] = 'ON' + rt_defines['LIBCXX_INSTALL_INCLUDE_DIR'] = libcxx_install_include_path + rt_defines['LIBCXX_INSTALL_INCLUDE_TARGET_DIR'] = libcxx_install_include_path + rt_defines['CMAKE_ASM_FLAGS'] = ' '.join(rt_cflags) + rt_defines['CMAKE_C_FLAGS'] = ' '.join(rt_cflags) + rt_defines['CMAKE_CXX_FLAGS'] = ' '.join(rt_cflags) + rt_defines['CMAKE_INSTALL_PREFIX'] = llvm_install + rt_defines['CMAKE_SHARED_LINKER_FLAGS'] = ' '.join(ldflags) + rt_defines['CMAKE_SYSTEM_NAME'] = 'OHOS' + rt_defines['CMAKE_CROSSCOMPILING'] = 'True' + rt_defines['CMAKE_TRY_COMPILE_TARGET_TYPE'] = 'STATIC_LIBRARY' + + if is_libcxx_ndk_install: + rt_defines['LIBCXX_ABI_NAMESPACE'] = '__n1' + rt_defines['LIBCXX_OUTPUT_NAME'] = 'c++_shared' + rt_defines['LIBCXX_OUTPUT_STATIC_NAME'] = 'c++_static' + rt_defines['LIBCXXABI_INSTALL_LIBRARY'] = 'OFF' + rt_defines['LIBUNWIND_INSTALL_LIBRARY'] = 'OFF' + else: + rt_defines['LIBCXX_ABI_NAMESPACE'] = '__h' + + self.check_rm_tree(out_path) + cmake_rt = os.path.abspath(os.path.join(self.build_config.LLVM_PROJECT_DIR, 'runtimes')) + + self.invoke_cmake(cmake_rt, + out_path, + rt_defines, + env=dict(self.build_config.ORIG_ENV)) + + self.invoke_ninja(out_path=out_path, + env=dict(self.build_config.ORIG_ENV), + target=None, + install=True) + + def build_crts(self, + llvm_install, + arch, + llvm_triple, + cflags, + ldflags, + multilib_suffix, + defines, + first_time=True): + + self.logger().info('Building compiler-rt for %s', arch) + + suffix = '-' + multilib_suffix if multilib_suffix else '' + crt_path = self.merge_out_path('lib', 'clangrt-%s%s' % (llvm_triple, suffix)) + crt_install = os.path.join(llvm_install, 'lib', 'clang', self.build_config.VERSION) + + crt_extra_flags = [] + if not self.build_config.target_debug: + # Remove absolute paths from compiler-rt debug info emitted with -gline-tables-only + crt_extra_flags = ['-ffile-prefix-map=%s=.' % self.build_config.REPOROOT_DIR] + + crt_defines = defines.copy() + crt_defines['CMAKE_EXE_LINKER_FLAGS'] = ' '.join(ldflags) + crt_defines['CMAKE_SHARED_LINKER_FLAGS'] = ' '.join(ldflags) + crt_defines['CMAKE_MODULE_LINKER_FLAGS'] = ' '.join(ldflags) + crt_defines['CMAKE_C_FLAGS'] = ' '.join(cflags + crt_extra_flags) + crt_defines['CMAKE_ASM_FLAGS'] = ' '.join(cflags + crt_extra_flags) + crt_defines['CMAKE_CXX_FLAGS'] = ' '.join(cflags + crt_extra_flags) + crt_defines['COMPILER_RT_TEST_COMPILER_CFLAGS'] = ' '.join(cflags) + crt_defines['OHOS'] = '1' + crt_defines['COMPILER_RT_TEST_TARGET_TRIPLE'] = llvm_triple + crt_defines['COMPILER_RT_TEST_STANDALONE_BUILD_LIBS'] = 'OFF' + crt_defines['COMPILER_RT_INCLUDE_TESTS'] = 'ON' + crt_defines['CMAKE_INSTALL_PREFIX'] = crt_install + crt_defines['LLVM_TARGET_MULTILIB_SUFFIX'] = multilib_suffix + if first_time or llvm_triple == self.liteos_triple('arm'): + crt_defines['COMPILER_RT_BUILD_LIBFUZZER'] = 'OFF' + else: + crt_defines['COMPILER_RT_BUILD_LIBFUZZER'] = 'ON' + crt_defines['COMPILER_RT_BUILD_ORC'] = 'OFF' + crt_defines['LLVM_ENABLE_PER_TARGET_RUNTIME_DIR'] = 'ON' + crt_defines['COMPILER_RT_USE_BUILTINS_LIBRARY'] = 'ON' + crt_defines['CMAKE_SYSTEM_NAME'] = 'OHOS' + crt_defines['CMAKE_CROSSCOMPILING'] = 'True' + crt_defines['SANITIZER_CXX_ABI'] = 'libcxxabi' + crt_defines['CMAKE_TRY_COMPILE_TARGET_TYPE'] = 'STATIC_LIBRARY' + crt_defines['COMPILER_RT_HWASAN_WITH_INTERCEPTORS'] = 'ON' + crt_defines['COMPILER_RT_BUILD_SANITIZERS'] = \ + 'OFF' if llvm_triple == self.liteos_triple('arm') or first_time else 'ON' + crt_defines['COMPILER_RT_EXCLUDE_ATOMIC_BUILTIN'] = 'OFF' + crt_defines['COMPILER_RT_DEFAULT_TARGET_TRIPLE'] = llvm_triple + crt_cmake_path = os.path.abspath(os.path.join(self.build_config.LLVM_PROJECT_DIR, 'compiler-rt')) + self.rm_cmake_cache(crt_path) + + self.invoke_cmake(crt_cmake_path, + crt_path, + crt_defines, + env=dict(self.build_config.ORIG_ENV)) + + self.invoke_ninja(out_path=crt_path, + env=dict(self.build_config.ORIG_ENV), + target=None, + install=True) + + if arch == 'aarch64' and not first_time: + build_target = [] + install_target = [] + crt_extra_flags.append('-mbranch-protection=bti') + build_target = ['clang_rt.crtbegin-aarch64', 'clang_rt.crtend-aarch64'] + install_target = ['install-clang_rt.crtend-aarch64', 'install-clang_rt.crtbegin-aarch64'] + crt_flags = ' '.join(cflags + crt_extra_flags) + crt_defines['CMAKE_C_FLAGS'] = crt_flags + crt_defines['CMAKE_ASM_FLAGS'] = crt_flags + crt_defines['CMAKE_CXX_FLAGS'] = crt_flags + + self.invoke_cmake(crt_cmake_path, + crt_path, + crt_defines, + env=dict(self.build_config.ORIG_ENV)) + + self.invoke_ninja(out_path=crt_path, + env=dict(self.build_config.ORIG_ENV), + target=build_target, + install=False) + self.invoke_ninja(out_path=crt_path, + env=dict(self.build_config.ORIG_ENV), + target=install_target, + install=False) + + def build_libomp(self, + llvm_install, + arch, + llvm_triple, + cflags, + ldflags, + multilib_suffix, + defines, + enable_shared): + self.logger().info('Building libomp for %s', arch) + + libomp_path = self.merge_out_path('lib', 'libomp-%s' % llvm_triple) + out_dir = os.path.join(libomp_path, 'lib') + + libomp_cflags = list(cflags) + libomp_cflags.append('-fPIC') + + libomp_defines = defines.copy() + libomp_defines['CMAKE_EXE_LINKER_FLAGS'] = ' '.join(ldflags) + libomp_defines['CMAKE_SHARED_LINKER_FLAGS'] = ' '.join(ldflags) + libomp_defines['CMAKE_MODULE_LINKER_FLAGS'] = ' '.join(ldflags) + + libomp_defines['OHOS'] = '1' + libomp_defines['CMAKE_ASM_FLAGS'] = ' '.join(libomp_cflags) + libomp_defines['CMAKE_C_FLAGS'] = ' '.join(libomp_cflags) + libomp_defines['CMAKE_CXX_FLAGS'] = ' '.join(libomp_cflags) + libomp_defines['OPENMP_ENABLE_LIBOMPTARGET'] = 'FALSE' + + libomp_defines['OPENMP_LIBDIR_SUFFIX'] = os.path.join(os.sep, llvm_triple, multilib_suffix) + libomp_defines['LIBOMP_ENABLE_SHARED'] = enable_shared + libomp_defines['CMAKE_POLICY_DEFAULT_CMP0056'] = 'NEW' + libomp_defines['CMAKE_INSTALL_PREFIX'] = llvm_install + libomp_defines['COMPILER_RT_USE_BUILTINS_LIBRARY'] = 'ON' + libomp_defines['CMAKE_SYSTEM_NAME'] = 'OHOS' + libomp_defines['CMAKE_CROSSCOMPILING'] = 'True' + libomp_defines['LLVM_ENABLE_LIBCXX'] = 'ON' + libomp_defines['CMAKE_TRY_COMPILE_TARGET_TYPE'] = 'STATIC_LIBRARY' + + libomp_cmake_path = os.path.join(self.build_config.LLVM_PROJECT_DIR, 'openmp') + + if enable_shared == "TRUE": + libomp_path = os.path.join(libomp_path, "shared") + else: + libomp_path = os.path.join(libomp_path, "static") + + self.rm_cmake_cache(libomp_path) + self.invoke_cmake(libomp_cmake_path, + libomp_path, + libomp_defines, + env=dict(self.build_config.ORIG_ENV)) + self.invoke_ninja(out_path=libomp_path, + env=dict(self.build_config.ORIG_ENV), + target=None, + install=True) + + def build_libz(self, + arch, + llvm_triple, + cflags, + ldflags, + defines): + + self.logger().info('Building libz for %s ', arch) + + libz_path = self.merge_out_path('lib', 'libz-%s' % llvm_triple) + if llvm_triple == self.hos_triple('arm'): + ldflags.append('-lunwind') + + libz_cflags = list(cflags) + libz_cflags.append('-fPIC') + + libz_defines = defines.copy() + libz_defines['CMAKE_EXE_LINKER_FLAGS'] = ' '.join(ldflags) + libz_defines['CMAKE_SHARED_LINKER_FLAGS'] = ' '.join(ldflags) + libz_defines['CMAKE_MODULE_LINKER_FLAGS'] = ' '.join(ldflags) + libz_defines['OHOS'] = '1' + libz_defines['CMAKE_ASM_FLAGS'] = ' '.join(libz_cflags) + libz_defines['CMAKE_C_FLAGS'] = ' '.join(libz_cflags) + libz_defines['CMAKE_CXX_FLAGS'] = ' '.join(libz_cflags) + libz_defines['CMAKE_TRY_COMPILE_TARGET_TYPE'] = 'STATIC_LIBRARY' + + libz_cmake_path = os.path.join(self.build_config.REPOROOT_DIR, 'third_party/zlib') + self.rm_cmake_cache(libz_path) + + self.invoke_cmake(libz_cmake_path, + libz_path, + libz_defines, + env=dict(self.build_config.ORIG_ENV)) + + self.invoke_ninja(out_path=libz_path, + env=dict(self.build_config.ORIG_ENV), + target=None, + install=False) + + self.sysroot_composer.copy_libz_to_sysroot(libz_path, llvm_triple) + + def build_lldb_tools(self, + llvm_install, + llvm_path, + arch, + llvm_triple, + cflags, + ldflags, + defines): + + self.logger().info('Building lldb for %s', arch) + + lldb_path = self.merge_out_path('lib', 'lldb-server-%s' % llvm_triple) + crt_install = os.path.join(llvm_install, 'lib', 'clang', self.build_config.VERSION) + out_dir = os.path.join(lldb_path, 'bin') + + lldb_ldflags = list(ldflags) + lldb_cflags = list(cflags) + + lldb_ldflags.append('-lunwind') + lldb_ldflags.append('-static') + + lldb_defines = defines.copy() + + lldb_defines['CMAKE_EXE_LINKER_FLAGS'] = ' '.join(lldb_ldflags) + lldb_defines['CMAKE_SHARED_LINKER_FLAGS'] = ' '.join(lldb_ldflags) + lldb_defines['CMAKE_MODULE_LINKER_FLAGS'] = ' '.join(lldb_ldflags) + + lldb_defines['OHOS'] = '1' + lldb_defines['CMAKE_C_FLAGS'] = ' '.join(lldb_cflags) + lldb_defines['CMAKE_ASM_FLAGS'] = ' '.join(lldb_cflags) + lldb_defines['CMAKE_CXX_FLAGS'] = ' '.join(lldb_cflags) + lldb_defines['CMAKE_INSTALL_PREFIX'] = crt_install + lldb_defines['LLVM_ENABLE_PER_TARGET_RUNTIME_DIR'] = 'ON' + lldb_defines['LLDB_ENABLE_PYTHON'] = 'OFF' + lldb_defines['LLDB_PYTHON_HOME'] = os.path.join('..', self.build_config.LLDB_PYTHON) + lldb_defines['LLDB_PYTHON_RELATIVE_PATH'] = os.path.join('bin', self.build_config.LLDB_PYTHON, 'lib', + 'python%s' % self.build_config.LLDB_PY_VERSION, llvm_triple) + lldb_defines['LLDB_PYTHON_EXE_RELATIVE_PATH'] = os.path.join('bin', self.build_config.LLDB_PYTHON) + lldb_defines['LLDB_PYTHON_EXT_SUFFIX'] = '.so' + lldb_defines['COMPILER_RT_USE_BUILTINS_LIBRARY'] = 'ON' + lldb_defines['CMAKE_SYSTEM_NAME'] = 'OHOS' + lldb_defines['CMAKE_CROSSCOMPILING'] = 'True' + lldb_defines['LLVM_DEFAULT_TARGET_TRIPLE'] = llvm_triple + lldb_defines['LLVM_ENABLE_LIBCXX'] = 'ON' + lldb_defines['LLVM_ENABLE_PROJECTS'] = 'clang;lldb' + lldb_defines['LLVM_TABLEGEN'] = os.path.join(llvm_install, 'bin', 'llvm-tblgen') + lldb_defines['CLANG_TABLEGEN'] = os.path.join(llvm_install, '..', llvm_path, 'bin', 'clang-tblgen') + lldb_defines['LLDB_TABLEGEN'] = os.path.join(llvm_install, '..', llvm_path, 'bin', 'lldb-tblgen') + lldb_defines['LLVM_HOST_TRIPLE'] = llvm_triple + lldb_defines['LLVM_TARGET_ARCH'] = arch + lldb_defines['LLVM_TARGETS_TO_BUILD'] = self.build_config.TARGETS + + if self.build_config.enable_monitoring: + lldb_defines['LLDB_ENABLE_PERFORMANCE'] = 'ON' + + lldb_target = ['lldb-server'] if self.build_config.need_lldb_server else [] + + if self.build_config.build_lldb_static and llvm_triple in ['aarch64-linux-ohos', 'arm-linux-ohos']: + lldb_defines['LIBLLDB_BUILD_STATIC'] = 'ON' + lldb_target.append('lldb') + + if self.build_config.build_ncurses: + self.build_ncurses(None, llvm_install, llvm_triple, True) + lldb_defines['LLDB_ENABLE_CURSES'] = 'ON' + ncurses_install_path = self.merge_ncurses_install_dir(llvm_triple) + lldb_defines['CURSES_INCLUDE_DIRS'] = os.path.join(ncurses_install_path, 'include') + lldb_defines['CURSES_HAVE_NCURSES_CURSES_H'] = 'ON' + ncurses_lib_path = os.path.join(ncurses_install_path, 'lib') + ncurses_libs = [] + for library in self.get_ncurses_dependence_libs(llvm_triple): + ncurses_libs.append(os.path.join(ncurses_lib_path, f'{library}.a')) + ncurses_libs = ';'.join(ncurses_libs) + lldb_defines['CURSES_LIBRARIES'] = ncurses_libs + lldb_defines['PANEL_LIBRARIES'] = ncurses_libs + + if self.build_config.build_libedit: + self.build_libedit(None, llvm_install, llvm_triple, True) + lldb_defines['LLDB_ENABLE_LIBEDIT'] = 'ON' + libedit_install_path = self.merge_libedit_install_dir(llvm_triple) + lldb_defines['LibEdit_INCLUDE_DIRS'] = os.path.join(libedit_install_path, 'include') + lldb_defines['LibEdit_LIBRARIES'] = os.path.join(libedit_install_path, 'lib', 'libedit.a') + + if self.build_config.build_libxml2: + self.build_libxml2(llvm_triple, None, llvm_install, True) + lldb_defines['LLDB_ENABLE_LIBXML2'] = 'ON' + lldb_defines['LIBXML2_INCLUDE_DIR'] = self.merge_libxml2_install_dir(llvm_triple, 'include', 'libxml2') + lldb_defines['LIBXML2_LIBRARY'] = self.merge_libxml2_install_dir(llvm_triple, 'lib', 'libxml2.a') + + if self.build_config.enable_lzma_7zip: + self.build_lzma(None, llvm_install, llvm_triple, True) + lldb_defines['LLDB_ENABLE_LZMA'] = 'ON' + lldb_defines['LLDB_ENABLE_LZMA_7ZIP'] = 'ON' + lldb_defines['LIBLZMA_INCLUDE_DIRS'] = self.merge_install_dir('lzma', llvm_triple, 'include') + lldb_defines['LIBLZMA_LIBRARIES'] = self.merge_install_dir('lzma', llvm_triple, 'lib', 'liblzma.a') + + if self.build_config.lldb_timeout: + lldb_defines['LLDB_ENABLE_TIMEOUT'] = 'True' + + lldb_cmake_path = os.path.join(self.build_config.LLVM_PROJECT_DIR, 'llvm') + + self.invoke_cmake(lldb_cmake_path, + lldb_path, + lldb_defines, + env=dict(self.build_config.ORIG_ENV)) + + self.invoke_ninja(out_path=lldb_path, + env=dict(self.build_config.ORIG_ENV), + target=lldb_target, + install=False) + + self.llvm_package.copy_lldb_tools_to_llvm_install(lldb_target, lldb_path, crt_install, llvm_triple) + + def build_runtimes_for_windows(self, enable_assertions): + + self.logger().info('Building libs for windows.') + toolchain_dir = self.merge_out_path('llvm-install') + install_dir = self.merge_out_path('windows-x86_64-install') + windows_sysroot = self.merge_out_path('mingw', self.build_config.MINGW_TRIPLE) + + cflags = ['-stdlib=libc++', '--target=x86_64-pc-windows-gnu', '-D_LARGEFILE_SOURCE', + '-D_FILE_OFFSET_BITS=64', '-D_WIN32_WINNT=0x0600', '-DWINVER=0x0600', '-D__MSVCRT_VERSION__=0x1400'] + + cmake_defines = {} + cmake_defines['CMAKE_C_COMPILER'] = os.path.join(toolchain_dir, 'bin', 'clang') + cmake_defines['CMAKE_CXX_COMPILER'] = os.path.join(toolchain_dir, 'bin', 'clang++') + cmake_defines['CMAKE_CROSSCOMPILING'] = 'True' + cmake_defines['CMAKE_SYSTEM_NAME'] = 'Windows' + cmake_defines['CMAKE_SYSROOT'] = windows_sysroot + cmake_defines['CMAKE_ASM_FLAGS'] = ' '.join(cflags) + cmake_defines['CMAKE_C_FLAGS'] = ' '.join(cflags) + cmake_defines['CMAKE_CXX_FLAGS'] = ' '.join(cflags) + cmake_defines['CMAKE_BUILD_TYPE'] = 'Debug' if self.build_config.target_debug else 'Release' + cmake_defines['CMAKE_TRY_COMPILE_TARGET_TYPE'] = 'STATIC_LIBRARY' + cmake_defines['CMAKE_INSTALL_PREFIX'] = install_dir + cmake_defines['LLVM_CONFIG_PATH'] = os.path.join(toolchain_dir, 'bin', 'llvm-config') + cmake_defines['LIBCXX_ENABLE_SHARED'] = 'OFF' + cmake_defines['LIBCXX_ENABLE_STATIC_ABI_LIBRARY'] = 'ON' + cmake_defines['LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS'] = 'ON' + cmake_defines['LIBCXXABI_ENABLE_SHARED'] = 'OFF' + cmake_defines['LIBUNWIND_ENABLE_SHARED'] = 'OFF' + cmake_defines['LIBCXXABI_USE_LLVM_UNWINDER'] = 'ON' + cmake_defines['LLVM_ENABLE_RUNTIMES'] = 'libunwind;libcxxabi;libcxx' + cmake_defines['LLVM_ENABLE_ASSERTIONS'] = 'ON' if enable_assertions else 'OFF' + cmake_defines['Python3_EXECUTABLE'] = os.path.join(self.get_python_dir(), 'bin', + self.build_config.LLDB_PYTHON) + + out_path = self.merge_out_path('lib', 'windows-runtimes') + cmake_path = os.path.abspath(os.path.join(self.build_config.LLVM_PROJECT_DIR, 'runtimes')) + + self.invoke_cmake(cmake_path, + out_path, + cmake_defines, + env=dict(self.build_config.ORIG_ENV)) + + self.invoke_ninja(out_path, + env=dict(self.build_config.ORIG_ENV), + install=True) + + def build_ncurses(self, llvm_make, llvm_install, platform_triple, static = False): + self.logger().info('Building ncurses.') + + libncurses_src_dir = os.path.abspath(os.path.join(self.build_config.REPOROOT_DIR, 'third_party', 'ncurses')) + libncurses_install_path = self.merge_ncurses_install_dir(platform_triple) + libncurses_build_path = self.merge_ncurses_build_dir(platform_triple) + prebuilts_path = os.path.join(self.buildtools_path) + + self.check_rm_tree(libncurses_build_path) + self.rm_cmake_cache(libncurses_build_path) + self.check_rm_tree(libncurses_install_path) + self.rm_cmake_cache(libncurses_install_path) + + cur_dir = os.getcwd() + os.chdir(self.build_config.LLVM_BUILD_DIR) + clang_version = self.build_config.CLANG_VERSION + + ncurses_version = self.get_ncurses_version() + if ncurses_version is not None: + libncurses_untar_path = self.merge_out_path('third_party', 'ncurses', 'ncurses-' + ncurses_version) + args = ['./build_ncurses.sh', libncurses_src_dir, libncurses_build_path, libncurses_install_path, + prebuilts_path, clang_version, ncurses_version, platform_triple, libncurses_untar_path] + if static: + args.append('static') + args.append(self.merge_ncurses_install_dir(self.use_platform())) + self.check_call(args) + os.chdir(cur_dir) + + if not static: + self.llvm_package.copy_ncurses_to_llvm(platform_triple, llvm_make) + self.llvm_package.copy_ncurses_to_llvm(platform_triple, llvm_install) + + def build_lzma(self, llvm_make, llvm_install, platform_triple, static = False): + self.logger().info('Building lzma') + target_triple = self.use_platform() + liblzma_install_path = self.merge_install_dir('lzma', platform_triple) + liblzma_build_path = self.merge_build_dir('lzma', platform_triple) + asm_source_dir = os.path.join(self.build_config.REPOROOT_DIR, 'third_party', 'lzma', 'Asm') + sysroot = "" + asm_arc_dir = "" + ar = "" + if not platform_triple.endswith("ohos"): + if platform_triple.startswith("windows"): + llvm_clang_prebuilts = self.merge_out_path('llvm-install', 'bin', 'clang') + sysroot = self.merge_out_path('mingw', self.build_config.MINGW_TRIPLE) + target_triple = platform_triple + else: + llvm_clang_prebuilts = os.path.abspath(os.path.join(self.buildtools_path, 'clang', 'ohos', self.use_platform(), + 'clang-%s' % self.build_config.CLANG_VERSION, 'bin', 'clang')) + else: + llvm_clang_prebuilts = self.merge_out_path('llvm-install', 'bin', 'clang') + sysroot = self.merge_out_path("sysroot") + ar = self.merge_out_path('llvm-install', 'bin', 'llvm-ar') + target_triple = platform_triple + if platform_triple.startswith("aarch64"): + asm_arc_dir = os.path.abspath(os.path.join(asm_source_dir, 'arm64')) + if platform_triple.startswith("arm"): + asm_arc_dir = os.path.abspath(os.path.join(asm_source_dir, 'arm')) + + src_dir = os.path.abspath(os.path.join(self.build_config.REPOROOT_DIR, 'third_party', 'lzma', 'C')) + cmd = [ 'make', + 'install', + 'CC=%s' % llvm_clang_prebuilts, + 'SRC_PREFIX=%s/' % src_dir, + 'ASM_PREFIX=%s/' % asm_arc_dir, + 'SYSROOT=%s' % sysroot, + 'AR=%s' % ar, + 'TARGET_TRIPLE=%s' % target_triple, + 'INSTALL_DIR=%s' % liblzma_install_path, + 'BUILD_DIR=%s' % liblzma_build_path, + 'LIB_VERSION=%s' % self.build_config.LZMA_VERSION, + 'IS_STATIC=%s' % static, + '-f', + 'MakeLiblzma'] + os.chdir(self.build_config.LLVM_BUILD_DIR) + self.check_call(cmd) + + if not (static or platform_triple.startswith("windows")): + self.llvm_package.copy_lzma_to_llvm(platform_triple, llvm_make) + self.llvm_package.copy_lzma_to_llvm(platform_triple, llvm_install) + + def build_libedit(self, llvm_make, llvm_install, platform_triple, static = False): + self.logger().info('Building libedit') + + libedit_src_dir = os.path.abspath(os.path.join(self.build_config.REPOROOT_DIR, 'third_party', 'libedit')) + libedit_build_path = self.merge_libedit_build_dir(platform_triple) + libedit_install_path = self.merge_libedit_install_dir(platform_triple) + prebuilts_path = os.path.join(self.buildtools_path) + + self.check_rm_tree(libedit_build_path) + self.rm_cmake_cache(libedit_build_path) + self.check_rm_tree(libedit_install_path) + self.rm_cmake_cache(libedit_install_path) + + libncurses_path = self.merge_ncurses_install_dir(platform_triple) + + cur_dir = os.getcwd() + os.chdir(self.build_config.LLVM_BUILD_DIR) + clang_version = self.build_config.CLANG_VERSION + libedit_untar_path = self.merge_out_path('third_party', 'libedit', 'libedit-' + self.get_libedit_version()) + args = ['./build_libedit.sh', libedit_src_dir, libedit_build_path , libedit_install_path, libncurses_path, prebuilts_path, clang_version, platform_triple, libedit_untar_path] + self.check_call(args) + os.chdir(cur_dir) + + if not (static or platform_triple.startswith("windows")): + self.llvm_package.copy_libedit_to_llvm(platform_triple, llvm_make) + self.llvm_package.copy_libedit_to_llvm(platform_triple, llvm_install) + + def copy_gtest_to_sysroot(self, build_dir): + build_lib_dir = os.path.join(build_dir, 'lib') + self.logger().info('LlvmPackage copy_gtest_to_sysroot from %s', build_lib_dir) + libs = [ "libLLVMSupport.so", "libLLVMDemangle.so", "libllvm_gtest.so" ] + sysroot_lib_dir = self.merge_out_path('sysroot', 'aarch64-linux-ohos', 'usr', 'lib') + + os.chdir(build_lib_dir) + for f in libs: + self.check_copy_file(f'{f}.15', sysroot_lib_dir) + os.chdir(sysroot_lib_dir) + self.force_symlink(f'{f}.15', f) + os.chdir(build_lib_dir) + + def build_gtest_defines(self, llvm_install): + sysroot = self.merge_out_path('sysroot', 'aarch64-linux-ohos', 'usr') + common_flags = f'--target=aarch64-linux-ohos -B{sysroot}/lib -L{sysroot}/lib' + libcxx = self.merge_out_path('llvm-install', 'include', 'libcxx-ohos', 'include', 'c++', 'v1') + libc = os.path.join(sysroot, "include") + + gtest_defines = {} + gtest_defines['BUILD_SHARED_LIBS'] = 'YES' + gtest_defines['CMAKE_BUILD_TYPE'] = 'Release' + gtest_defines['CMAKE_C_COMPILER'] = os.path.join(llvm_install, 'bin', 'clang') + gtest_defines['CMAKE_CXX_COMPILER'] = os.path.join(llvm_install, 'bin', 'clang++') + gtest_defines['LLVM_TABLEGEN'] = os.path.join(llvm_install, 'bin', 'llvm-tblgen') + gtest_defines['CMAKE_LINKER'] = os.path.join(llvm_install, 'bin', 'ld.lld') + gtest_defines['CMAKE_EXE_LINKER_FLAGS'] = f'{common_flags}' + gtest_defines['CMAKE_C_FLAGS'] = f'{common_flags} -I{libc}' + gtest_defines['CMAKE_CXX_FLAGS'] = f'{common_flags} -I{libcxx} -I{libc}' + + return gtest_defines + + def build_gtest(self, compiler_path, llvm_install): + gtest_defines = self.build_gtest_defines(compiler_path) + gtest_cmake_path = os.path.abspath(os.path.join(self.build_config.LLVM_PROJECT_DIR, 'llvm')) + + gtest_build_path = self.merge_out_path('gtest') + + self.rm_cmake_cache(gtest_build_path) + + self.invoke_cmake(gtest_cmake_path, + gtest_build_path, + gtest_defines, + env=dict(self.build_config.ORIG_ENV)) + + self.invoke_ninja(out_path=gtest_build_path, + env=dict(self.build_config.ORIG_ENV), + target=[ "LLVMSupport", "LLVMDemangle", "llvm_gtest" ], + install=False) + + self.copy_gtest_to_sysroot(gtest_build_path) + shutil.copytree( + os.path.join(self.build_config.LLVM_PROJECT_DIR, 'llvm', 'utils', 'unittest', 'googlemock', 'include', 'gmock'), + os.path.join(llvm_install, 'include', 'gmock'), + dirs_exist_ok = True) + shutil.copytree( + os.path.join(self.build_config.LLVM_PROJECT_DIR, 'llvm', 'utils', 'unittest', 'googletest', 'include', 'gtest'), + os.path.join(llvm_install, 'include', 'gtest'), + dirs_exist_ok = True) + + def build_libxml2_defines(self): + libxml2_defines = {} + libxml2_defines['LIBXML2_WITH_PYTHON'] = 'OFF' + libxml2_defines['LIBXML2_WITH_PROGRAMS'] = 'OFF' + libxml2_defines['LIBXML2_WITH_LZMA'] = 'OFF' + libxml2_defines['LIBXML2_WITH_ICONV'] = 'OFF' + libxml2_defines['LIBXML2_WITH_ZLIB'] = 'OFF' + + return libxml2_defines + + def build_libxml2(self, triple, llvm_make, llvm_install, static = False): + self.logger().info('Building libxml2 for %s', triple) + + cmake_path = self.get_libxml2_source_path() + if not os.path.exists(cmake_path): + package_path = os.path.join(self.build_config.REPOROOT_DIR, 'third_party', 'libxml2') + untar_py = os.path.join(package_path, 'install.py') + untar_path = self.merge_out_path('third_party', 'libxml2') + self.check_create_dir(untar_path) + subprocess.run(['python3', untar_py, '--gen-dir', untar_path, '--source-file', package_path]) + + build_path = self.merge_libxml2_build_dir(triple) + install_path = self.merge_libxml2_install_dir(triple) + self.check_rm_tree(install_path) + + defines = self.build_libxml2_defines() + defines['CMAKE_INSTALL_PREFIX'] = install_path + cflags = ['-fstack-protector-strong'] + if static: + defines['BUILD_SHARED_LIBS'] = 'OFF' + elif not self.host_is_darwin(): + ldflags = ['-Wl,-z,relro,-z,now -Wl,-z,noexecstack'] + defines['CMAKE_SHARED_LINKER_FLAGS'] = ' '.join(ldflags) + + if triple in ['arm-linux-ohos', 'aarch64-linux-ohos', 'aarch64-linux-gnu']: + defines['CMAKE_C_COMPILER'] = self.merge_out_path('llvm-install','bin','clang') + cflags.append(f'--target={triple}') + if triple == 'arm-linux-ohos': + cflags.append('-march=armv7-a -mfloat-abi=soft') + + defines['CMAKE_C_FLAGS'] = ' '.join(cflags) + + self.rm_cmake_cache(build_path) + + self.invoke_cmake(cmake_path, + build_path, + defines, + dict(self.build_config.ORIG_ENV)) + + self.invoke_ninja(build_path, + dict(self.build_config.ORIG_ENV), + None, + True) + if not static: + self.llvm_package.copy_libxml2_to_llvm(triple, llvm_make) + self.llvm_package.copy_libxml2_to_llvm(triple, llvm_install) + + def build_libxml2_for_windows(self, windows64_install): + self.logger().info('Building libxml2 for windows') + + windows_sysroot = self.merge_out_path('mingw', self.build_config.MINGW_TRIPLE) + windowstool_path = self.merge_out_path('llvm-install') + libxml2_build_path = self.merge_libxml2_build_dir('windows-x86_64') + libxml2_install_path = self.merge_libxml2_install_dir('windows-x86_64') + + cflags = ['--target=x86_64-pc-windows-gnu'] + cflags.extend(('-I', os.path.join(windows_sysroot, 'include'))) + cflags.append('-fstack-protector-strong') + + ldflags = ['-fuse-ld=lld', + '--rtlib=compiler-rt'] + ldflags.extend(('-L', os.path.join(windows_sysroot, 'lib'))) + + rcflags = [] + rcflags.extend(('-I', os.path.join(windows_sysroot, 'include'))) + + libxml2_defines = self.build_libxml2_defines() + + libxml2_defines['LIBXML2_WITH_TESTS'] = 'OFF' + libxml2_defines['CMAKE_C_COMPILER'] = os.path.join(windowstool_path, 'bin', 'clang') + libxml2_defines['CMAKE_C_FLAGS'] = ' '.join(cflags) + libxml2_defines['CMAKE_SYSTEM_NAME'] = 'Windows' + libxml2_defines['CMAKE_SYSROOT'] = windows_sysroot + libxml2_defines['CMAKE_INSTALL_PREFIX'] = libxml2_install_path + libxml2_defines['CMAKE_EXE_LINKER_FLAGS'] = ' '.join(ldflags) + libxml2_defines['CMAKE_SHARED_LINKER_FLAGS'] = ' '.join(ldflags) + libxml2_defines['CMAKE_MODULE_LINKER_FLAGS'] = ' '.join(ldflags) + libxml2_defines['CMAKE_RC_COMPILER'] = os.path.join(windowstool_path, 'bin', 'llvm-windres') + libxml2_defines['CMAKE_RC_FLAGS'] = ' '.join(rcflags) + libxml2_defines['XML_INCLUDEDIR'] = os.path.join(windows_sysroot, 'include') + + libxml2_cmake_path = self.get_libxml2_source_path() + self.invoke_cmake(libxml2_cmake_path, + libxml2_build_path, + libxml2_defines, + env=dict(self.build_config.ORIG_ENV)) + + self.invoke_ninja(libxml2_build_path, + env=dict(self.build_config.ORIG_ENV), + target=None, + install=True) + + if not os.path.exists(os.path.join(windows64_install, 'bin')): + os.makedirs(os.path.join(windows64_install, 'bin')) + shutil.copyfile(os.path.join(libxml2_build_path, 'libxml2.dll'), os.path.join(windows64_install, 'bin', 'libxml2.dll')) + + def run_abi_checks(self, enable_check_abi, llvm_install, configs): + diff_dict = {} + for (arch, target) in configs: + configs_list, cc, cxx, ar, llvm_config = self.libs_argument(llvm_install) + for (_, llvm_triple, _, multilib_suffix) in configs_list: + if target != llvm_triple: + continue + if multilib_suffix: + baseline_abi_file_path = self.merge_out_path(self.build_config.LLVM_BUILD_DIR, + "libcxx_abidiff", llvm_triple, multilib_suffix, "libc++_shared.abi") + elf_common_path = self.merge_out_path('lib', + f"libunwind-libcxxabi-libcxx-ndk-{str(llvm_triple)}-{multilib_suffix}", + 'lib', llvm_triple, multilib_suffix) + else: + baseline_abi_file_path = self.merge_out_path(self.build_config.LLVM_BUILD_DIR, + "libcxx_abidiff", llvm_triple, "libc++_shared.abi") + elf_common_path = self.merge_out_path('lib', + f"libunwind-libcxxabi-libcxx-ndk-{str(llvm_triple)}", 'lib', llvm_triple) + elf_file_path = self.merge_out_path(elf_common_path, "libc++_shared.so") + abi_file_path = self.merge_out_path(elf_common_path, "libc++_shared.abi") + header_dir = self.merge_out_path('lib', + f"libunwind-libcxxabi-libcxx-ndk-{str(llvm_triple)}", 'include', "c++", "v1") + res = self.run_abi_check(elf_file_path, abi_file_path, baseline_abi_file_path, header_dir) + if res: + diff_dict[abi_file_path] = baseline_abi_file_path + if len(diff_dict) > 0: + if enable_check_abi is True: + user_check = input("ABI files are different, please confirm if you want to update [Y/n] : \n") + if user_check.lower() == "y" or user_check.lower() == "yes": + for key, value in diff_dict.items(): + shutil.copy2(key, value) + self.logger().info('update abi file %s ', value) + return True + else: + raise Exception("ABI files are different, please check it") + return False + + def run_abi_check(self, elf_file_path, abi_file_path, baseline_abi_file_path, header_dir): + abi_args = argparse.Namespace() + abi_args.elf_file = elf_file_path + abi_args.abi_file = abi_file_path + abi_args.compare_files = [baseline_abi_file_path, abi_file_path] + abi_args.headers_dir = header_dir + abi_check = AbiCheck(abi_args) + abi_check.gen_abi_file() + return abi_check.compare_abi_files() + +class LlvmPackage(BuildUtils): + + def __init__(self, build_config): + super(LlvmPackage, self).__init__(build_config) + + def copy_lldb_tools_to_llvm_install(self, tools, lldb_path, crt_install, llvm_triple): + dst_dir = os.path.join(crt_install, 'bin', llvm_triple) + self.check_create_dir(dst_dir) + for tool in tools: + # Copy lldb-tool + src_bin = os.path.join(lldb_path, 'bin', tool) + self.check_copy_file(src_bin, os.path.join(dst_dir, tool)) + + def package_libcxx(self): + libcxx_ndk_install=self.merge_out_path('libcxx-ndk') + libcxx_ndk_install_include=self.merge_out_path(libcxx_ndk_install, 'include', 'libcxx-ohos', 'include', 'c++', 'v1') + hosts_list=['linux-x86_64', 'darwin-x86_64', 'windows-x86_64', 'darwin-arm64', 'linux-aarch64'] + + if os.path.exists(libcxx_ndk_install): + for headerfile in os.listdir(libcxx_ndk_install_include): + if headerfile not in ['__config', '__config_site']: + if os.path.isdir(os.path.join(libcxx_ndk_install_include, headerfile)): + shutil.rmtree(os.path.join(libcxx_ndk_install_include, headerfile)) + else: + os.remove(os.path.join(libcxx_ndk_install_include, headerfile)) + + #Package libcxx-ndk + for host in hosts_list: + tarball_name = 'libcxx-ndk-%s-%s' % (self.build_config.build_name, host) + package_path = '%s%s' % (self.merge_packages_path(tarball_name), self.build_config.ARCHIVE_EXTENSION) + self.logger().info('Packaging %s', package_path) + args = ['tar', self.build_config.ARCHIVE_OPTION, '-h', '-C', self.build_config.OUT_PATH, '-f', package_path, 'libcxx-ndk'] + self.check_create_dir(self.build_config.PACKAGES_PATH) + self.check_call(args) + + @staticmethod + def merge_tree(src_dir, dst_dir): + for item in os.listdir(src_dir): + src_path = os.path.join(src_dir, item) + dst_path = os.path.join(dst_dir, item) + if os.path.isfile(src_path): + shutil.copyfile(src_path, dst_path) + else: + shutil.copytree(src_path, dst_path) + + def install_mingw_python(self, install_dir): + py_version = f'python{self.build_config.LLDB_PY_VERSION}' + py_dll_name = 'libpython' + self.build_config.LLDB_PY_VERSION + '.dll' + mingw_python_dir = self.get_mingw_python_dir() + if mingw_python_dir is None: + py_root = self.merge_out_path( + '..', 'third_party', 'mingw-w64', 'mingw-w64-python', + self.build_config.LLDB_PY_VERSION) + py_dll_path = os.path.join(py_root, py_dll_name) + py_lib_path = os.path.join(py_root, 'lib') + else: + py_root = mingw_python_dir + py_dll_path = os.path.join(py_root, 'bin', py_dll_name) + py_lib_path = os.path.join(py_root, 'lib', py_version) + + bin_root = os.path.join(install_dir, 'bin') + shutil.copyfile(py_dll_path, os.path.join(bin_root, py_dll_name)) + self.merge_tree(py_lib_path, + os.path.join(bin_root, 'python', 'lib', py_version)) + + def copy_python_to_host(self, python_dir, install_dir): + self.check_copy_tree(python_dir, os.path.join(install_dir, self.build_config.LLDB_PYTHON)) + + def windows_lib_files_operation(self, lib_files, lib_dir, install_dir): + + # Remove unnecessary Windows lib files. + windows_necessary_lib_files = ['libc++.a', 'libc++abi.a'] + + for lib_file in lib_files: + if lib_file.endswith('.a') and lib_file not in windows_necessary_lib_files: + static_library = os.path.join(lib_dir, lib_file) + os.remove(static_library) + + for necessary_lib_file in windows_necessary_lib_files: + if not os.path.isfile(os.path.join(lib_dir, necessary_lib_file)): + raise RuntimeError('Did not find %s under %s' % (necessary_lib_file, lib_dir)) + self.install_mingw_python(install_dir) + + + def strip_install_file(self, bin_dir, necessary_bin_files, script_bins, host): + + for bin_filename in os.listdir(bin_dir): + binary = os.path.join(bin_dir, bin_filename) + if not os.path.isfile(binary): + continue + if bin_filename not in necessary_bin_files: + os.remove(binary) + elif bin_filename not in script_bins and self.build_config.strip: + if self.host_is_darwin(): + self.check_call(['strip', '-x', binary]) + elif host.startswith('ohos') or host.endswith('aarch64'): + self.check_call(['eu-strip', binary]) + else: + self.check_call(['strip', binary]) + + + def strip_lldb_server(self, host, install_dir): + clang_version_bin_dir = os.path.join(install_dir, 'lib', 'clang', self.build_config.CLANG_VERSION, 'bin') + + if not host.startswith('linux') or not os.path.exists(clang_version_bin_dir) or not self.build_config.strip: + return + llvm_strip = os.path.join(install_dir, 'bin', 'llvm-strip') + for llvm_triple_dir in os.listdir(clang_version_bin_dir): + llvm_triple_bin_dir = os.path.join(clang_version_bin_dir, llvm_triple_dir) + + if not os.path.isdir(llvm_triple_bin_dir): + continue + + for bin_filename in os.listdir(llvm_triple_bin_dir): + binary = os.path.join(llvm_triple_bin_dir, bin_filename) + if os.path.isfile(binary): + self.check_call([llvm_strip, binary]) + + def generate_notice_file(self, readme_file): + nf_src = '' + nf_dict = { + "software": '', + "license_name": '', + "license_content": '' + } + notice_file = '' + nf_src, nf_dict["license_name"], nf_dict["software"] = self.gen_license_file(readme_file) + if os.path.exists(nf_src): + notice_file = self.gen_license(nf_dict, nf_src) + return notice_file + + def gen_license(self, nf_dict, nf_src): + nf_path = os.path.dirname(nf_src) + third_party_path = os.path.join(*nf_path.split(os.path.sep)[-2:]) + # Retrieve NOTICE information from README.OpenSource and write it into NOTICE + with open(nf_src, 'rt', encoding='utf-8') as f: + nf_dict["license_content"] = f.read() + notice_file = self.merge_out_path(third_party_path, 'NOTICE') + with open(notice_file, 'wt', encoding='utf-8') as f: + f.write("Notices for software(s):\n") + f.write("Software: {}\n".format(nf_dict["software"])) + f.write("License: {}\n".format(nf_dict["license_name"])) + f.write("Path: {}\n".format(third_party_path)) + f.write('-' * 60) + f.write("\n{}\n".format(nf_dict["license_content"])) + return notice_file + + def gen_license_file(self, readme_file): + if not os.path.exists(readme_file) or os.path.isdir(readme_file): + return '', '', '', '' + + license_file = '' + license_name = None + software_name = None + opensource_configdata = None + with open(readme_file, 'rb') as input_f: + opensource_config = json.load(input_f) + if opensource_config is None: + return '', '', '', '' + for info in opensource_config: + license_file = info.get('License File') + license_name = info.get('License') + software_name = '{} {}'.format(info.get('Name'), + info.get('Version Number')) + + license_file_path = os.path.join(os.path.dirname(readme_file), + license_file.strip()) + if not os.path.exists(license_file_path): + return '', '', '', '' + return license_file_path, license_name, software_name + + def append_notice(self, build_flag, host, lib_name, notices): + if build_flag and not host.startswith('windows'): + lib_readme_file = os.path.abspath(os.path.join(self.build_config.REPOROOT_DIR, + 'third_party', lib_name, 'README.OpenSource')) + lib_notice = self.generate_notice_file(lib_readme_file) + with open(lib_notice) as notice_file: + notices.append(notice_file.read()) + + def notice_prebuilts_file(self, host, projects, install_dir): + + # Fetch all the LICENSE.* files under our projects and append them into a + # Single NOTICE file for the resulting prebuilts. + notices = [] + for project in projects: + license_pattern = os.path.abspath(os.path.join(self.build_config.LLVM_PROJECT_DIR, project, 'LICENSE.*')) + for license_file in glob.glob(license_pattern): + with open(license_file) as notice_file: + notices.append(notice_file.read()) + + zlib_license_file = os.path.abspath(os.path.join(self.build_config.REPOROOT_DIR, 'third_party/zlib/LICENSE')) + with open(zlib_license_file) as notice_file: + notices.append(notice_file.read()) + + if host.startswith('windows'): + mingw_license_file = os.path.abspath(os.path.join(self.build_config.REPOROOT_DIR, + 'third_party/mingw-w64/COPYING')) + with open(mingw_license_file) as notice_file: + notices.append(notice_file.read()) + + self.append_notice(self.build_config.build_ncurses, host, 'ncurses', notices) + self.append_notice(self.build_config.build_ncurses, host, 'libedit', notices) + + with open(os.path.join(install_dir, 'NOTICE'), 'w') as notice_file: + notice_file.write('\n'.join(notices)) + + def package_clang_bin_file(self, necessary_bin_files, ext): + necessary_bin_file = [ + 'clang%s' % ext, + 'clang++%s' % ext, + 'clang-cpp%s' % ext, + 'clang-%s%s' % (self.build_config.VERSION.split('.')[0], ext), + 'clang-check%s' % ext, + 'clang-cl%s' % ext, + 'clang-format%s' % ext, + 'clang-tidy%s' % ext, + 'clangd%s' % ext, + 'count%s' % ext, + 'llc%s' % ext, + 'opt%s' % ext, + + ] + + necessary_bin_files.extend(necessary_bin_file) + + @staticmethod + def package_lldb_bin_file(necessary_bin_files, ext): + necessary_bin_file = [ + 'dsymutil%s' % ext, + 'FileCheck%s' % ext, + 'git-clang-format', + 'ld.lld%s' % ext, + 'ld64.lld%s' % ext, + 'lld%s' % ext, + 'lld-link%s' % ext, + 'lldb%s' % ext, + 'lldb-argdumper%s' % ext, + 'lldb-server%s' % ext, + 'lldb-vscode%s' % ext, + ] + necessary_bin_files.extend(necessary_bin_file) + + @staticmethod + def package_llvm_bin_file(necessary_bin_files, ext): + necessary_bin_file = [ + 'llvm-addr2line%s' % ext, + 'llvm-ar%s' % ext, + 'llvm-as%s' % ext, + 'llvm-cfi-verify%s' % ext, + 'llvm-config%s' % ext, + 'llvm-cov%s' % ext, + 'llvm-cxxfilt%s' % ext, + 'llvm-dis%s' % ext, + 'llvm-dwp%s' % ext, + 'llvm-ifs%s' % ext, + 'llvm-lib%s' % ext, + 'llvm-link%s' % ext, + 'llvm-modextract%s' % ext, + 'llvm-nm%s' % ext, + 'llvm-objcopy%s' % ext, + 'llvm-objdump%s' % ext, + 'llvm-profdata%s' % ext, + 'llvm-ranlib%s' % ext, + 'llvm-readelf%s' % ext, + 'llvm-readobj%s' % ext, + 'llvm-rc%s' % ext, + 'llvm-size%s' % ext, + 'llvm-strings%s' % ext, + 'llvm-strip%s' % ext, + 'llvm-symbolizer%s' % ext, + 'llvm-dwarfdump%s' % ext, + ] + necessary_bin_files.extend(necessary_bin_file) + + @staticmethod + def package_scan_bin_file(necessary_bin_files, ext): + necessary_bin_file = [ + 'not%s' % ext, + 'sancov%s' % ext, + 'sanstats%s' % ext, + 'scan-build%s' % ext, + 'scan-view%s' % ext, + 'yaml2obj%s' % ext, + ] + necessary_bin_files.extend(necessary_bin_file) + + @staticmethod + def package_license_project_tuple(): + # Install license files as NOTICE in the toolchain install dir. + projects = ( + 'llvm', + 'compiler-rt', + 'libcxx', + 'libcxxabi', + 'openmp', + 'clang', + 'clang-tools-extra', + 'lld', + 'lldb', + 'libunwind', + ) + return projects + + def remove_unnecessary_bin(self, necessary_bin_files, host, lib_dir, install_dir, ext, shlib_ext): + + lib_files = [] + if os.path.isdir(lib_dir): + lib_files = os.listdir(lib_dir) + if host.startswith('windows'): + vers_major = int(self.build_config.VERSION.split('.')[0]) + # Redefining necessary bin files for Windows. + windows_forbidden_list_bin_files = ['clang-%s%s' % (vers_major, ext), 'scan-build%s' % ext, + 'scan-view%s' % ext] + windows_additional_bin_files = ['liblldb%s' % shlib_ext, 'libpython%s%s' % (self.build_config.LLDB_PY_VERSION, shlib_ext), + 'libclang%s' % shlib_ext] + if self.build_config.build_libxml2: + windows_additional_bin_files += ['libxml2%s' % shlib_ext] + + if self.build_config.enable_lzma_7zip: + windows_additional_bin_files += ['liblzma%s' % shlib_ext] + bin_root = os.path.join(install_dir, 'bin') + prebuild_dir = self.merge_install_dir('lzma', 'windows-x86_64', 'lib', 'liblzma.dll') + shutil.copyfile(prebuild_dir, os.path.join(bin_root, 'liblzma.dll')) + + new_necessary_bin_files = list(set(necessary_bin_files) - set(windows_forbidden_list_bin_files)) + new_necessary_bin_files.extend(windows_additional_bin_files) + del necessary_bin_files[:] + necessary_bin_files.extend(new_necessary_bin_files) + + self.windows_lib_files_operation(lib_files, lib_dir, install_dir) + else: + # Remove unnecessary static libraries. + for lib_file in lib_files: + if lib_file.endswith('.a'): + static_library = os.path.join(lib_dir, lib_file) + os.remove(static_library) + + def package_up_resulting(self, package_name, host, install_host_dir): + # Package up the resulting trimmed install/ directory. + tarball_name = '%s-%s' % (package_name, host) + package_path = '%s%s' % (self.merge_packages_path(tarball_name), self.build_config.ARCHIVE_EXTENSION) + self.logger().info('Packaging %s', package_path) + args = ['tar', self.build_config.ARCHIVE_OPTION, '-C', install_host_dir, '-f', package_path, package_name] + if host.startswith('windows'): + # windows do not support symlinks, + # replace them with file copies + args.insert(1, '--dereference') + + self.check_create_dir(self.build_config.PACKAGES_PATH) + self.check_call(args) + + # Package ohos NDK + if os.path.exists(self.merge_out_path('sysroot')): + tarball_ndk_name = 'ohos-sysroot-%s' % self.build_config.build_name + package_ndk_path = '%s%s' % (self.merge_packages_path(tarball_ndk_name), self.build_config.ARCHIVE_EXTENSION) + self.logger().info('Packaging %s', package_ndk_path) + args = ['tar', self.build_config.ARCHIVE_OPTION, '-h', '-C', self.build_config.OUT_PATH, '-f', package_ndk_path, 'sysroot'] + self.check_call(args) + + def get_dependency_list(self, install_dir, lib): + dependency_list = [] + cmd = "otool -L {}".format(lib) + res = subprocess.run(cmd, stdout=subprocess.PIPE, shell=True).stdout.decode() + # Remove the library itself + res = res.split('\n')[1:] + for line in res: + line = line.strip() + if line.startswith("/"): + # Process lines similar to the following format: + # /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.100.3) + lib_path = line.split()[0] + dependency_list.append(lib_path) + return dependency_list + + def update_lib_id_link(self, install_dir, lib): + self.logger().info('update_lib_id_link lib is %s', lib) + if not self.host_is_darwin(): + return; + else: + dependency_list = self.get_dependency_list(install_dir, lib) + + # Update LC_ID_DYLIB, so that users of the library won't link with absolute path + dylib_name = os.path.basename(lib) + subprocess.check_call(["install_name_tool", "-id", "@rpath/%s" % dylib_name, lib]) + + library_list = [] + + if self.build_config.build_ncurses: + library_list.extend(["libncurses", "libpanel", "libform"]) + + if self.build_config.build_libedit: + library_list.append("libedit") + + # Update LC_LOAD_DYLIB. The lib may already reference other libs. + for dependency in dependency_list: + lib_name = os.path.basename(dependency) + for library in library_list: + index_link = dependency.rfind(library) + if index_link != -1: + subprocess.check_call(["install_name_tool", "-change", dependency, "@loader_path/../lib/%s" % lib_name, lib]) + + def copy_ncurses_to_llvm(self, platform_triple, install_dir): + self.logger().info('copy_ncurses_to_llvm install_dir is %s', install_dir) + + if self.host_is_darwin(): + shlib_ext = '.6.dylib' + if self.host_is_linux(): + shlib_ext = '.so.6' + + lib_dst_path = os.path.join(install_dir, 'lib') + + lib_names = self.get_ncurses_dependence_libs(platform_triple) + lib_srcs = [self.merge_ncurses_install_dir(platform_triple, 'lib', + f'{name}{shlib_ext}') for name in lib_names] + lib_dsts = [os.path.join(install_dir, 'lib', + f'{name}{shlib_ext}') for name in lib_names] + + if not os.path.exists(lib_dst_path): + os.makedirs(lib_dst_path) + + for lib_file in lib_srcs: + self.update_lib_id_link(self.merge_ncurses_install_dir(platform_triple, 'lib'), lib_file) + + # Clear historical libraries + for lib in lib_dsts: + if os.path.exists(lib): + os.remove(lib) + + for lib_src in lib_srcs: + self.check_copy_file(lib_src, lib_dst_path) + + def copy_libedit_to_llvm(self, platform_triple, install_dir): + self.logger().info('LlvmPackage copy_libedit_to_llvm install_dir is %s', install_dir) + + if self.host_is_darwin(): + shlib_ext = '.0.dylib' + if self.host_is_linux(): + shlib_ext = '.so.0' + + libedit_lib_path = self.merge_libedit_install_dir(platform_triple, 'lib') + libedit_src = os.path.join(libedit_lib_path, 'libedit%s' % shlib_ext) + + lib_dst_path = os.path.join(install_dir, 'lib') + + libedit_dst = os.path.join(lib_dst_path, 'libedit%s' % shlib_ext) + + if not os.path.exists(lib_dst_path): + os.makedirs(lib_dst_path) + + self.update_lib_id_link(libedit_lib_path, libedit_src) + + # Clear historical library + if os.path.exists(libedit_dst): + os.remove(libedit_dst) + + self.check_copy_file(libedit_src, lib_dst_path) + + def copy_wrappers(self, bin_dir): + for sh_filename in os.listdir(os.path.join(self.build_config.LLVM_BUILD_DIR, 'wrappers')): + shutil.copy(os.path.join(self.build_config.LLVM_BUILD_DIR, 'wrappers', sh_filename), + bin_dir) + st = os.stat(os.path.join(bin_dir, sh_filename)) + os.chmod(os.path.join(bin_dir, sh_filename), st.st_mode | stat.S_IEXEC | stat.S_IXGRP | stat.S_IXOTH) + + def copy_libxml2_to_llvm(self, platform_triple, install_dir): + self.logger().info('LlvmPackage copy_libxml2_to_llvm install_dir is %s', install_dir) + + libxml2_version = self.get_libxml2_version() + if libxml2_version is not None: + if self.host_is_darwin(): + shlib_ext = f'.{libxml2_version}.dylib' + if self.host_is_linux(): + shlib_ext = f'.so.{libxml2_version}' + + lib_path = self.merge_libxml2_install_dir(platform_triple, 'lib') + libxml2_src = os.path.join(lib_path, 'libxml2%s' % shlib_ext) + + lib_dst_path = os.path.join(install_dir, 'lib') + + libxml2_dst = os.path.join(lib_dst_path, 'libxml2%s' % shlib_ext) + + if not os.path.exists(lib_dst_path): + os.makedirs(lib_dst_path) + + self.update_lib_id_link(lib_path, libxml2_src) + + # Clear historical library + if os.path.isfile(libxml2_dst): + os.remove(libxml2_dst) + + self.check_copy_file(libxml2_src, lib_dst_path) + + def copy_lzma_to_llvm(self, platform_triple, install_dir): + self.logger().info('copy_lzma_to_llvm install_dir is %s', install_dir) + + if self.host_is_darwin(): + shlib_ext = [f'.{self.build_config.LZMA_VERSION}.dylib'] + if self.host_is_linux(): + shlib_ext = ['.so'] + lzma_file = [self.merge_install_dir('lzma', platform_triple, 'lib', + f'liblzma{ext}') for ext in shlib_ext] + + lib_dst_path = os.path.join(install_dir, 'lib') + if not os.path.exists(lib_dst_path): + os.makedirs(lib_dst_path) + + for file in lzma_file: + self.check_copy_file(file, lib_dst_path) + + # Packing Operation. + + def package_operation(self, build_dir, host): + + self.logger().info('Packaging for other environments.') + package_name = 'clang-%s' % self.build_config.build_name + self.set_clang_version(build_dir) + + if host.startswith('windows'): + ext = '.exe' + shlib_ext = '.dll' + elif host.startswith('linux') or host.startswith('ohos'): + ext = '' + shlib_ext = '.so' + else: + ext = '' + shlib_ext = '.dylib' + + install_dir = self.merge_out_path('install', host, package_name) + bin_dir = os.path.join(install_dir, 'bin') + lib_dir = os.path.join(install_dir, 'lib') + install_host_dir = os.path.abspath(os.path.join(install_dir, '../')) + self.check_rm_tree(install_host_dir) + self.check_copy_tree(build_dir, install_dir) + # copy readme file to install_dir + shutil.copyfile(os.path.join(self.build_config.LLVM_BUILD_DIR, "toolchain_readme.md"), + os.path.join(install_dir, "README.md")) + + # Generate manifest in install_dir + manifest = os.path.join(install_dir, 'manifest.xml') + repo_tool = os.path.join(self.build_config.REPOROOT_DIR, '.repo', 'repo', 'repo') + if os.path.isfile(repo_tool): + self.logger().info('Generating manifest.') + subprocess.run(['python3', repo_tool, 'manifest', '-r', '-o', manifest], shell=False, + stdout=subprocess.PIPE, cwd=self.build_config.REPOROOT_DIR) + else: + self.logger().error('Cannot generate manifest, repo tool not found.') + + # Remove unnecessary binaries. + necessary_bin_files = [] + self.package_clang_bin_file(necessary_bin_files, ext) + self.package_lldb_bin_file(necessary_bin_files, ext) + self.package_llvm_bin_file(necessary_bin_files, ext) + self.package_scan_bin_file(necessary_bin_files, ext) + + self.remove_unnecessary_bin(necessary_bin_files, host, lib_dir, install_dir, ext, shlib_ext) + + # Scripts that should not be stripped + script_bins = ['git-clang-format', 'scan-build', 'scan-view'] + + # Bin files should be stripped with -x args when host=darwin + self.strip_install_file(bin_dir, necessary_bin_files, script_bins, host) + + # Strip lldb-server + self.strip_lldb_server(host, install_dir) + + # Copy lldb script + lldb_script_file = 'lldb.cmd' if host.startswith('windows') else 'lldb.sh' + self.check_copy_file(os.path.join(self.build_config.LLVM_PROJECT_DIR, 'lldb', 'scripts', lldb_script_file), os.path.join(install_dir, 'bin')) + + lldb_script_python_path = os.path.join(self.build_config.LLVM_PROJECT_DIR, 'lldb', 'scripts', 'lldb_python.py') + + self.check_create_dir(os.path.join(install_dir, 'script')) + + self.check_copy_file(lldb_script_python_path, os.path.join(install_dir, 'script')) + + # Separate compiler-rt and libcxx in Linux + if host.startswith('linux') and self.build_config.separate_libs: + arch_list = [ + #self.liteos_triple('arm'), self.open_ohos_triple('arm'), + self.open_ohos_triple('aarch64'), + #self.open_ohos_triple('riscv64'), + #self.open_ohos_triple('mipsel'), + self.open_ohos_triple('x86_64') + #self.open_ohos_triple('loongarch64'), + ] + compiler_rt_package_name = 'compiler-rt-%s' % self.build_config.build_name + libcxx_package_name = 'libcxx-%s' % self.build_config.build_name + compiler_rt_install_dir = self.merge_out_path('install', compiler_rt_package_name, 'clang') + libcxx_install_dir = self.merge_out_path('install', libcxx_package_name) + compiler_rt_dir = os.path.join(lib_dir, 'clang') + self.check_copy_tree(compiler_rt_dir, compiler_rt_install_dir) + self.check_rm_tree(compiler_rt_dir) + for dir_name in arch_list: + dir_path = os.path.join(lib_dir, dir_name) + crt_install_path = os.path.join(libcxx_install_dir, dir_name) + self.check_copy_tree(dir_path, crt_install_path) + self.check_rm_tree(dir_path) + + self.package_up_resulting(libcxx_package_name, host, self.merge_out_path('install')) + self.package_up_resulting(compiler_rt_package_name, host, self.merge_out_path('install')) + for necessary_bin_file in necessary_bin_files: + if not os.path.isfile(os.path.join(bin_dir, necessary_bin_file)): + print('Did not find %s in %s' % (necessary_bin_file, bin_dir)) + raise RuntimeError('Did not find %s in %s' % (necessary_bin_file, bin_dir)) + + + self.notice_prebuilts_file(host, self.package_license_project_tuple(), install_dir) + + self.copy_wrappers(bin_dir) + + create_tar = True + if create_tar: + self.package_up_resulting(package_name, host, install_host_dir) + return + + +def main(): + build_config = BuildConfig() + build_utils = BuildUtils(build_config) + sysroot_composer = SysrootComposer(build_config) + llvm_core = LlvmCore(build_config) + llvm_package = LlvmPackage(build_config) + llvm_libs = LlvmLibs(build_config, sysroot_composer, llvm_package) + + args = build_config.parse_args() + need_host = build_utils.host_is_darwin() or ('linux' not in args.no_build) + need_windows = build_utils.host_is_linux() and not build_utils.host_is_linux_aarch64() and \ + not build_config.build_only and ('windows' not in args.no_build) + + llvm_install = build_utils.merge_out_path('llvm-install') + llvm_make = build_utils.merge_out_path('llvm_make') + windows64_install = build_utils.merge_out_path('windows-x86_64-install') + llvm_path = llvm_install if not build_config.build_only else \ + os.path.join(build_config.buildtools_path, 'clang', 'ohos', 'linux-x86_64', f'clang-{build_config.CLANG_VERSION}') + + configs = [] + #if not build_config.no_build_arm: + # configs.append(('arm', build_utils.liteos_triple('arm'))) + # configs.append(('arm', build_utils.open_ohos_triple('arm'))) + + if not build_config.no_build_aarch64: + configs.append(('arm64', build_utils.open_ohos_triple('aarch64'))) + + #if not build_config.no_build_riscv64: + # configs.append(('riscv', build_utils.open_ohos_triple('riscv64'))) + + #if not build_config.no_build_mipsel: + # configs.append(('mipsel', build_utils.open_ohos_triple('mipsel'))) + + if not build_config.no_build_x86_64: + configs.append(('x86_64', build_utils.open_ohos_triple('x86_64'))) + + #if not build_config.no_build_loongarch64: + # configs.append(('loongarch64', build_utils.open_ohos_triple('loongarch64'))) + + build_config.NCURSES_VERSION = build_utils.get_ncurses_version() + if build_config.NCURSES_VERSION is None: + raise Exception('NCURSES version information not found, please check if the ncurses.spec file exists') + if build_config.build_ncurses: + llvm_libs.build_ncurses(llvm_make, llvm_install, build_utils.use_platform()) + + build_config.LZMA_VERSION = build_utils.get_lzma_version() + if build_config.LZMA_VERSION is None: + raise Exception('Lzma version information not found, please check if the 7zVersion.h file exists') + if build_config.enable_lzma_7zip: + llvm_libs.build_lzma(llvm_make, llvm_install, build_utils.use_platform()) + + build_config.LIBEDIT_VERSION = build_utils.get_libedit_version() + if build_config.LIBEDIT_VERSION is None: + raise Exception('LIBEDIT version information not found, please check if the libedit.spec file exists') + if build_config.build_libedit: + llvm_libs.build_libedit(llvm_make, llvm_install, build_utils.use_platform()) + + build_config.LIBXML2_VERSION = build_utils.get_libxml2_version() + if build_config.LIBXML2_VERSION is None: + raise Exception('LIBXML2 version information not found, please check if the libxml2.spec file exists') + if build_config.build_libxml2: + llvm_libs.build_libxml2(build_utils.use_platform(), llvm_make, llvm_install) + + if build_config.do_build and need_host and (build_config.build_only_llvm or not build_config.build_only): + llvm_core.llvm_compile( + build_config.build_name, + llvm_install, + build_config.debug, + build_config.no_lto, + build_config.build_instrumented, + build_config.build_only_llvm, + build_config.xunit_xml_output, + build_config.build_xvm) + python_dir = llvm_core.get_python_dir() + llvm_package.copy_python_to_host(python_dir, llvm_make) + llvm_package.copy_python_to_host(python_dir, llvm_install) + + llvm_core.set_clang_version(llvm_path) + + if build_config.build_libs and not build_config.build_only: + libs_type = 'crts' if 'crts' in build_config.build_libs else 'runtimes' + is_first_time = True if build_config.build_libs in ['crts_first_time', 'runtimes_libunwind'] else False + is_ndk_install = True if build_config.build_libs == 'runtimes_libcxx_ndk' else False + + for (_, target) in configs: + llvm_libs.build_libs_by_type(llvm_install, target, libs_type, is_first_time, is_ndk_install) + return + + if build_config.do_build and build_utils.host_is_linux() and not build_config.build_only: + sysroot_composer.setup_cmake_platform(llvm_install) + llvm_libs.build_crt_libs(configs, llvm_install) + + if build_config.need_libs: + if build_config.build_libs_with_hb: + llvm_libs.run_hb_build_libs('runtimes_libunwind') + llvm_libs.run_hb_build_libs('runtimes_libcxx') + llvm_libs.run_hb_build_libs('runtimes_libcxx_ndk') + llvm_libs.run_hb_build_libs('crts_not_first_time') + else: + for (arch, target) in configs: + llvm_libs.build_libs(llvm_install, target) + if build_config.enable_check_abi: + has_diff = llvm_libs.run_abi_checks(build_config.enable_check_abi, llvm_install, configs) + if has_diff: + print("Build is interrupted because of libCxx ABI changed") + return + + if build_config.build_only: + sysroot_composer.setup_cmake_platform(llvm_install) + if "musl" in build_config.build_only_libs: + # change compiller path to prebuilds in clang.gni file + clang_gni = os.path.join(build_config.REPOROOT_DIR, "build", "config", "clang", "clang.gni") + clang_gni_tmp = f"{clang_gni}_tmp" + shutil.move(clang_gni, clang_gni_tmp) + with open(clang_gni_tmp, 'r') as f1: + data = f1.read() + with open(clang_gni, 'w') as f2: + data = data.replace("//out/llvm-install", "${toolchains_dir}/${host_platform_dir}/" + f"clang-{build_config.CLANG_VERSION}") + f2.write(data) + # build musl + for (arch, target) in configs: + sysroot_composer.build_musl_header(arch, target) + sysroot_composer.build_musl(arch, target) + # return original version of clang.gni + shutil.move(clang_gni_tmp, clang_gni) + + if "compiler-rt" in build_config.build_only_libs: + # temporary hide cmake checks + lib_cmake = os.path.join(build_config.REPOROOT_DIR, 'prebuilts/clang/ohos', build_utils.use_platform(), + 'clang-%s' % build_config.CLANG_VERSION, "lib/cmake") + lib_cmake_tmp = f"{lib_cmake}_tmp" + if os.path.exists(lib_cmake): + shutil.move(lib_cmake, lib_cmake_tmp) + # build compiler-rt + assert os.path.exists(os.path.join(build_config.REPOROOT_DIR, "out", "sysroot")), "Error! Compiler-rt require musl!" + for (_, target) in configs: + llvm_libs.build_libs_by_type(llvm_path, llvm_install, target, 'crts', True, False) + llvm_libs.build_libs_by_type(llvm_path, llvm_install, target, 'crts', False, False) + # return original lib/cmake dir + if os.path.exists(lib_cmake_tmp): + shutil.move(lib_cmake_tmp, lib_cmake) + + if "libcxx" in build_config.build_only_libs: + assert os.path.exists(os.path.join(build_config.REPOROOT_DIR, "out", "sysroot")), "Error! Libcxx require musl!" + for (_, target) in configs: + llvm_libs.build_libs_by_type(llvm_path, llvm_install, target, 'runtimes', False, False) + + windows_python_builder = None + + if build_config.do_build and need_windows: + mingw.main(build_config.VERSION, build_config.buildtools_path) + llvm_libs.build_runtimes_for_windows(build_config.enable_assertions) + + if build_config.build_libxml2: + llvm_libs.build_libxml2_for_windows(windows64_install) + + if build_config.build_python: + # Use just built LLVM and MinGW-w64 to cross-compile Python + windows_python_builder = MinGWPythonBuilder(build_config) + windows_python_builder.build() + windows_python_builder.prepare_for_package() + llvm_core.set_mingw_python_dir(windows_python_builder.install_dir) + mingw_python_dir = llvm_core.get_mingw_python_dir() + llvm_package.copy_python_to_host(mingw_python_dir, build_utils.merge_out_path('windows-x86_64')) + llvm_package.copy_python_to_host(mingw_python_dir, windows64_install) + + if build_config.enable_lzma_7zip: + build_utils.logger().info('build windows lzma') + target_triple = 'windows-x86_64' + llvm_libs.build_lzma(build_utils.merge_out_path(target_triple), windows64_install, target_triple) + + llvm_core.llvm_compile_for_windows(build_config.TARGETS, + build_config.enable_assertions, + build_config.build_name) + + if build_config.build_gtest_libs: + llvm_libs.build_gtest(llvm_path, llvm_install) + + if build_config.do_package: + if build_utils.host_is_linux(): + llvm_package.package_libcxx() + llvm_package.package_operation(llvm_install, build_utils.use_platform()) + + if build_config.build_python and windows_python_builder: + llvm_package.set_mingw_python_dir(windows_python_builder.install_dir) + + if need_windows: + llvm_package.package_operation(windows64_install, 'windows-x86_64') + + if build_config.build_clean: + build_utils.rm_build_output() + +if __name__ == '__main__': + main() diff --git a/llvm-build/build_libedit.sh b/llvm-build/build_libedit.sh new file mode 100755 index 0000000000000000000000000000000000000000..86dfbb43e4d1587c8afb33fb6a91dd372910f4db --- /dev/null +++ b/llvm-build/build_libedit.sh @@ -0,0 +1,111 @@ +#!/bin/bash +set -xe + +# This script is used to create libedit + +SCRIPT_PATH="${PWD}" +LIBEDIT_SRC_DIR=$1 +LIBEDIT_BUILD_PATH=$2 +LIBEDIT_INSTALL_PATH=$3 +NCURSES_PATH=$4 +PREBUILT_PATH=$5 +CLANG_VERSION=$6 +TARGET=$7 +LIBEDIT_UNTAR_PATH=$8 + +# Get version and date form libedit.spec (Compatible with Linux and Mac) +# The format in the libedit.spec is as follows: +# Version: 3.1 +# %global _date 20210910 +SPECFILE="${LIBEDIT_SRC_DIR}/libedit.spec" +LIBEDIT_VERSION=$(grep -E '^Version:*' ${SPECFILE} | awk '{print $2}') +DATE=$(grep -E '^%global _date' ${SPECFILE} | sed 's/^.*\(20[0-9]\{6\}\).*$/\1/') + +case $(uname -s) in + Linux) + + host_platform=linux + ;; + Darwin) + host_platform=darwin + ;; + *) + echo "Unsupported host platform: $(uname -s)" + exit 1 +esac + +case $(uname -m) in + arm64) + + host_cpu=arm64 + ;; + *) + host_cpu=x86_64 +esac + +CC_PATH=${PREBUILT_PATH}/clang/ohos/${host_platform}-${host_cpu}/clang-${CLANG_VERSION}/bin/clang +CXX_PATH=${PREBUILT_PATH}/clang/ohos/${host_platform}-${host_cpu}/clang-${CLANG_VERSION}/bin/clang++ + +libedit_package=${LIBEDIT_SRC_DIR}/libedit-${DATE}-${LIBEDIT_VERSION}.tar.gz +if [ -e ${libedit_package} ]; then + if [ ! -b ${LIBEDIT_UNTAR_PATH} ]; then + mkdir -p ${LIBEDIT_UNTAR_PATH} + fi + tar -xzvf ${libedit_package} --strip-components 1 -C ${LIBEDIT_UNTAR_PATH} + cd ${LIBEDIT_UNTAR_PATH} + + if [ ! -b ${LIBEDIT_BUILD_PATH} ]; then + mkdir -p ${LIBEDIT_BUILD_PATH} + fi + patches=($(grep -E '^Patch[0-9]+:' "${SPECFILE}" | sed 's/^[^:]*: *//')) + # Apply patches in order + for patch in "${patches[@]}" + do + patch -Np1 < ${LIBEDIT_SRC_DIR}/$patch + done + + # build libedit + cd ${LIBEDIT_BUILD_PATH} + ohos_suffix='-ohos' + stack_flags="-fstack-protector-strong" + got_ldflags="-Wl,-z,relro,-z,now -Wl,-z,noexecstack" + if [[ ${TARGET} != *${ohos_suffix} ]]; then + ldflags="-L${NCURSES_PATH}/lib" + ncuses_flags="-I${NCURSES_PATH}/include" + if [ "${host_platform}" = "darwin" ]; then + ncurses_libs="-Wl,-rpath,@loader_path/../lib:${NCURSES_PATH}/lib" + SDKROOT=$(xcrun --sdk macosx --show-sdk-path) + sdk_flags="-I${SDKROOT}/usr/include" + export LDFLAGS="$LDFLAGS $sdk_flags $ldflags $ncurses_libs" + export CFLAGS="$CFLAGS -isysroot$SDKROOT $ncuses_flags $stack_flags" + fi + + if [ "${host_platform}" = "linux" ]; then + ncurses_libs="-Wl,-rpath,\$$ORIGIN/../lib:${NCURSES_PATH}/lib" + export LDFLAGS="$LDFLAGS $ldflags $ncuses_flags $ncurses_libs $got_ldflags" + export CFLAGS="$CFLAGS $ncuses_flags $stack_flags" + fi + + ${LIBEDIT_UNTAR_PATH}/configure \ + --prefix=${LIBEDIT_INSTALL_PATH} \ + CC=${CC_PATH} \ + CXX=${CXX_PATH} + make -j$(nproc --all) install | tee build_libedit.log + else + C_FLAGS="-I${NCURSES_PATH}/include/ -I${NCURSES_PATH}/include/ncurses -D__STDC_ISO_10646__=201103L -fPIC" + if [[ ${TARGET} =~ 'arm' ]]; then + C_FLAGS="$C_FLAGS -march=armv7-a -mfloat-abi=soft" + fi + C_FLAGS="$C_FLAGS $stack_flags" + ${LIBEDIT_UNTAR_PATH}/configure \ + --prefix=${LIBEDIT_INSTALL_PATH} \ + --host="${TARGET}" \ + CC="${PREBUILT_PATH}/../out/llvm-install/bin/clang --target=${TARGET}" \ + CFLAGS="${C_FLAGS}" \ + LDFLAGS="-L${NCURSES_PATH}/lib $got_ldflags" + + make -j$(nproc --all) install | tee build_libedit_${TARGET}.log + fi +fi + + diff --git a/llvm-build/build_musl.sh b/llvm-build/build_musl.sh new file mode 100755 index 0000000000000000000000000000000000000000..39a0d23ac89363cfec0565bc91b237dc8e22311f --- /dev/null +++ b/llvm-build/build_musl.sh @@ -0,0 +1,126 @@ +#!/bin/bash +# Copyright (C) 2021 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. +set -e + +# This script is used to create musl's libc.so. + +#default variables +CLANG_BIN_ROOT="${PWD}/../../out/install/linux-x86_64/clang-dev/bin/" +TARGET_TRIPLE="" +TOPDIR="${PWD}/../.." +OUT="${PWD}/../../out" +make_libs=0 + +#argument parser +while getopts "c:t:T:o:lh" arg +do + case "${arg}" in + "c") + CLANG_BIN_ROOT=${OPTARG} + ;; + "t") + TARGET_TRIPLE=${OPTARG} + ;; + "T") + TOPDIR=${OPTARG} + ;; + "o") + OUT=${OPTARG} + ;; + "l") + make_libs=1 + ;; + "h") + echo "Usage: ./build_musl.sh [OPTION]" + echo " Build C/C++ dynamic libs and runtime object" + echo " Options are:" + echo " -c Specify clang bin path" + echo " -t Specify target tripple" + echo " -T Specify top of repo tree" + echo " -o Specify the build output directory" + echo " -l Install libs" + exit 0 + ;; + ?) + echo "unkown argument" + exit 1 + ;; + esac +done + +if [ -z "${TARGET_TRIPLE}" ] +then + echo "[ERROR] Empty target triple in build_musl.sh" + exit 1 +fi + +# Canonicalize paths +CLANG_BIN_ROOT=$(readlink -f ${CLANG_BIN_ROOT}) + +CFLAGS_FOR_TARGET=("-mfloat-abi=soft" "-mfloat-abi=soft -mcpu=cortex-a7" +"-mfloat-abi=softfp -mfpu=neon-vfpv4 -mcpu=cortex-a7" "-mfloat-abi=hard -mfpu=neon-vfpv4 -mcpu=cortex-a7") + +if [ $TARGET_TRIPLE == "arm-liteos-ohos" ]; then + TARGET_USER="liteos_a_user" + TARGETS_PREFIX="arm" +elif [ $TARGET_TRIPLE == "arm-linux-ohos" ]; then + TARGET_USER="linux_user" + TARGETS_PREFIX="arm" +elif [ $TARGET_TRIPLE == "mipsel-linux-ohos" ]; then + TARGET_USER="linux_user" + TARGETS_PREFIX="mips" + CFLAGS_FOR_TARGET=(" " "-mnan=legacy") +elif [ $TARGET_TRIPLE == "riscv64-linux-ohos" ]; then + TARGET_USER="linux_user" + TARGETS_PREFIX="riscv64" +elif [ $TARGET_TRIPLE == "x86_64-linux-ohos" ]; then + TARGET_USER="linux_user" + TARGETS_PREFIX="x86_64" +elif [ $TARGET_TRIPLE == "loongarch64-linux-ohos" ]; then + TARGET_USER="linux_user" + TARGETS_PREFIX="loongarch64" +else + TARGET_USER="linux_user" + TARGETS_PREFIX="aarch64" +fi + +echo "CLANG_BIN_ROOT=${CLANG_BIN_ROOT}" +echo "ARCH=${TARGETS_PREFIX}" +echo "TARGET=${TARGET_TRIPLE}" +echo "TOPDIR=${TOPDIR}" +echo "TARGETS=${TARGET_USER}" +echo "OUT=${OUT}" +echo "SYSROOTDIR=${OUT}/sysroot" +echo "MUSLCOPYDIR=${OUT}/musl_build" + +# build musl_headers +make musl_header_install_for_${TARGET_USER} CLANG="${CLANG_BIN_ROOT}/clang" TOPDIR=${TOPDIR} \ + SYSROOTDIR=${OUT}/sysroot TARGETS=${TARGET_USER} MUSLCOPYDIR=${OUT}/musl_build TARGET=${TARGET_TRIPLE} \ + ARCH=${TARGETS_PREFIX} -f Makefile + +# build musl_libs +if ((make_libs == 1)); then + if [ $TARGET_TRIPLE == "aarch64-linux-ohos" ] || [ $TARGET_TRIPLE == "riscv64-linux-ohos" ] || \ + [ $TARGET_TRIPLE == "x86_64-linux-ohos" ] || [ $TARGET_TRIPLE == "loongarch64-linux-ohos" ]; then + make CLANG="${CLANG_BIN_ROOT}/clang" TOPDIR=${TOPDIR} SYSROOTDIR=${OUT}/sysroot MUSLCOPYDIR=${OUT}/musl_build \ + TARGETS=${TARGET_USER} TARGET=${TARGET_TRIPLE} ARCH=${TARGETS_PREFIX} -f Makefile + else + for ARCH_CFLAG in "${CFLAGS_FOR_TARGET[@]}" + do + make CLANG="${CLANG_BIN_ROOT}/clang" TOPDIR=${TOPDIR} SYSROOTDIR=${OUT}/sysroot MUSLCOPYDIR=${OUT}/musl_build \ + TARGETS=${TARGET_USER} TARGET=${TARGET_TRIPLE} ARCH=${TARGETS_PREFIX} ARCH_CFLAGS="${ARCH_CFLAG}" -f Makefile + done + fi +fi +make distclean -f Makefile diff --git a/llvm-build/build_ncurses.sh b/llvm-build/build_ncurses.sh new file mode 100755 index 0000000000000000000000000000000000000000..e143c43f1ffd6cfb3596b099e0499e5f4c527313 --- /dev/null +++ b/llvm-build/build_ncurses.sh @@ -0,0 +1,129 @@ +#!/bin/bash +set -xe + +# This script is used to create ncurses + +SCRIPT_PATH="${PWD}" +NCURSES_SRC_DIR=$1 +NCURSES_BUILD_PATH=$2 +NCURSES_INSTALL_PATH=$3 +PREBUILT_PATH=$4 +CLANG_VERSION=$5 +NCURSES_VERSION=$6 +TARGET=$7 +NCURSES_UNTAR_PATH=$8 +IS_STATIC=$9 + +SPECFILE="${NCURSES_SRC_DIR}/ncurses.spec" + +case $(uname -s) in + Linux) + + host_platform=linux + ;; + Darwin) + host_platform=darwin + ;; + *) + echo "Unsupported host platform: $(uname -s)" + exit 1 +esac + +case $(uname -m) in + arm64) + + host_cpu=arm64 + ;; + *) + host_cpu=x86_64 +esac + +CC_PATH=${PREBUILT_PATH}/clang/ohos/${host_platform}-${host_cpu}/clang-${CLANG_VERSION}/bin/clang +CXX_PATH=${PREBUILT_PATH}/clang/ohos/${host_platform}-${host_cpu}/clang-${CLANG_VERSION}/bin/clang++ + +ncurses_package=${NCURSES_SRC_DIR}/ncurses-${NCURSES_VERSION}.tar.gz +if [ -e ${ncurses_package} ]; then + if [ ! -b ${NCURSES_UNTAR_PATH} ]; then + mkdir -p ${NCURSES_UNTAR_PATH} + fi + tar -xvzf ${ncurses_package} --strip-components 1 -C ${NCURSES_UNTAR_PATH} + cd ${NCURSES_UNTAR_PATH} + + # Get the list of patch files for ncurses.spec + # The format in the ncurses.spec is as follows: + # Patch8: ncurses-config.patch + # Patch9: ncurses-libs.patch + # Patch11: ncurses-urxvt.patch + patches=($(grep -E '^Patch[0-9]+:' "${SPECFILE}" | sed 's/^[^:]*: *//')) + # Apply patches in order + for patch in "${patches[@]}" + do + patch -Np1 < ${NCURSES_SRC_DIR}/$patch + done + + if [ ! -b ${NCURSES_BUILD_PATH} ]; then + mkdir -p ${NCURSES_BUILD_PATH} + fi + cd ${NCURSES_BUILD_PATH} + # build ncurses + ohos_suffix='-ohos' + stack_flags="-fstack-protector-strong" + got_ldflags="-Wl,-z,relro,-z,now -Wl,-z,noexecstack" + if [[ ${7} != *${ohos_suffix} ]]; then + if [ "${host_platform}" == "darwin" ]; then + export LDFLAGS="-Wl,-rpath,@loader_path/../lib" + SDKROOT=$(xcrun --sdk macosx --show-sdk-path) + flags="-Wl,-syslibroot,${SDKROOT}" + export CPPFLAGS="$CPPFALGS -I${SDKROOT}/usr/include -I${SDKROOT}/usr/include/i368" + export CFLAGS="$CFLAGS -isysroot${SDKROOT} $flags $stack_flags" + + ${NCURSES_UNTAR_PATH}/configure \ + --with-shared \ + --with-default-terminfo-dir=/usr/lib/terminfo:/lib/terminfo:/usr/share/terminfo \ + --disable-mixed-case \ + --prefix=${NCURSES_INSTALL_PATH} \ + CC=${CC_PATH} \ + CXX=${CXX_PATH} + make -j$(nproc --all) install | tee build_ncurses.log + fi + if [ "${host_platform}" == "linux" ]; then + export LDFLAGS="-Wl,-rpath,\$$ORIGIN/../lib $got_ldflags" + export CFLAGS="$CFLAGS $stack_flags" + ${NCURSES_UNTAR_PATH}/configure \ + --with-shared \ + --with-default-terminfo-dir=/usr/lib/terminfo:/lib/terminfo:/usr/share/terminfo \ + --prefix=${NCURSES_INSTALL_PATH} \ + CC=${CC_PATH} \ + CXX=${CXX_PATH} + make -j$(nproc --all) install | tee build_ncurses.log + fi + else + C_FLAGS="--target=${TARGET} -fPIC" + if [[ ${TARGET} =~ 'arm' ]]; then + C_FLAGS="$C_FLAGS -march=armv7-a -mfloat-abi=soft" + fi + EXTRA_ARGS="" + C_FLAGS="$C_FLAGS $stack_flags" + export LDFLAGS="$LDFLAGS $got_ldflags" + if [[ ${IS_STATIC} == "static" ]]; then + NCURSES_HOST_INSTALL_PATH=${10} + export LD_LIBRARY_PATH="${NCURSES_HOST_INSTALL_PATH}/lib:$LD_LIBRARY_PATH" + EXTRA_ARGS="--with-fallbacks=linux,vt100,xterm \ + --with-tic-path=${NCURSES_HOST_INSTALL_PATH}/bin/tic \ + --with-infocmp-path=${NCURSES_HOST_INSTALL_PATH}/bin/infocmp" + fi + ${NCURSES_UNTAR_PATH}/configure \ + --host="${TARGET}" \ + --with-shared \ + --prefix=${NCURSES_INSTALL_PATH} \ + --with-termlib \ + --without-manpages \ + --with-strip-program="${PREBUILT_PATH}/../out/llvm-install/bin/llvm-strip" \ + ${EXTRA_ARGS} \ + CC=${PREBUILT_PATH}/../out/llvm-install/bin/clang \ + CXX=${PREBUILT_PATH}/../out/llvm-install/bin/clang++ \ + CFLAGS="${C_FLAGS}" + make -j$(nproc --all) install | tee build_ncurses_${TARGET}.log + fi +fi + diff --git a/llvm-build/checksec/.gitignore b/llvm-build/checksec/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..18be8e5a5c38042a91fa94e953312825bffcfc0f --- /dev/null +++ b/llvm-build/checksec/.gitignore @@ -0,0 +1,6 @@ +*-log +check.txt +failed_list.txt +checksec/ +checksec.sh/ + diff --git a/llvm-build/checksec/README.md b/llvm-build/checksec/README.md new file mode 100644 index 0000000000000000000000000000000000000000..485a3a92b926091fbf88dcb6753567671a884611 --- /dev/null +++ b/llvm-build/checksec/README.md @@ -0,0 +1,47 @@ +## Overview +This Readme Briefly describes the usage of run_checksec.sh to check security compilation options for binary build artifacts. + +## Usage + +Before using this script, you may need to clone the [checksec](https://github.com/slimm609/checksec) repository to the current directory (`llvm-build/checksec`) yourself. And If you previously executed run_checksec.sh and report the error `Need to look up README to use the script`, you should take the same actions. + +Then the directory structure should be as follows: +```txt +checksec (The current directory.) +├── check.py +├── checksec (the checksec repository you cloned) +│ ├── checksec (the checksec scrpt to exec in open-source checksec repository) +│ ├── ... +├── llvmsec-log +│ ├── ... +├── README.md +├── run_checksec.sh (* use it to check our binary build artifacts) +└── templates + ├── ... +``` + +Now run `run_checksec.sh` to check security compilation options for binary build artifacts. + +Use '-h/--help' to print the usage of 'run_checksec.sh': + +```shell +$ ./run_checksec.sh -h +Usage: ./run_checksec.sh [-s][-c check_dir] [-o ./llvmts-log/checksec] [OPTION] + +Options are: + -c/--check_dir check_dir: Path to the binary file that you want to check using checksec. + -o/--output_path output_path: Path to store the results of the binary security compilation option checks. + -h/--help print usage of run_checksec.sh +``` + +You can set the check directory using '-c/--check_dir' option and set the report output directory using '-o/--output_path' option: + +`./run_checksec.sh -c=~/llvm_checksec/out/llvm-install/bin -o llvmts-log/checksec` + +default running : `./run_checksec.sh` + +This will default to checking the binary compilation products under `llvm_build/../../../out/llvm-install` and output the report in `llvm-build/checksec/llvmsec-log/`. + +Finally, a visual HTML report like this will be generated through templates: + +![HTML report](./attachment/image.png) diff --git a/llvm-build/checksec/attachment/image.png b/llvm-build/checksec/attachment/image.png new file mode 100644 index 0000000000000000000000000000000000000000..e35c96053bda8c16b9386fdcc98aceccffe4427a Binary files /dev/null and b/llvm-build/checksec/attachment/image.png differ diff --git a/llvm-build/checksec/check.py b/llvm-build/checksec/check.py new file mode 100644 index 0000000000000000000000000000000000000000..a90cb53dbd5cf1cb0bba877d8c3ac5e073a47430 --- /dev/null +++ b/llvm-build/checksec/check.py @@ -0,0 +1,535 @@ +#!/usr/bin/env python3 +# 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. + +import json +import os +import time +import datetime +import argparse +import jinja2 +import subprocess +from typing import List, Dict, Union + +# Constants for check statuses +CHECK_TRUE = 'true' +CHECK_FALSE = 'false' +CHECK_PASS = 'passed' +CHECK_FAILED = 'failed' +CHECK_ITEM_NUM = 11 + +class HtmlTitle: + """Class representing summary data for the report.""" + + _start_time = 0 + _end_time = 0 + _execution_time = 0 + _total_file_num = 0 + _file_size_sum = 0 + _check_file_list_num = 0 + +def is_executable_or_library(file_name: str) -> bool: + """ + Check if the given file is an executable or library file. + + :param file_name: The name of the file to check + :return: True if the file is executable or a library, False otherwise + """ + # Check if the file exists first. + if not os.path.isfile(file_name): + return False + # Filter by file extension. + # valid_extensions = ('.out', '.bin', '.elf', '.so', '.a') + # if file_name.endswith(valid_extensions) or os.access(file_name, os.X_OK): + # return True + + # Use the file command to determine the file type. + try: + file_type = subprocess.check_output(['file', '--mime-type', file_name]).decode('utf-8').strip() + # Check if the file is an executable file, shared object file, or library file. + if 'executable' in file_type or 'shared object' in file_type or 'library' in file_type: + return True + except subprocess.CalledProcessError: + pass + + return False + +class GenerateReport: + """Class for generating HTML and JSON reports from checksec results.""" + + @staticmethod + def _generate_failed_files_html_report(output_path: str, failed_file_list: List[Dict]): + """ + Generate an HTML report for failed files. + + Args: + output_path (str): Directory where the HTML file will be saved. + failed_file_list (list): List of dictionaries containing failed file details. + """ + env = jinja2.Environment(loader = jinja2.FileSystemLoader('./templates')) + template = env.get_template('failed_files_template.html') + data = { + 'check_file_list' : failed_file_list + } + document = template.render(data) + file_path=os.path.join(output_path, 'failed files list.html') + with open(file_path, 'w', encoding='utf-8') as failed_file: + failed_file.write(document) + + @staticmethod + def _generate_total_files_html_report(output_path: str, total_file_info: List[Dict]): + """ + Generate an HTML report for all scanned files. + + Args: + output_path (str): Directory where the HTML file will be saved. + total_file_info (list): List of all files and their check details. + """ + env = jinja2.Environment(loader = jinja2.FileSystemLoader('./templates')) + template = env.get_template('total_files_template.html') + data = { + 'total_file_info' : total_file_info, + } + document = template.render(data) + file_path = os.path.join(output_path, 'total file list.html') + with open(file_path, 'w', encoding='utf-8') as total_file: + total_file.write(document) + + @staticmethod + def _generate_summary_html_report(output_path: str, check_items: List['CheckItemData'], summary_data: 'HtmlTitle', + total_file_info: List[Dict]): + """ + Generate a summary HTML report. + + Args: + output_path (str): Directory where the HTML file will be saved. + check_items (list): List of check items with results. + summary_data (HtmlTitle): Summary data of the scan. + total_file_info (list): List of all files and their check details. + """ + env = jinja2.Environment(loader = jinja2.FileSystemLoader('./templates')) + template = env.get_template('index_files_template.html') + data = { + 'summary_data' : summary_data, + 'total_file_info' : total_file_info, + 'check_items' : check_items + } + document = template.render(data) + file_path = os.path.join(output_path, 'Index.html') + with open(file_path, 'w', encoding='utf-8') as index_html_file: + index_html_file.write(document) + + @staticmethod + def _generate_failed_files_json_report(output_path: str, failed_file_list: List[Dict]): + """ + Generate a JSON report for failed files. + + Args: + output_path (str): Directory where the JSON file will be saved. + failed_file_list (list): List of failed files with details. + """ + data = { + 'check_file_list' : failed_file_list + } + json_str = json.dumps(data,indent=1) + file_path = os.path.join(output_path, 'check_file_list.json') + with open(file_path, 'w' ,encoding='utf-8') as json_file: + json_file.write(json_str) + + @staticmethod + def _generate_total_files_json_report(output_path: str, total_file_info: List[Dict]): + """ + Generate a JSON report for all scanned files. + + Args: + output_path (str): Directory where the JSON file will be saved. + total_file_info (list): List of all files and their check details. + """ + data = { + 'total_file_info' : total_file_info + } + json_str =json.dumps(data,indent=1) + file_path = os.path.join(output_path, 'total_file_list.json') + with open(file_path, 'w' ,encoding ='utf-8') as json_file: + json_file.write(json_str) + + @staticmethod + def _generate_summary_json_report(output_path: str, check_items: List['CheckItemData'], summary_data: 'HtmlTitle', + total_file_info: List[Dict]): + """ + Generate a summary JSON report. + + Args: + output_path (str): Directory where the JSON file will be saved. + check_items (list): List of check items with results. + summary_data (HtmlTitle): Summary data of the scan. + total_file_info (list): List of all files and their check details. + """ + summary_data_dict = summary_data.__dict__ + check_items_dict = {} + for i in check_items: + check_items_dict[i._name] = i.__dict__ + data = { + 'summary_data' : summary_data_dict, + 'total_file_info' : total_file_info, + 'check_items' : check_items_dict, + } + json_str = json.dumps(data ,indent=1) + file_path = os.path.join(output_path, 'Index.json') + with open(file_path, 'w',encoding='utf-8') as json_file: + json_file.write(json_str) + +class CheckItemData: + """Class representing data for a single security check item.""" + + def __init__(self, name: str, do_check: str = CHECK_FALSE, check_flag: Union[str, None] = None): + """ + Initialize a check item. + + Args: + name (str): Name of the check item. + do_check (str): Whether this check is enabled. Defaults to CHECK_FALSE. + check_flag (str | None): Expected value to compare during the check. + """ + self._name = name + self._do_check = do_check + self._check_flag = check_flag + self._passed_list = [] + self._failed_list = [] + self._passed_num = 0 + self._failed_num = 0 + +class CheckData: + """Class for handling security checks and generating check data.""" + + def __init__(self) -> None: + """ + Initialize the CheckData object with default check items. + """ + self._relro_check = CheckItemData('relro', CHECK_TRUE, 'full') + self._nx_check = CheckItemData('nx', CHECK_TRUE, 'yes') + self._rpath_check = CheckItemData('rpath', CHECK_TRUE, 'no') + self._canary_check = CheckItemData('canary') + self._pie_check = CheckItemData('pie') + self._fortify_check = CheckItemData('fortify') + self._symbols_check = CheckItemData('symbols') + self._clangcfi_check = CheckItemData('clangcfi') + self._clang_safestack_check = CheckItemData('safestack') + self._fortified_check = CheckItemData('fortified') + self._fortifiable_check = CheckItemData('fortify-able') + + def _check_security(self, check_file_path: str, check_dir: str, check_items: List[CheckItemData], + summary_data: 'HtmlTitle', file_name_list: List[str], total_file_info: List[Dict]): + """ + Perform security checks on files in a directory. + + Args: + check_file_path (str): Path to the JSON file storing file information. + check_dir (str): Directory containing the files to be checked. + check_items (list): List of CheckItemData objects representing check configurations. + summary_data (HtmlTitle): Summary data object to store aggregate information. + file_name_list (list): List to store the names of checked files. + total_file_info (list): List to store detailed information about all files. + """ + check_path=check_dir + if not os.path.exists(check_path): + print("check error: check file is not exist") + exit() + checksec_statement = './checksec/checksec --dir={0} --extended --output=json'.format(check_path) + print(checksec_statement) + + checksec_output = json.loads(os.popen(checksec_statement).read()) + self.__generate_summary_data(checksec_output, check_items, summary_data, file_name_list, total_file_info) + + def __generate_summary_data(self, checksec_output: Dict, check_items: List[CheckItemData], + summary_data: 'HtmlTitle', file_name_list: List[str], total_file_info: List[Dict]): + """ + Generate summary data from checksec output. + + Args: + checksec_output (dict): Parsed JSON output from checksec. + check_items (list): List of CheckItemData objects representing check configurations. + summary_data (HtmlTitle): Summary data object to store aggregate information. + file_name_list (list): List to store the names of checked files. + total_file_info (list): List to store detailed information about all files. + """ + file_size_sum = 0 + for file_info in checksec_output.values(): + if 'name' not in file_info: + file_name = file_info.get('filename') + if not is_executable_or_library(file_name): # if the given file isn't an executable or library file, filter out + continue + file_name_list.append(''.join(list(key for key, value in checksec_output.items() if value == file_info))) + summary_data._total_file_num = len(file_name_list) + self.__generate_check_items_data(file_info, check_items) + file_info['file_single_size'] = get_file_size(os.path.getsize(file_info['filename'])) + file_info['fortify_able'] = file_info['fortify-able'] + total_file_info.append(file_info) + for check_item in check_items: + check_item._passed_num = len(check_item._passed_list) + check_item._failed_num = len(check_item._failed_list) + for file_name in file_name_list: + file_size_sum += os.path.getsize(file_name) + summary_data._file_size_sum = get_file_size(file_size_sum) + + def __generate_check_items_data(self, file_info: Dict, check_items: List[CheckItemData]): + """ + Populate check item results for a single file. + + Args: + file_info (dict): Information about a single file. + check_items (list): List of CheckItemData objects representing check configurations. + """ + for i in range(0, CHECK_ITEM_NUM): + if check_items[i]._do_check == CHECK_TRUE: + if check_items[i]._check_flag == list(file_info.values())[i]: + check_items[i]._passed_list.append(file_info['filename']) + else: + check_items[i]._failed_list.append(file_info['filename']) + else: + check_items[i]._passed_list.append(file_info['filename']) + + def _generate_failed_files_data(self, check_items: List[CheckItemData], summary_data: 'HtmlTitle', + file_name_list: List[str], failed_file_list: List[Dict]): + """ + Generate data for files that failed security checks. + + Args: + check_items (list): List of CheckItemData objects representing check configurations. + summary_data (HtmlTitle): Summary data object to store aggregate information. + file_name_list (list): List of all checked file names. + failed_file_list (list): List to store information about failed files. + """ + for file_name in file_name_list: + if not is_executable_or_library(file_name): #if the given file isn't an executable or library file, filter out + continue + file_info = {} + file_info['file_name'] = file_name + for check_item in check_items: + if file_name in check_item._failed_list: + if check_item._name == 'fortify-able': + file_info['fortifiable'] = CHECK_FAILED + else: + file_info[check_item._name] = CHECK_FAILED + else: + if check_item._name == 'fortify-able': + file_info['fortifiable'] = CHECK_PASS + else: + file_info[check_item._name] = CHECK_PASS + if CHECK_FAILED in file_info.values(): + failed_file_list.append(file_info) + summary_data._check_file_list_num = len(failed_file_list) + + +def generate_failed_list(failed_file_list: List[Dict]): + """ + Generates a text file named 'failed_list.txt' containing details of files that failed checks. + + Args: + failed_file_list (list[dict]): A list of dictionaries containing failed file information. + """ + if os.path.isfile('failed_list.txt'): + os.system('rm failed_list.txt') + if len(failed_file_list) != 0: + with open('failed_list.txt', 'w') as txt_file: + for failed_file_info in failed_file_list: + txt_file.write('{}\n'.format(failed_file_info)) + +def get_file_size(file_size: int) -> str: + """ + Format file size into human-readable format. + + Args: + file_size (int): File size in bytes. + + Returns: + str: File size as a human-readable string. + """ + if file_size < 1024: + return str(round(file_size, 2)) + 'B' + else: + file_size /= 1024 + if file_size < 1024: + return str(round(file_size, 2)) + 'K' + else: + file_size /= 1024 + if file_size < 1024: + return str(round(file_size, 2)) + 'M' + else: + file_size /= 1024 + return str(round(file_size, 2)) + 'G' + +def update_attributes(args: argparse.Namespace, check_items: List[CheckItemData]): + """ + Updates the attributes of check items based on arguments. + + Args: + args (argparse.Namespace): Parsed arguments. + check_items (list[CheckItemData]): List of security check items to update. + """ + if args.relro: + check_items[0]._do_check = CHECK_TRUE + check_items[0]._check_flag = args.relro + if args.canary: + check_items[1]._do_check = CHECK_TRUE + check_items[1]._check_flag = args.canary + if args.nx: + check_items[2]._do_check = CHECK_TRUE + check_items[2]._check_flag = args.nx + if args.pie: + check_items[3]._do_check = CHECK_TRUE + check_items[3]._check_flag = args.pie + if args.Clang_Cfi: + check_items[4]._do_check = CHECK_TRUE + check_items[4]._check_flag = args.Clang_Cfi + if args.safestack: + check_items[5]._do_check = CHECK_TRUE + check_items[5]._check_flag = args.safestack + if args.rpath: + check_items[6]._do_check = CHECK_TRUE + check_items[6]._check_flag = args.rpath + if args.symbols: + check_items[7]._do_check = CHECK_TRUE + check_items[7]._check_flag = args.symbols + if args.fortity: + check_items[8]._do_check = CHECK_TRUE + check_items[8]._check_flag = args.fortity + if args.fortified: + check_items[9]._do_check = CHECK_TRUE + check_items[9]._check_flag = args.fortified + if args.fortifiable: + check_items[10]._do_check = CHECK_TRUE + check_items[10]._check_flag = args.fortifiable + +def add_parse() -> argparse.Namespace: + """ + Parse command-line arguments. + + Returns: + argparse.Namespace: The parsed command-line arguments. + """ + parser = argparse.ArgumentParser() + parser.add_argument( + '--check_dir', + required = True, + type = str, + help='check_dir') + + parser.add_argument( + '--output_path', + required = True, + type = str, + help='output path to save the report') + + parser.add_argument( + '--relro', + type = str, + help = 'set relro expected value and compare actual value with expected value') + + parser.add_argument( + '--nx', + type = str, + help = 'set nx expected value and compare actual value with expected value') + + parser.add_argument( + '--rpath', + type = str, + help = 'set rpath expected value and compare actual value with expected value') + + parser.add_argument( + '--canary', + type = str, + help = 'set canary expected value and compare actual value with expected value') + + parser.add_argument( + '--pie', + type = str, + help = 'set pie expected value and compare actual value with expected value') + + parser.add_argument( + '--symbols', + type = str, + help = 'set symbols expected value and compare actual value with expected value') + + parser.add_argument( + '--fortity', + type = str, + help = 'set fortity expected value and compare actual value with expected value') + + parser.add_argument( + '--safestack', + type = str, + help = 'set safestack expected value and compare actual value with expected value') + + parser.add_argument( + '--Clang_Cfi', + type = str, + help = 'set Clang-Cfi expected value and compare actual value with expected value') + + parser.add_argument( + '--fortified', + type = str, + help = 'set fortified expected value and compare actual value with expected value') + + parser.add_argument( + '--fortifiable', + type = str, + help = 'set fortify-able expected value and compare actual value with expected value') + return parser.parse_args() + +def main(): + """ + Main function to execute the security check process and generate reports. + """ + start_time = time.time() + summary_data = HtmlTitle() + summary_data._start_time = datetime.datetime.now().strftime('%Y/%m/%d %H:%M:%S') + check_file_path = 'check_file_path.json' + args=add_parse() + output_path = args.output_path + + check_dir = args.check_dir + if check_dir[-1] == '/': + check_dir = check_dir[:-1] + + check_data = CheckData() + check_items = [check_data._relro_check, check_data._canary_check, check_data._nx_check, check_data._pie_check, + check_data._clangcfi_check, check_data._clang_safestack_check, check_data._rpath_check, check_data._symbols_check, + check_data._fortify_check, check_data._fortified_check, check_data._fortifiable_check] + update_attributes(args, check_items) + file_name_list = [] + failed_file_list = [] + total_file_info = [] + check_data._check_security(check_file_path, check_dir, check_items, summary_data, file_name_list, total_file_info) + check_data._generate_failed_files_data(check_items, summary_data, file_name_list, failed_file_list) + + summary_data._end_time = datetime.datetime.now().strftime('%Y/%m/%d %H:%M:%S') + end_time = time.time() + run_time = round(end_time - start_time, 2) + summary_data._execution_time = str(run_time) + 's' + if output_path[-1] != '/': + output_path = os.path.join(output_path, '') + report = GenerateReport() + report._generate_summary_html_report(output_path, check_items, summary_data, total_file_info) + report._generate_total_files_html_report(output_path, total_file_info) + report._generate_failed_files_html_report(output_path, failed_file_list) + + report._generate_summary_json_report(output_path, check_items, summary_data, total_file_info) + report._generate_total_files_json_report(output_path, total_file_info) + report._generate_failed_files_json_report(output_path, failed_file_list) + + generate_failed_list(failed_file_list) + +if __name__ == '__main__': + main() diff --git a/llvm-build/checksec/run_checksec.sh b/llvm-build/checksec/run_checksec.sh new file mode 100755 index 0000000000000000000000000000000000000000..2ecebaaef8b12a171eaaab68429fd06ff08041db --- /dev/null +++ b/llvm-build/checksec/run_checksec.sh @@ -0,0 +1,84 @@ +#!/bin/bash +# 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. +WORK_DIR=$(dirname "$(realpath "$0")") +check_dir="" +output_path="" +while [[ $# -gt 0 ]]; do + case $1 in + # set the check directory + -c|--check_dir) + check_dir="$(realpath "$2")" + shift 2 + ;; + # set the report output directory + -o|--output_path) + output_path="$(realpath "$2")" + shift 2 + ;; + # print the usage of 'run_checksec.sh' + -h|--help) + echo "Usage: ./run_checksec.sh [-s][-c check_dir] [-o ./llvmts-log/checksec] [OPTION]" + echo + echo "Options are:" + echo " -c/--check_dir check_dir: Path to the binary file that you want to check using checksec." + echo " -o/--output_path output_path: Path to store the results of the binary security compilation option checks." + echo " -h/--help print usage of run_checksec.sh" + exit 0 + ;; + # other unsupport option + *) + echo "Illegal option $1" + exit 1 + ;; + esac +done + +# If --check_dir/-c is not provided, use the default value +default_check_dir="$(realpath "${WORK_DIR}/../../../../out/llvm-install")" # default check path +if [ -z "$check_dir" ]; then + check_dir="$default_check_dir" +fi + +TIME=$(date +%Y%m%d%H%M) +time_dir=$(date +%Y-%m-%d-%H-%M) +# If --output_path/-o is not provided, use the default value +default_output_path="${WORK_DIR}/llvmsec-log" +if [ -z "$output_path" ]; then + output_path="$default_output_path" +fi +llvmts_logdir="${output_path}/${time_dir}/" + +echo "The check path is ${check_dir}" +echo "The check result report is stored in ${llvmts_logdir}" +echo "run checksec test" +# run check.py to run ./checksec/checksec +cd ${WORK_DIR} +if [ ! -d "checksec" ]; then + echo "Need to look up README to use the script." + exit 1 +fi +mkdir -p ${llvmts_logdir} +python3 ${WORK_DIR}/check.py --check_dir ${check_dir} --output_path ${llvmts_logdir} 2>&1 | tee ${WORK_DIR}/check.txt +cp ${WORK_DIR}/templates/bootstrap.bundle.min.js ${llvmts_logdir} +cp ${WORK_DIR}/templates/jquery.min.js ${llvmts_logdir} +cp -r ${WORK_DIR}/templates/css ${llvmts_logdir} +cp -r ${WORK_DIR}/templates/fonts ${llvmts_logdir} +if (grep -q "check error" ${WORK_DIR}/check.txt); then + exit 1 +fi +if [ -f ${WORK_DIR}/failed_list.txt ];then + echo exist failed files + exit 1 +fi diff --git a/llvm-build/checksec/templates/bootstrap.bundle.min.js b/llvm-build/checksec/templates/bootstrap.bundle.min.js new file mode 100644 index 0000000000000000000000000000000000000000..7961bdaf8e0e91721bc5832cdca1df128bad1b27 --- /dev/null +++ b/llvm-build/checksec/templates/bootstrap.bundle.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap v4.6.0 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery")):"function"==typeof define&&define.amd?define(["exports","jquery"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap={},t.jQuery)}(this,(function(t,e){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i=n(e);function o(t,e){for(var n=0;n=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};l.jQueryDetection(),i.default.fn.emulateTransitionEnd=s,i.default.event.special[l.TRANSITION_END]={bindType:"transitionend",delegateType:"transitionend",handle:function(t){if(i.default(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var u="alert",f=i.default.fn[u],d=function(){function t(t){this._element=t}var e=t.prototype;return e.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},e.dispose=function(){i.default.removeData(this._element,"bs.alert"),this._element=null},e._getRootElement=function(t){var e=l.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n||(n=i.default(t).closest(".alert")[0]),n},e._triggerCloseEvent=function(t){var e=i.default.Event("close.bs.alert");return i.default(t).trigger(e),e},e._removeElement=function(t){var e=this;if(i.default(t).removeClass("show"),i.default(t).hasClass("fade")){var n=l.getTransitionDurationFromElement(t);i.default(t).one(l.TRANSITION_END,(function(n){return e._destroyElement(t,n)})).emulateTransitionEnd(n)}else this._destroyElement(t)},e._destroyElement=function(t){i.default(t).detach().trigger("closed.bs.alert").remove()},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data("bs.alert");o||(o=new t(this),n.data("bs.alert",o)),"close"===e&&o[e](this)}))},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},r(t,null,[{key:"VERSION",get:function(){return"4.6.0"}}]),t}();i.default(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',d._handleDismiss(new d)),i.default.fn[u]=d._jQueryInterface,i.default.fn[u].Constructor=d,i.default.fn[u].noConflict=function(){return i.default.fn[u]=f,d._jQueryInterface};var c=i.default.fn.button,h=function(){function t(t){this._element=t,this.shouldAvoidTriggerChange=!1}var e=t.prototype;return e.toggle=function(){var t=!0,e=!0,n=i.default(this._element).closest('[data-toggle="buttons"]')[0];if(n){var o=this._element.querySelector('input:not([type="hidden"])');if(o){if("radio"===o.type)if(o.checked&&this._element.classList.contains("active"))t=!1;else{var r=n.querySelector(".active");r&&i.default(r).removeClass("active")}t&&("checkbox"!==o.type&&"radio"!==o.type||(o.checked=!this._element.classList.contains("active")),this.shouldAvoidTriggerChange||i.default(o).trigger("change")),o.focus(),e=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(e&&this._element.setAttribute("aria-pressed",!this._element.classList.contains("active")),t&&i.default(this._element).toggleClass("active"))},e.dispose=function(){i.default.removeData(this._element,"bs.button"),this._element=null},t._jQueryInterface=function(e,n){return this.each((function(){var o=i.default(this),r=o.data("bs.button");r||(r=new t(this),o.data("bs.button",r)),r.shouldAvoidTriggerChange=n,"toggle"===e&&r[e]()}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.0"}}]),t}();i.default(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var e=t.target,n=e;if(i.default(e).hasClass("btn")||(e=i.default(e).closest(".btn")[0]),!e||e.hasAttribute("disabled")||e.classList.contains("disabled"))t.preventDefault();else{var o=e.querySelector('input:not([type="hidden"])');if(o&&(o.hasAttribute("disabled")||o.classList.contains("disabled")))return void t.preventDefault();"INPUT"!==n.tagName&&"LABEL"===e.tagName||h._jQueryInterface.call(i.default(e),"toggle","INPUT"===n.tagName)}})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(t){var e=i.default(t.target).closest(".btn")[0];i.default(e).toggleClass("focus",/^focus(in)?$/.test(t.type))})),i.default(window).on("load.bs.button.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')),e=0,n=t.length;e0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var e=t.prototype;return e.next=function(){this._isSliding||this._slide("next")},e.nextWhenVisible=function(){var t=i.default(this._element);!document.hidden&&t.is(":visible")&&"hidden"!==t.css("visibility")&&this.next()},e.prev=function(){this._isSliding||this._slide("prev")},e.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(".carousel-item-next, .carousel-item-prev")&&(l.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},e.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},e.to=function(t){var e=this;this._activeElement=this._element.querySelector(".active.carousel-item");var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)i.default(this._element).one("slid.bs.carousel",(function(){return e.to(t)}));else{if(n===t)return this.pause(),void this.cycle();var o=t>n?"next":"prev";this._slide(o,this._items[t])}},e.dispose=function(){i.default(this._element).off(m),i.default.removeData(this._element,"bs.carousel"),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},e._getConfig=function(t){return t=a({},v,t),l.typeCheckConfig(p,t,_),t},e._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&this.prev(),e<0&&this.next()}},e._addEventListeners=function(){var t=this;this._config.keyboard&&i.default(this._element).on("keydown.bs.carousel",(function(e){return t._keydown(e)})),"hover"===this._config.pause&&i.default(this._element).on("mouseenter.bs.carousel",(function(e){return t.pause(e)})).on("mouseleave.bs.carousel",(function(e){return t.cycle(e)})),this._config.touch&&this._addTouchEventListeners()},e._addTouchEventListeners=function(){var t=this;if(this._touchSupported){var e=function(e){t._pointerEvent&&b[e.originalEvent.pointerType.toUpperCase()]?t.touchStartX=e.originalEvent.clientX:t._pointerEvent||(t.touchStartX=e.originalEvent.touches[0].clientX)},n=function(e){t._pointerEvent&&b[e.originalEvent.pointerType.toUpperCase()]&&(t.touchDeltaX=e.originalEvent.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(e){return t.cycle(e)}),500+t._config.interval))};i.default(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel",(function(t){return t.preventDefault()})),this._pointerEvent?(i.default(this._element).on("pointerdown.bs.carousel",(function(t){return e(t)})),i.default(this._element).on("pointerup.bs.carousel",(function(t){return n(t)})),this._element.classList.add("pointer-event")):(i.default(this._element).on("touchstart.bs.carousel",(function(t){return e(t)})),i.default(this._element).on("touchmove.bs.carousel",(function(e){return function(e){e.originalEvent.touches&&e.originalEvent.touches.length>1?t.touchDeltaX=0:t.touchDeltaX=e.originalEvent.touches[0].clientX-t.touchStartX}(e)})),i.default(this._element).on("touchend.bs.carousel",(function(t){return n(t)})))}},e._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},e._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(".carousel-item")):[],this._items.indexOf(t)},e._getItemByDirection=function(t,e){var n="next"===t,i="prev"===t,o=this._getItemIndex(e),r=this._items.length-1;if((i&&0===o||n&&o===r)&&!this._config.wrap)return e;var a=(o+("prev"===t?-1:1))%this._items.length;return-1===a?this._items[this._items.length-1]:this._items[a]},e._triggerSlideEvent=function(t,e){var n=this._getItemIndex(t),o=this._getItemIndex(this._element.querySelector(".active.carousel-item")),r=i.default.Event("slide.bs.carousel",{relatedTarget:t,direction:e,from:o,to:n});return i.default(this._element).trigger(r),r},e._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var e=[].slice.call(this._indicatorsElement.querySelectorAll(".active"));i.default(e).removeClass("active");var n=this._indicatorsElement.children[this._getItemIndex(t)];n&&i.default(n).addClass("active")}},e._updateInterval=function(){var t=this._activeElement||this._element.querySelector(".active.carousel-item");if(t){var e=parseInt(t.getAttribute("data-interval"),10);e?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=e):this._config.interval=this._config.defaultInterval||this._config.interval}},e._slide=function(t,e){var n,o,r,a=this,s=this._element.querySelector(".active.carousel-item"),u=this._getItemIndex(s),f=e||s&&this._getItemByDirection(t,s),d=this._getItemIndex(f),c=Boolean(this._interval);if("next"===t?(n="carousel-item-left",o="carousel-item-next",r="left"):(n="carousel-item-right",o="carousel-item-prev",r="right"),f&&i.default(f).hasClass("active"))this._isSliding=!1;else if(!this._triggerSlideEvent(f,r).isDefaultPrevented()&&s&&f){this._isSliding=!0,c&&this.pause(),this._setActiveIndicatorElement(f),this._activeElement=f;var h=i.default.Event("slid.bs.carousel",{relatedTarget:f,direction:r,from:u,to:d});if(i.default(this._element).hasClass("slide")){i.default(f).addClass(o),l.reflow(f),i.default(s).addClass(n),i.default(f).addClass(n);var p=l.getTransitionDurationFromElement(s);i.default(s).one(l.TRANSITION_END,(function(){i.default(f).removeClass(n+" "+o).addClass("active"),i.default(s).removeClass("active "+o+" "+n),a._isSliding=!1,setTimeout((function(){return i.default(a._element).trigger(h)}),0)})).emulateTransitionEnd(p)}else i.default(s).removeClass("active"),i.default(f).addClass("active"),this._isSliding=!1,i.default(this._element).trigger(h);c&&this.cycle()}},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this).data("bs.carousel"),o=a({},v,i.default(this).data());"object"==typeof e&&(o=a({},o,e));var r="string"==typeof e?e:o.slide;if(n||(n=new t(this,o),i.default(this).data("bs.carousel",n)),"number"==typeof e)n.to(e);else if("string"==typeof r){if("undefined"==typeof n[r])throw new TypeError('No method named "'+r+'"');n[r]()}else o.interval&&o.ride&&(n.pause(),n.cycle())}))},t._dataApiClickHandler=function(e){var n=l.getSelectorFromElement(this);if(n){var o=i.default(n)[0];if(o&&i.default(o).hasClass("carousel")){var r=a({},i.default(o).data(),i.default(this).data()),s=this.getAttribute("data-slide-to");s&&(r.interval=!1),t._jQueryInterface.call(i.default(o),r),s&&i.default(o).data("bs.carousel").to(s),e.preventDefault()}}},r(t,null,[{key:"VERSION",get:function(){return"4.6.0"}},{key:"Default",get:function(){return v}}]),t}();i.default(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",y._dataApiClickHandler),i.default(window).on("load.bs.carousel.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-ride="carousel"]')),e=0,n=t.length;e0&&(this._selector=a,this._triggerArray.push(r))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var e=t.prototype;return e.toggle=function(){i.default(this._element).hasClass("show")?this.hide():this.show()},e.show=function(){var e,n,o=this;if(!this._isTransitioning&&!i.default(this._element).hasClass("show")&&(this._parent&&0===(e=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function(t){return"string"==typeof o._config.parent?t.getAttribute("data-parent")===o._config.parent:t.classList.contains("collapse")}))).length&&(e=null),!(e&&(n=i.default(e).not(this._selector).data("bs.collapse"))&&n._isTransitioning))){var r=i.default.Event("show.bs.collapse");if(i.default(this._element).trigger(r),!r.isDefaultPrevented()){e&&(t._jQueryInterface.call(i.default(e).not(this._selector),"hide"),n||i.default(e).data("bs.collapse",null));var a=this._getDimension();i.default(this._element).removeClass("collapse").addClass("collapsing"),this._element.style[a]=0,this._triggerArray.length&&i.default(this._triggerArray).removeClass("collapsed").attr("aria-expanded",!0),this.setTransitioning(!0);var s="scroll"+(a[0].toUpperCase()+a.slice(1)),u=l.getTransitionDurationFromElement(this._element);i.default(this._element).one(l.TRANSITION_END,(function(){i.default(o._element).removeClass("collapsing").addClass("collapse show"),o._element.style[a]="",o.setTransitioning(!1),i.default(o._element).trigger("shown.bs.collapse")})).emulateTransitionEnd(u),this._element.style[a]=this._element[s]+"px"}}},e.hide=function(){var t=this;if(!this._isTransitioning&&i.default(this._element).hasClass("show")){var e=i.default.Event("hide.bs.collapse");if(i.default(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",l.reflow(this._element),i.default(this._element).addClass("collapsing").removeClass("collapse show");var o=this._triggerArray.length;if(o>0)for(var r=0;r=0)return 1;return 0}();var k=D&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then((function(){e=!1,t()})))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout((function(){e=!1,t()}),N))}};function A(t){return t&&"[object Function]"==={}.toString.call(t)}function I(t,e){if(1!==t.nodeType)return[];var n=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?n[e]:n}function O(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function x(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=I(t),n=e.overflow,i=e.overflowX,o=e.overflowY;return/(auto|scroll|overlay)/.test(n+o+i)?t:x(O(t))}function j(t){return t&&t.referenceNode?t.referenceNode:t}var L=D&&!(!window.MSInputMethodContext||!document.documentMode),P=D&&/MSIE 10/.test(navigator.userAgent);function F(t){return 11===t?L:10===t?P:L||P}function R(t){if(!t)return document.documentElement;for(var e=F(10)?document.body:null,n=t.offsetParent||null;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&"BODY"!==i&&"HTML"!==i?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===I(n,"position")?R(n):n:t?t.ownerDocument.documentElement:document.documentElement}function H(t){return null!==t.parentNode?H(t.parentNode):t}function M(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?t:e,o=n?e:t,r=document.createRange();r.setStart(i,0),r.setEnd(o,0);var a,s,l=r.commonAncestorContainer;if(t!==l&&e!==l||i.contains(o))return"BODY"===(s=(a=l).nodeName)||"HTML"!==s&&R(a.firstElementChild)!==a?R(l):l;var u=H(t);return u.host?M(u.host,e):M(t,H(e).host)}function q(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===e?"scrollTop":"scrollLeft",i=t.nodeName;if("BODY"===i||"HTML"===i){var o=t.ownerDocument.documentElement,r=t.ownerDocument.scrollingElement||o;return r[n]}return t[n]}function B(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=q(e,"top"),o=q(e,"left"),r=n?-1:1;return t.top+=i*r,t.bottom+=i*r,t.left+=o*r,t.right+=o*r,t}function Q(t,e){var n="x"===e?"Left":"Top",i="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"])+parseFloat(t["border"+i+"Width"])}function W(t,e,n,i){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],F(10)?parseInt(n["offset"+t])+parseInt(i["margin"+("Height"===t?"Top":"Left")])+parseInt(i["margin"+("Height"===t?"Bottom":"Right")]):0)}function U(t){var e=t.body,n=t.documentElement,i=F(10)&&getComputedStyle(n);return{height:W("Height",e,n,i),width:W("Width",e,n,i)}}var V=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Y=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],i=F(10),o="HTML"===e.nodeName,r=G(t),a=G(e),s=x(t),l=I(e),u=parseFloat(l.borderTopWidth),f=parseFloat(l.borderLeftWidth);n&&o&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var d=K({top:r.top-a.top-u,left:r.left-a.left-f,width:r.width,height:r.height});if(d.marginTop=0,d.marginLeft=0,!i&&o){var c=parseFloat(l.marginTop),h=parseFloat(l.marginLeft);d.top-=u-c,d.bottom-=u-c,d.left-=f-h,d.right-=f-h,d.marginTop=c,d.marginLeft=h}return(i&&!n?e.contains(s):e===s&&"BODY"!==s.nodeName)&&(d=B(d,e)),d}function J(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.ownerDocument.documentElement,i=$(t,n),o=Math.max(n.clientWidth,window.innerWidth||0),r=Math.max(n.clientHeight,window.innerHeight||0),a=e?0:q(n),s=e?0:q(n,"left"),l={top:a-i.top+i.marginTop,left:s-i.left+i.marginLeft,width:o,height:r};return K(l)}function Z(t){var e=t.nodeName;if("BODY"===e||"HTML"===e)return!1;if("fixed"===I(t,"position"))return!0;var n=O(t);return!!n&&Z(n)}function tt(t){if(!t||!t.parentElement||F())return document.documentElement;for(var e=t.parentElement;e&&"none"===I(e,"transform");)e=e.parentElement;return e||document.documentElement}function et(t,e,n,i){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r={top:0,left:0},a=o?tt(t):M(t,j(e));if("viewport"===i)r=J(a,o);else{var s=void 0;"scrollParent"===i?"BODY"===(s=x(O(e))).nodeName&&(s=t.ownerDocument.documentElement):s="window"===i?t.ownerDocument.documentElement:i;var l=$(s,a,o);if("HTML"!==s.nodeName||Z(a))r=l;else{var u=U(t.ownerDocument),f=u.height,d=u.width;r.top+=l.top-l.marginTop,r.bottom=f+l.top,r.left+=l.left-l.marginLeft,r.right=d+l.left}}var c="number"==typeof(n=n||0);return r.left+=c?n:n.left||0,r.top+=c?n:n.top||0,r.right-=c?n:n.right||0,r.bottom-=c?n:n.bottom||0,r}function nt(t){return t.width*t.height}function it(t,e,n,i,o){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var a=et(n,i,r,o),s={top:{width:a.width,height:e.top-a.top},right:{width:a.right-e.right,height:a.height},bottom:{width:a.width,height:a.bottom-e.bottom},left:{width:e.left-a.left,height:a.height}},l=Object.keys(s).map((function(t){return X({key:t},s[t],{area:nt(s[t])})})).sort((function(t,e){return e.area-t.area})),u=l.filter((function(t){var e=t.width,i=t.height;return e>=n.clientWidth&&i>=n.clientHeight})),f=u.length>0?u[0].key:l[0].key,d=t.split("-")[1];return f+(d?"-"+d:"")}function ot(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=i?tt(e):M(e,j(n));return $(n,o,i)}function rt(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),n=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),i=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+i,height:t.offsetHeight+n}}function at(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return e[t]}))}function st(t,e,n){n=n.split("-")[0];var i=rt(t),o={width:i.width,height:i.height},r=-1!==["right","left"].indexOf(n),a=r?"top":"left",s=r?"left":"top",l=r?"height":"width",u=r?"width":"height";return o[a]=e[a]+e[l]/2-i[l]/2,o[s]=n===s?e[s]-i[u]:e[at(s)],o}function lt(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function ut(t,e,n){return(void 0===n?t:t.slice(0,function(t,e,n){if(Array.prototype.findIndex)return t.findIndex((function(t){return t[e]===n}));var i=lt(t,(function(t){return t[e]===n}));return t.indexOf(i)}(t,"name",n))).forEach((function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&A(n)&&(e.offsets.popper=K(e.offsets.popper),e.offsets.reference=K(e.offsets.reference),e=n(e,t))})),e}function ft(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=ot(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=it(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=st(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=ut(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function dt(t,e){return t.some((function(t){var n=t.name;return t.enabled&&n===e}))}function ct(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),i=0;i1&&void 0!==arguments[1]&&arguments[1],n=Tt.indexOf(t),i=Tt.slice(n+1).concat(Tt.slice(0,n));return e?i.reverse():i}var St="flip",Dt="clockwise",Nt="counterclockwise";function kt(t,e,n,i){var o=[0,0],r=-1!==["right","left"].indexOf(i),a=t.split(/(\+|\-)/).map((function(t){return t.trim()})),s=a.indexOf(lt(a,(function(t){return-1!==t.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,u=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return(u=u.map((function(t,i){var o=(1===i?!r:r)?"height":"width",a=!1;return t.reduce((function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,a=!0,t):a?(t[t.length-1]+=e,a=!1,t):t.concat(e)}),[]).map((function(t){return function(t,e,n,i){var o=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+o[1],a=o[2];if(!r)return t;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=i}return K(s)[e]/100*r}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*r;return r}(t,o,e,n)}))}))).forEach((function(t,e){t.forEach((function(n,i){_t(n)&&(o[e]+=n*("-"===t[i-1]?-1:1))}))})),o}var At={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,n=e.split("-")[0],i=e.split("-")[1];if(i){var o=t.offsets,r=o.reference,a=o.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",u=s?"width":"height",f={start:z({},l,r[l]),end:z({},l,r[l]+r[u]-a[u])};t.offsets.popper=X({},a,f[i])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var n=e.offset,i=t.placement,o=t.offsets,r=o.popper,a=o.reference,s=i.split("-")[0],l=void 0;return l=_t(+n)?[+n,0]:kt(n,r,a,s),"left"===s?(r.top+=l[0],r.left-=l[1]):"right"===s?(r.top+=l[0],r.left+=l[1]):"top"===s?(r.left+=l[0],r.top-=l[1]):"bottom"===s&&(r.left+=l[0],r.top+=l[1]),t.popper=r,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var n=e.boundariesElement||R(t.instance.popper);t.instance.reference===n&&(n=R(n));var i=ct("transform"),o=t.instance.popper.style,r=o.top,a=o.left,s=o[i];o.top="",o.left="",o[i]="";var l=et(t.instance.popper,t.instance.reference,e.padding,n,t.positionFixed);o.top=r,o.left=a,o[i]=s,e.boundaries=l;var u=e.priority,f=t.offsets.popper,d={primary:function(t){var n=f[t];return f[t]l[t]&&!e.escapeWithReference&&(i=Math.min(f[n],l[t]-("right"===t?f.width:f.height))),z({},n,i)}};return u.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";f=X({},f,d[e](t))})),t.offsets.popper=f,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,n=e.popper,i=e.reference,o=t.placement.split("-")[0],r=Math.floor,a=-1!==["top","bottom"].indexOf(o),s=a?"right":"bottom",l=a?"left":"top",u=a?"width":"height";return n[s]r(i[s])&&(t.offsets.popper[l]=r(i[s])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!wt(t.instance.modifiers,"arrow","keepTogether"))return t;var i=e.element;if("string"==typeof i){if(!(i=t.instance.popper.querySelector(i)))return t}else if(!t.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var o=t.placement.split("-")[0],r=t.offsets,a=r.popper,s=r.reference,l=-1!==["left","right"].indexOf(o),u=l?"height":"width",f=l?"Top":"Left",d=f.toLowerCase(),c=l?"left":"top",h=l?"bottom":"right",p=rt(i)[u];s[h]-pa[h]&&(t.offsets.popper[d]+=s[d]+p-a[h]),t.offsets.popper=K(t.offsets.popper);var m=s[d]+s[u]/2-p/2,g=I(t.instance.popper),v=parseFloat(g["margin"+f]),_=parseFloat(g["border"+f+"Width"]),b=m-t.offsets.popper[d]-v-_;return b=Math.max(Math.min(a[u]-p,b),0),t.arrowElement=i,t.offsets.arrow=(z(n={},d,Math.round(b)),z(n,c,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(dt(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=et(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),i=t.placement.split("-")[0],o=at(i),r=t.placement.split("-")[1]||"",a=[];switch(e.behavior){case St:a=[i,o];break;case Dt:a=Ct(i);break;case Nt:a=Ct(i,!0);break;default:a=e.behavior}return a.forEach((function(s,l){if(i!==s||a.length===l+1)return t;i=t.placement.split("-")[0],o=at(i);var u=t.offsets.popper,f=t.offsets.reference,d=Math.floor,c="left"===i&&d(u.right)>d(f.left)||"right"===i&&d(u.left)d(f.top)||"bottom"===i&&d(u.top)d(n.right),m=d(u.top)d(n.bottom),v="left"===i&&h||"right"===i&&p||"top"===i&&m||"bottom"===i&&g,_=-1!==["top","bottom"].indexOf(i),b=!!e.flipVariations&&(_&&"start"===r&&h||_&&"end"===r&&p||!_&&"start"===r&&m||!_&&"end"===r&&g),y=!!e.flipVariationsByContent&&(_&&"start"===r&&p||_&&"end"===r&&h||!_&&"start"===r&&g||!_&&"end"===r&&m),w=b||y;(c||v||w)&&(t.flipped=!0,(c||v)&&(i=a[l+1]),w&&(r=function(t){return"end"===t?"start":"start"===t?"end":t}(r)),t.placement=i+(r?"-"+r:""),t.offsets.popper=X({},t.offsets.popper,st(t.instance.popper,t.offsets.reference,t.placement)),t=ut(t.instance.modifiers,t,"flip"))})),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],i=t.offsets,o=i.popper,r=i.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return o[a?"left":"top"]=r[n]-(s?o[a?"width":"height"]:0),t.placement=at(e),t.offsets.popper=K(o),t}},hide:{order:800,enabled:!0,fn:function(t){if(!wt(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=lt(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottomn.right||e.top>n.bottom||e.right2&&void 0!==arguments[2]?arguments[2]:{};V(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=k(this.update.bind(this)),this.options=X({},t.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(X({},t.Defaults.modifiers,o.modifiers)).forEach((function(e){i.options.modifiers[e]=X({},t.Defaults.modifiers[e]||{},o.modifiers?o.modifiers[e]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return X({name:t},i.options.modifiers[t])})).sort((function(t,e){return t.order-e.order})),this.modifiers.forEach((function(t){t.enabled&&A(t.onLoad)&&t.onLoad(i.reference,i.popper,i.options,t,i.state)})),this.update();var r=this.options.eventsEnabled;r&&this.enableEventListeners(),this.state.eventsEnabled=r}return Y(t,[{key:"update",value:function(){return ft.call(this)}},{key:"destroy",value:function(){return ht.call(this)}},{key:"enableEventListeners",value:function(){return gt.call(this)}},{key:"disableEventListeners",value:function(){return vt.call(this)}}]),t}();It.Utils=("undefined"!=typeof window?window:global).PopperUtils,It.placements=Et,It.Defaults=At;var Ot="dropdown",xt=i.default.fn[Ot],jt=new RegExp("38|40|27"),Lt={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},Pt={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},Ft=function(){function t(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var e=t.prototype;return e.toggle=function(){if(!this._element.disabled&&!i.default(this._element).hasClass("disabled")){var e=i.default(this._menu).hasClass("show");t._clearMenus(),e||this.show(!0)}},e.show=function(e){if(void 0===e&&(e=!1),!(this._element.disabled||i.default(this._element).hasClass("disabled")||i.default(this._menu).hasClass("show"))){var n={relatedTarget:this._element},o=i.default.Event("show.bs.dropdown",n),r=t._getParentFromElement(this._element);if(i.default(r).trigger(o),!o.isDefaultPrevented()){if(!this._inNavbar&&e){if("undefined"==typeof It)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");var a=this._element;"parent"===this._config.reference?a=r:l.isElement(this._config.reference)&&(a=this._config.reference,"undefined"!=typeof this._config.reference.jquery&&(a=this._config.reference[0])),"scrollParent"!==this._config.boundary&&i.default(r).addClass("position-static"),this._popper=new It(a,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===i.default(r).closest(".navbar-nav").length&&i.default(document.body).children().on("mouseover",null,i.default.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),i.default(this._menu).toggleClass("show"),i.default(r).toggleClass("show").trigger(i.default.Event("shown.bs.dropdown",n))}}},e.hide=function(){if(!this._element.disabled&&!i.default(this._element).hasClass("disabled")&&i.default(this._menu).hasClass("show")){var e={relatedTarget:this._element},n=i.default.Event("hide.bs.dropdown",e),o=t._getParentFromElement(this._element);i.default(o).trigger(n),n.isDefaultPrevented()||(this._popper&&this._popper.destroy(),i.default(this._menu).toggleClass("show"),i.default(o).toggleClass("show").trigger(i.default.Event("hidden.bs.dropdown",e)))}},e.dispose=function(){i.default.removeData(this._element,"bs.dropdown"),i.default(this._element).off(".bs.dropdown"),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},e.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},e._addEventListeners=function(){var t=this;i.default(this._element).on("click.bs.dropdown",(function(e){e.preventDefault(),e.stopPropagation(),t.toggle()}))},e._getConfig=function(t){return t=a({},this.constructor.Default,i.default(this._element).data(),t),l.typeCheckConfig(Ot,t,this.constructor.DefaultType),t},e._getMenuElement=function(){if(!this._menu){var e=t._getParentFromElement(this._element);e&&(this._menu=e.querySelector(".dropdown-menu"))}return this._menu},e._getPlacement=function(){var t=i.default(this._element.parentNode),e="bottom-start";return t.hasClass("dropup")?e=i.default(this._menu).hasClass("dropdown-menu-right")?"top-end":"top-start":t.hasClass("dropright")?e="right-start":t.hasClass("dropleft")?e="left-start":i.default(this._menu).hasClass("dropdown-menu-right")&&(e="bottom-end"),e},e._detectNavbar=function(){return i.default(this._element).closest(".navbar").length>0},e._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=a({},e.offsets,t._config.offset(e.offsets,t._element)||{}),e}:e.offset=this._config.offset,e},e._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),a({},t,this._config.popperConfig)},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this).data("bs.dropdown");if(n||(n=new t(this,"object"==typeof e?e:null),i.default(this).data("bs.dropdown",n)),"string"==typeof e){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}}))},t._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var n=[].slice.call(document.querySelectorAll('[data-toggle="dropdown"]')),o=0,r=n.length;o0&&a--,40===e.which&&adocument.documentElement.clientHeight;n||(this._element.style.overflowY="hidden"),this._element.classList.add("modal-static");var o=l.getTransitionDurationFromElement(this._dialog);i.default(this._element).off(l.TRANSITION_END),i.default(this._element).one(l.TRANSITION_END,(function(){t._element.classList.remove("modal-static"),n||i.default(t._element).one(l.TRANSITION_END,(function(){t._element.style.overflowY=""})).emulateTransitionEnd(t._element,o)})).emulateTransitionEnd(o),this._element.focus()}},e._showElement=function(t){var e=this,n=i.default(this._element).hasClass("fade"),o=this._dialog?this._dialog.querySelector(".modal-body"):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),i.default(this._dialog).hasClass("modal-dialog-scrollable")&&o?o.scrollTop=0:this._element.scrollTop=0,n&&l.reflow(this._element),i.default(this._element).addClass("show"),this._config.focus&&this._enforceFocus();var r=i.default.Event("shown.bs.modal",{relatedTarget:t}),a=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,i.default(e._element).trigger(r)};if(n){var s=l.getTransitionDurationFromElement(this._dialog);i.default(this._dialog).one(l.TRANSITION_END,a).emulateTransitionEnd(s)}else a()},e._enforceFocus=function(){var t=this;i.default(document).off("focusin.bs.modal").on("focusin.bs.modal",(function(e){document!==e.target&&t._element!==e.target&&0===i.default(t._element).has(e.target).length&&t._element.focus()}))},e._setEscapeEvent=function(){var t=this;this._isShown?i.default(this._element).on("keydown.dismiss.bs.modal",(function(e){t._config.keyboard&&27===e.which?(e.preventDefault(),t.hide()):t._config.keyboard||27!==e.which||t._triggerBackdropTransition()})):this._isShown||i.default(this._element).off("keydown.dismiss.bs.modal")},e._setResizeEvent=function(){var t=this;this._isShown?i.default(window).on("resize.bs.modal",(function(e){return t.handleUpdate(e)})):i.default(window).off("resize.bs.modal")},e._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop((function(){i.default(document.body).removeClass("modal-open"),t._resetAdjustments(),t._resetScrollbar(),i.default(t._element).trigger("hidden.bs.modal")}))},e._removeBackdrop=function(){this._backdrop&&(i.default(this._backdrop).remove(),this._backdrop=null)},e._showBackdrop=function(t){var e=this,n=i.default(this._element).hasClass("fade")?"fade":"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",n&&this._backdrop.classList.add(n),i.default(this._backdrop).appendTo(document.body),i.default(this._element).on("click.dismiss.bs.modal",(function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===e._config.backdrop?e._triggerBackdropTransition():e.hide())})),n&&l.reflow(this._backdrop),i.default(this._backdrop).addClass("show"),!t)return;if(!n)return void t();var o=l.getTransitionDurationFromElement(this._backdrop);i.default(this._backdrop).one(l.TRANSITION_END,t).emulateTransitionEnd(o)}else if(!this._isShown&&this._backdrop){i.default(this._backdrop).removeClass("show");var r=function(){e._removeBackdrop(),t&&t()};if(i.default(this._element).hasClass("fade")){var a=l.getTransitionDurationFromElement(this._backdrop);i.default(this._backdrop).one(l.TRANSITION_END,r).emulateTransitionEnd(a)}else r()}else t&&t()},e._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},e._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},e._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)
',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",customClass:"",sanitize:!0,sanitizeFn:null,whiteList:Qt,popperConfig:null},Zt={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},te=function(){function t(t,e){if("undefined"==typeof It)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var e=t.prototype;return e.enable=function(){this._isEnabled=!0},e.disable=function(){this._isEnabled=!1},e.toggleEnabled=function(){this._isEnabled=!this._isEnabled},e.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=i.default(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(i.default(this.getTipElement()).hasClass("show"))return void this._leave(null,this);this._enter(null,this)}},e.dispose=function(){clearTimeout(this._timeout),i.default.removeData(this.element,this.constructor.DATA_KEY),i.default(this.element).off(this.constructor.EVENT_KEY),i.default(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&i.default(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},e.show=function(){var t=this;if("none"===i.default(this.element).css("display"))throw new Error("Please use show on visible elements");var e=i.default.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){i.default(this.element).trigger(e);var n=l.findShadowRoot(this.element),o=i.default.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(e.isDefaultPrevented()||!o)return;var r=this.getTipElement(),a=l.getUID(this.constructor.NAME);r.setAttribute("id",a),this.element.setAttribute("aria-describedby",a),this.setContent(),this.config.animation&&i.default(r).addClass("fade");var s="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,u=this._getAttachment(s);this.addAttachmentClass(u);var f=this._getContainer();i.default(r).data(this.constructor.DATA_KEY,this),i.default.contains(this.element.ownerDocument.documentElement,this.tip)||i.default(r).appendTo(f),i.default(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new It(this.element,r,this._getPopperConfig(u)),i.default(r).addClass("show"),i.default(r).addClass(this.config.customClass),"ontouchstart"in document.documentElement&&i.default(document.body).children().on("mouseover",null,i.default.noop);var d=function(){t.config.animation&&t._fixTransition();var e=t._hoverState;t._hoverState=null,i.default(t.element).trigger(t.constructor.Event.SHOWN),"out"===e&&t._leave(null,t)};if(i.default(this.tip).hasClass("fade")){var c=l.getTransitionDurationFromElement(this.tip);i.default(this.tip).one(l.TRANSITION_END,d).emulateTransitionEnd(c)}else d()}},e.hide=function(t){var e=this,n=this.getTipElement(),o=i.default.Event(this.constructor.Event.HIDE),r=function(){"show"!==e._hoverState&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),i.default(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(i.default(this.element).trigger(o),!o.isDefaultPrevented()){if(i.default(n).removeClass("show"),"ontouchstart"in document.documentElement&&i.default(document.body).children().off("mouseover",null,i.default.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,i.default(this.tip).hasClass("fade")){var a=l.getTransitionDurationFromElement(n);i.default(n).one(l.TRANSITION_END,r).emulateTransitionEnd(a)}else r();this._hoverState=""}},e.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},e.isWithContent=function(){return Boolean(this.getTitle())},e.addAttachmentClass=function(t){i.default(this.getTipElement()).addClass("bs-tooltip-"+t)},e.getTipElement=function(){return this.tip=this.tip||i.default(this.config.template)[0],this.tip},e.setContent=function(){var t=this.getTipElement();this.setElementContent(i.default(t.querySelectorAll(".tooltip-inner")),this.getTitle()),i.default(t).removeClass("fade show")},e.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=Vt(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?i.default(e).parent().is(t)||t.empty().append(e):t.text(i.default(e).text())},e.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},e._getPopperConfig=function(t){var e=this;return a({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}},this.config.popperConfig)},e._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=a({},e.offsets,t.config.offset(e.offsets,t.element)||{}),e}:e.offset=this.config.offset,e},e._getContainer=function(){return!1===this.config.container?document.body:l.isElement(this.config.container)?i.default(this.config.container):i.default(document).find(this.config.container)},e._getAttachment=function(t){return $t[t.toUpperCase()]},e._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(e){if("click"===e)i.default(t.element).on(t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==e){var n="hover"===e?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,o="hover"===e?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;i.default(t.element).on(n,t.config.selector,(function(e){return t._enter(e)})).on(o,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t.element&&t.hide()},i.default(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=a({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},e._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},e._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||i.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?"focus":"hover"]=!0),i.default(e.getTipElement()).hasClass("show")||"show"===e._hoverState?e._hoverState="show":(clearTimeout(e._timeout),e._hoverState="show",e.config.delay&&e.config.delay.show?e._timeout=setTimeout((function(){"show"===e._hoverState&&e.show()}),e.config.delay.show):e.show())},e._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||i.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?"focus":"hover"]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState="out",e.config.delay&&e.config.delay.hide?e._timeout=setTimeout((function(){"out"===e._hoverState&&e.hide()}),e.config.delay.hide):e.hide())},e._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},e._getConfig=function(t){var e=i.default(this.element).data();return Object.keys(e).forEach((function(t){-1!==Kt.indexOf(t)&&delete e[t]})),"number"==typeof(t=a({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),l.typeCheckConfig(Yt,t,this.constructor.DefaultType),t.sanitize&&(t.template=Vt(t.template,t.whiteList,t.sanitizeFn)),t},e._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},e._cleanTipClass=function(){var t=i.default(this.getTipElement()),e=t.attr("class").match(Xt);null!==e&&e.length&&t.removeClass(e.join(""))},e._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},e._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(i.default(t).removeClass("fade"),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data("bs.tooltip"),r="object"==typeof e&&e;if((o||!/dispose|hide/.test(e))&&(o||(o=new t(this,r),n.data("bs.tooltip",o)),"string"==typeof e)){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e]()}}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.0"}},{key:"Default",get:function(){return Jt}},{key:"NAME",get:function(){return Yt}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return Zt}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return Gt}}]),t}();i.default.fn[Yt]=te._jQueryInterface,i.default.fn[Yt].Constructor=te,i.default.fn[Yt].noConflict=function(){return i.default.fn[Yt]=zt,te._jQueryInterface};var ee="popover",ne=i.default.fn[ee],ie=new RegExp("(^|\\s)bs-popover\\S+","g"),oe=a({},te.Default,{placement:"right",trigger:"click",content:"",template:''}),re=a({},te.DefaultType,{content:"(string|element|function)"}),ae={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},se=function(t){var e,n;function o(){return t.apply(this,arguments)||this}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var a=o.prototype;return a.isWithContent=function(){return this.getTitle()||this._getContent()},a.addAttachmentClass=function(t){i.default(this.getTipElement()).addClass("bs-popover-"+t)},a.getTipElement=function(){return this.tip=this.tip||i.default(this.config.template)[0],this.tip},a.setContent=function(){var t=i.default(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(".popover-body"),e),t.removeClass("fade show")},a._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},a._cleanTipClass=function(){var t=i.default(this.getTipElement()),e=t.attr("class").match(ie);null!==e&&e.length>0&&t.removeClass(e.join(""))},o._jQueryInterface=function(t){return this.each((function(){var e=i.default(this).data("bs.popover"),n="object"==typeof t?t:null;if((e||!/dispose|hide/.test(t))&&(e||(e=new o(this,n),i.default(this).data("bs.popover",e)),"string"==typeof t)){if("undefined"==typeof e[t])throw new TypeError('No method named "'+t+'"');e[t]()}}))},r(o,null,[{key:"VERSION",get:function(){return"4.6.0"}},{key:"Default",get:function(){return oe}},{key:"NAME",get:function(){return ee}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return ae}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return re}}]),o}(te);i.default.fn[ee]=se._jQueryInterface,i.default.fn[ee].Constructor=se,i.default.fn[ee].noConflict=function(){return i.default.fn[ee]=ne,se._jQueryInterface};var le="scrollspy",ue=i.default.fn[le],fe={offset:10,method:"auto",target:""},de={offset:"number",method:"string",target:"(string|element)"},ce=function(){function t(t,e){var n=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" .nav-link,"+this._config.target+" .list-group-item,"+this._config.target+" .dropdown-item",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,i.default(this._scrollElement).on("scroll.bs.scrollspy",(function(t){return n._process(t)})),this.refresh(),this._process()}var e=t.prototype;return e.refresh=function(){var t=this,e=this._scrollElement===this._scrollElement.window?"offset":"position",n="auto"===this._config.method?e:this._config.method,o="position"===n?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var e,r=l.getSelectorFromElement(t);if(r&&(e=document.querySelector(r)),e){var a=e.getBoundingClientRect();if(a.width||a.height)return[i.default(e)[n]().top+o,r]}return null})).filter((function(t){return t})).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))},e.dispose=function(){i.default.removeData(this._element,"bs.scrollspy"),i.default(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},e._getConfig=function(t){if("string"!=typeof(t=a({},fe,"object"==typeof t&&t?t:{})).target&&l.isElement(t.target)){var e=i.default(t.target).attr("id");e||(e=l.getUID(le),i.default(t.target).attr("id",e)),t.target="#"+e}return l.typeCheckConfig(le,t,de),t},e._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},e._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},e._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},e._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t li > .active":".active";n=(n=i.default.makeArray(i.default(o).find(a)))[n.length-1]}var s=i.default.Event("hide.bs.tab",{relatedTarget:this._element}),u=i.default.Event("show.bs.tab",{relatedTarget:n});if(n&&i.default(n).trigger(s),i.default(this._element).trigger(u),!u.isDefaultPrevented()&&!s.isDefaultPrevented()){r&&(e=document.querySelector(r)),this._activate(this._element,o);var f=function(){var e=i.default.Event("hidden.bs.tab",{relatedTarget:t._element}),o=i.default.Event("shown.bs.tab",{relatedTarget:n});i.default(n).trigger(e),i.default(t._element).trigger(o)};e?this._activate(e,e.parentNode,f):f()}}},e.dispose=function(){i.default.removeData(this._element,"bs.tab"),this._element=null},e._activate=function(t,e,n){var o=this,r=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?i.default(e).children(".active"):i.default(e).find("> li > .active"))[0],a=n&&r&&i.default(r).hasClass("fade"),s=function(){return o._transitionComplete(t,r,n)};if(r&&a){var u=l.getTransitionDurationFromElement(r);i.default(r).removeClass("show").one(l.TRANSITION_END,s).emulateTransitionEnd(u)}else s()},e._transitionComplete=function(t,e,n){if(e){i.default(e).removeClass("active");var o=i.default(e.parentNode).find("> .dropdown-menu .active")[0];o&&i.default(o).removeClass("active"),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}if(i.default(t).addClass("active"),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),l.reflow(t),t.classList.contains("fade")&&t.classList.add("show"),t.parentNode&&i.default(t.parentNode).hasClass("dropdown-menu")){var r=i.default(t).closest(".dropdown")[0];if(r){var a=[].slice.call(r.querySelectorAll(".dropdown-toggle"));i.default(a).addClass("active")}t.setAttribute("aria-expanded",!0)}n&&n()},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data("bs.tab");if(o||(o=new t(this),n.data("bs.tab",o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e]()}}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.0"}}]),t}();i.default(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(t){t.preventDefault(),pe._jQueryInterface.call(i.default(this),"show")})),i.default.fn.tab=pe._jQueryInterface,i.default.fn.tab.Constructor=pe,i.default.fn.tab.noConflict=function(){return i.default.fn.tab=he,pe._jQueryInterface};var me=i.default.fn.toast,ge={animation:"boolean",autohide:"boolean",delay:"number"},ve={animation:!0,autohide:!0,delay:500},_e=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var e=t.prototype;return e.show=function(){var t=this,e=i.default.Event("show.bs.toast");if(i.default(this._element).trigger(e),!e.isDefaultPrevented()){this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");var n=function(){t._element.classList.remove("showing"),t._element.classList.add("show"),i.default(t._element).trigger("shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout((function(){t.hide()}),t._config.delay))};if(this._element.classList.remove("hide"),l.reflow(this._element),this._element.classList.add("showing"),this._config.animation){var o=l.getTransitionDurationFromElement(this._element);i.default(this._element).one(l.TRANSITION_END,n).emulateTransitionEnd(o)}else n()}},e.hide=function(){if(this._element.classList.contains("show")){var t=i.default.Event("hide.bs.toast");i.default(this._element).trigger(t),t.isDefaultPrevented()||this._close()}},e.dispose=function(){this._clearTimeout(),this._element.classList.contains("show")&&this._element.classList.remove("show"),i.default(this._element).off("click.dismiss.bs.toast"),i.default.removeData(this._element,"bs.toast"),this._element=null,this._config=null},e._getConfig=function(t){return t=a({},ve,i.default(this._element).data(),"object"==typeof t&&t?t:{}),l.typeCheckConfig("toast",t,this.constructor.DefaultType),t},e._setListeners=function(){var t=this;i.default(this._element).on("click.dismiss.bs.toast",'[data-dismiss="toast"]',(function(){return t.hide()}))},e._close=function(){var t=this,e=function(){t._element.classList.add("hide"),i.default(t._element).trigger("hidden.bs.toast")};if(this._element.classList.remove("show"),this._config.animation){var n=l.getTransitionDurationFromElement(this._element);i.default(this._element).one(l.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},e._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data("bs.toast");if(o||(o=new t(this,"object"==typeof e&&e),n.data("bs.toast",o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e](this)}}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.0"}},{key:"DefaultType",get:function(){return ge}},{key:"Default",get:function(){return ve}}]),t}();i.default.fn.toast=_e._jQueryInterface,i.default.fn.toast.Constructor=_e,i.default.fn.toast.noConflict=function(){return i.default.fn.toast=me,_e._jQueryInterface},t.Alert=d,t.Button=h,t.Carousel=y,t.Collapse=S,t.Dropdown=Ft,t.Modal=qt,t.Popover=se,t.Scrollspy=ce,t.Tab=pe,t.Toast=_e,t.Tooltip=te,t.Util=l,Object.defineProperty(t,"__esModule",{value:!0})})); +//# sourceMappingURL=bootstrap.bundle.min.js.map \ No newline at end of file diff --git a/llvm-build/checksec/templates/css/bootstrap.min.css b/llvm-build/checksec/templates/css/bootstrap.min.css new file mode 100644 index 0000000000000000000000000000000000000000..ef399d21ce7e2d18d0a931ea90c65461ff40a103 --- /dev/null +++ b/llvm-build/checksec/templates/css/bootstrap.min.css @@ -0,0 +1,7 @@ +/*! + * Bootstrap v4.6.0 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors + * Copyright 2011-2021 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */:root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#007bff;--secondary:#6c757d;--success:#28a745;--info:#17a2b8;--warning:#ffc107;--danger:#dc3545;--light:#f8f9fa;--dark:#343a40;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([class]){color:inherit;text-decoration:none}a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit;text-align:-webkit-match-parent}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:2.5rem}.h2,h2{font-size:2rem}.h3,h3{font-size:1.75rem}.h4,h4{font-size:1.5rem}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:6rem;font-weight:300;line-height:1.2}.display-2{font-size:5.5rem;font-weight:300;line-height:1.2}.display-3{font-size:4.5rem;font-weight:300;line-height:1.2}.display-4{font-size:3.5rem;font-weight:300;line-height:1.2}hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,.1)}.small,small{font-size:80%;font-weight:400}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:90%;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote-footer{display:block;font-size:80%;color:#6c757d}.blockquote-footer::before{content:"\2014\00A0"}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid #dee2e6;border-radius:.25rem;max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:90%;color:#6c757d}code{font-size:87.5%;color:#e83e8c;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:87.5%;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:100%;font-weight:700}pre{display:block;font-size:87.5%;color:#212529}pre code{font-size:inherit;color:inherit;word-break:normal}.pre-scrollable{max-height:340px;overflow-y:scroll}.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}.row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}.no-gutters{margin-right:0;margin-left:0}.no-gutters>.col,.no-gutters>[class*=col-]{padding-right:0;padding-left:0}.col,.col-1,.col-10,.col-11,.col-12,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-auto,.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-auto,.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-auto,.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-auto,.col-xl,.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-auto{position:relative;width:100%;padding-right:15px;padding-left:15px}.col{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.row-cols-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-first{-ms-flex-order:-1;order:-1}.order-last{-ms-flex-order:13;order:13}.order-0{-ms-flex-order:0;order:0}.order-1{-ms-flex-order:1;order:1}.order-2{-ms-flex-order:2;order:2}.order-3{-ms-flex-order:3;order:3}.order-4{-ms-flex-order:4;order:4}.order-5{-ms-flex-order:5;order:5}.order-6{-ms-flex-order:6;order:6}.order-7{-ms-flex-order:7;order:7}.order-8{-ms-flex-order:8;order:8}.order-9{-ms-flex-order:9;order:9}.order-10{-ms-flex-order:10;order:10}.order-11{-ms-flex-order:11;order:11}.order-12{-ms-flex-order:12;order:12}.offset-1{margin-left:8.333333%}.offset-2{margin-left:16.666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.333333%}.offset-5{margin-left:41.666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.333333%}.offset-8{margin-left:66.666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.333333%}.offset-11{margin-left:91.666667%}@media (min-width:576px){.col-sm{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.row-cols-sm-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-sm-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-sm-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-sm-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-sm-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-sm-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-sm-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-sm-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-sm-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-sm-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-sm-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-sm-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-sm-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-sm-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-sm-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-sm-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-sm-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-sm-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-sm-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-sm-first{-ms-flex-order:-1;order:-1}.order-sm-last{-ms-flex-order:13;order:13}.order-sm-0{-ms-flex-order:0;order:0}.order-sm-1{-ms-flex-order:1;order:1}.order-sm-2{-ms-flex-order:2;order:2}.order-sm-3{-ms-flex-order:3;order:3}.order-sm-4{-ms-flex-order:4;order:4}.order-sm-5{-ms-flex-order:5;order:5}.order-sm-6{-ms-flex-order:6;order:6}.order-sm-7{-ms-flex-order:7;order:7}.order-sm-8{-ms-flex-order:8;order:8}.order-sm-9{-ms-flex-order:9;order:9}.order-sm-10{-ms-flex-order:10;order:10}.order-sm-11{-ms-flex-order:11;order:11}.order-sm-12{-ms-flex-order:12;order:12}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.333333%}.offset-sm-2{margin-left:16.666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.333333%}.offset-sm-5{margin-left:41.666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.333333%}.offset-sm-8{margin-left:66.666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.333333%}.offset-sm-11{margin-left:91.666667%}}@media (min-width:768px){.col-md{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.row-cols-md-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-md-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-md-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-md-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-md-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-md-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-md-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-md-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-md-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-md-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-md-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-md-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-md-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-md-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-md-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-md-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-md-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-md-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-md-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-md-first{-ms-flex-order:-1;order:-1}.order-md-last{-ms-flex-order:13;order:13}.order-md-0{-ms-flex-order:0;order:0}.order-md-1{-ms-flex-order:1;order:1}.order-md-2{-ms-flex-order:2;order:2}.order-md-3{-ms-flex-order:3;order:3}.order-md-4{-ms-flex-order:4;order:4}.order-md-5{-ms-flex-order:5;order:5}.order-md-6{-ms-flex-order:6;order:6}.order-md-7{-ms-flex-order:7;order:7}.order-md-8{-ms-flex-order:8;order:8}.order-md-9{-ms-flex-order:9;order:9}.order-md-10{-ms-flex-order:10;order:10}.order-md-11{-ms-flex-order:11;order:11}.order-md-12{-ms-flex-order:12;order:12}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.333333%}.offset-md-2{margin-left:16.666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.333333%}.offset-md-5{margin-left:41.666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.333333%}.offset-md-8{margin-left:66.666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.333333%}.offset-md-11{margin-left:91.666667%}}@media (min-width:992px){.col-lg{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.row-cols-lg-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-lg-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-lg-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-lg-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-lg-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-lg-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-lg-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-lg-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-lg-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-lg-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-lg-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-lg-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-lg-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-lg-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-lg-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-lg-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-lg-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-lg-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-lg-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-lg-first{-ms-flex-order:-1;order:-1}.order-lg-last{-ms-flex-order:13;order:13}.order-lg-0{-ms-flex-order:0;order:0}.order-lg-1{-ms-flex-order:1;order:1}.order-lg-2{-ms-flex-order:2;order:2}.order-lg-3{-ms-flex-order:3;order:3}.order-lg-4{-ms-flex-order:4;order:4}.order-lg-5{-ms-flex-order:5;order:5}.order-lg-6{-ms-flex-order:6;order:6}.order-lg-7{-ms-flex-order:7;order:7}.order-lg-8{-ms-flex-order:8;order:8}.order-lg-9{-ms-flex-order:9;order:9}.order-lg-10{-ms-flex-order:10;order:10}.order-lg-11{-ms-flex-order:11;order:11}.order-lg-12{-ms-flex-order:12;order:12}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.333333%}.offset-lg-2{margin-left:16.666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.333333%}.offset-lg-5{margin-left:41.666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.333333%}.offset-lg-8{margin-left:66.666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.333333%}.offset-lg-11{margin-left:91.666667%}}@media (min-width:1200px){.col-xl{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.row-cols-xl-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-xl-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-xl-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-xl-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-xl-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-xl-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-xl-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-xl-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-xl-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-xl-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-xl-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-xl-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-xl-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-xl-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-xl-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-xl-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-xl-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-xl-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-xl-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-xl-first{-ms-flex-order:-1;order:-1}.order-xl-last{-ms-flex-order:13;order:13}.order-xl-0{-ms-flex-order:0;order:0}.order-xl-1{-ms-flex-order:1;order:1}.order-xl-2{-ms-flex-order:2;order:2}.order-xl-3{-ms-flex-order:3;order:3}.order-xl-4{-ms-flex-order:4;order:4}.order-xl-5{-ms-flex-order:5;order:5}.order-xl-6{-ms-flex-order:6;order:6}.order-xl-7{-ms-flex-order:7;order:7}.order-xl-8{-ms-flex-order:8;order:8}.order-xl-9{-ms-flex-order:9;order:9}.order-xl-10{-ms-flex-order:10;order:10}.order-xl-11{-ms-flex-order:11;order:11}.order-xl-12{-ms-flex-order:12;order:12}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.333333%}.offset-xl-2{margin-left:16.666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.333333%}.offset-xl-5{margin-left:41.666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.333333%}.offset-xl-8{margin-left:66.666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.333333%}.offset-xl-11{margin-left:91.666667%}}.table{width:100%;margin-bottom:1rem;color:#212529}.table td,.table th{padding:.75rem;vertical-align:top;border-top:1px solid #dee2e6}.table thead th{vertical-align:bottom;border-bottom:2px solid #dee2e6}.table tbody+tbody{border-top:2px solid #dee2e6}.table-sm td,.table-sm th{padding:.3rem}.table-bordered{border:1px solid #dee2e6}.table-bordered td,.table-bordered th{border:1px solid #dee2e6}.table-bordered thead td,.table-bordered thead th{border-bottom-width:2px}.table-borderless tbody+tbody,.table-borderless td,.table-borderless th,.table-borderless thead th{border:0}.table-striped tbody tr:nth-of-type(odd){background-color:rgba(0,0,0,.05)}.table-hover tbody tr:hover{color:#212529;background-color:rgba(0,0,0,.075)}.table-primary,.table-primary>td,.table-primary>th{background-color:#b8daff}.table-primary tbody+tbody,.table-primary td,.table-primary th,.table-primary thead th{border-color:#7abaff}.table-hover .table-primary:hover{background-color:#9fcdff}.table-hover .table-primary:hover>td,.table-hover .table-primary:hover>th{background-color:#9fcdff}.table-secondary,.table-secondary>td,.table-secondary>th{background-color:#d6d8db}.table-secondary tbody+tbody,.table-secondary td,.table-secondary th,.table-secondary thead th{border-color:#b3b7bb}.table-hover .table-secondary:hover{background-color:#c8cbcf}.table-hover .table-secondary:hover>td,.table-hover .table-secondary:hover>th{background-color:#c8cbcf}.table-success,.table-success>td,.table-success>th{background-color:#c3e6cb}.table-success tbody+tbody,.table-success td,.table-success th,.table-success thead th{border-color:#8fd19e}.table-hover .table-success:hover{background-color:#b1dfbb}.table-hover .table-success:hover>td,.table-hover .table-success:hover>th{background-color:#b1dfbb}.table-info,.table-info>td,.table-info>th{background-color:#bee5eb}.table-info tbody+tbody,.table-info td,.table-info th,.table-info thead th{border-color:#86cfda}.table-hover .table-info:hover{background-color:#abdde5}.table-hover .table-info:hover>td,.table-hover .table-info:hover>th{background-color:#abdde5}.table-warning,.table-warning>td,.table-warning>th{background-color:#ffeeba}.table-warning tbody+tbody,.table-warning td,.table-warning th,.table-warning thead th{border-color:#ffdf7e}.table-hover .table-warning:hover{background-color:#ffe8a1}.table-hover .table-warning:hover>td,.table-hover .table-warning:hover>th{background-color:#ffe8a1}.table-danger,.table-danger>td,.table-danger>th{background-color:#f5c6cb}.table-danger tbody+tbody,.table-danger td,.table-danger th,.table-danger thead th{border-color:#ed969e}.table-hover .table-danger:hover{background-color:#f1b0b7}.table-hover .table-danger:hover>td,.table-hover .table-danger:hover>th{background-color:#f1b0b7}.table-light,.table-light>td,.table-light>th{background-color:#fdfdfe}.table-light tbody+tbody,.table-light td,.table-light th,.table-light thead th{border-color:#fbfcfc}.table-hover .table-light:hover{background-color:#ececf6}.table-hover .table-light:hover>td,.table-hover .table-light:hover>th{background-color:#ececf6}.table-dark,.table-dark>td,.table-dark>th{background-color:#c6c8ca}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#95999c}.table-hover .table-dark:hover{background-color:#b9bbbe}.table-hover .table-dark:hover>td,.table-hover .table-dark:hover>th{background-color:#b9bbbe}.table-active,.table-active>td,.table-active>th{background-color:rgba(0,0,0,.075)}.table-hover .table-active:hover{background-color:rgba(0,0,0,.075)}.table-hover .table-active:hover>td,.table-hover .table-active:hover>th{background-color:rgba(0,0,0,.075)}.table .thead-dark th{color:#fff;background-color:#343a40;border-color:#454d55}.table .thead-light th{color:#495057;background-color:#e9ecef;border-color:#dee2e6}.table-dark{color:#fff;background-color:#343a40}.table-dark td,.table-dark th,.table-dark thead th{border-color:#454d55}.table-dark.table-bordered{border:0}.table-dark.table-striped tbody tr:nth-of-type(odd){background-color:rgba(255,255,255,.05)}.table-dark.table-hover tbody tr:hover{color:#fff;background-color:rgba(255,255,255,.075)}@media (max-width:575.98px){.table-responsive-sm{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-sm>.table-bordered{border:0}}@media (max-width:767.98px){.table-responsive-md{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-md>.table-bordered{border:0}}@media (max-width:991.98px){.table-responsive-lg{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-lg>.table-bordered{border:0}}@media (max-width:1199.98px){.table-responsive-xl{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-xl>.table-bordered{border:0}}.table-responsive{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive>.table-bordered{border:0}.form-control{display:block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control{transition:none}}.form-control::-ms-expand{background-color:transparent;border:0}.form-control:-moz-focusring{color:transparent;text-shadow:0 0 0 #495057}.form-control:focus{color:#495057;background-color:#fff;border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.form-control::-webkit-input-placeholder{color:#6c757d;opacity:1}.form-control::-moz-placeholder{color:#6c757d;opacity:1}.form-control:-ms-input-placeholder{color:#6c757d;opacity:1}.form-control::-ms-input-placeholder{color:#6c757d;opacity:1}.form-control::placeholder{color:#6c757d;opacity:1}.form-control:disabled,.form-control[readonly]{background-color:#e9ecef;opacity:1}input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{-webkit-appearance:none;-moz-appearance:none;appearance:none}select.form-control:focus::-ms-value{color:#495057;background-color:#fff}.form-control-file,.form-control-range{display:block;width:100%}.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem;line-height:1.5}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem;line-height:1.5}.form-control-plaintext{display:block;width:100%;padding:.375rem 0;margin-bottom:0;font-size:1rem;line-height:1.5;color:#212529;background-color:transparent;border:solid transparent;border-width:1px 0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.form-control-lg{height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}select.form-control[multiple],select.form-control[size]{height:auto}textarea.form-control{height:auto}.form-group{margin-bottom:1rem}.form-text{display:block;margin-top:.25rem}.form-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}.form-row>.col,.form-row>[class*=col-]{padding-right:5px;padding-left:5px}.form-check{position:relative;display:block;padding-left:1.25rem}.form-check-input{position:absolute;margin-top:.3rem;margin-left:-1.25rem}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{color:#6c757d}.form-check-label{margin-bottom:0}.form-check-inline{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;padding-left:0;margin-right:.75rem}.form-check-inline .form-check-input{position:static;margin-top:0;margin-right:.3125rem;margin-left:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#28a745}.valid-tooltip{position:absolute;top:100%;left:0;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(40,167,69,.9);border-radius:.25rem}.form-row>.col>.valid-tooltip,.form-row>[class*=col-]>.valid-tooltip{left:5px}.is-valid~.valid-feedback,.is-valid~.valid-tooltip,.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip{display:block}.form-control.is-valid,.was-validated .form-control:valid{border-color:#28a745;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.custom-select.is-valid,.was-validated .custom-select:valid{border-color:#28a745;padding-right:calc(.75em + 2.3125rem);background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") right .75rem center/8px 10px no-repeat,#fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem) no-repeat}.custom-select.is-valid:focus,.was-validated .custom-select:valid:focus{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#28a745}.form-check-input.is-valid~.valid-feedback,.form-check-input.is-valid~.valid-tooltip,.was-validated .form-check-input:valid~.valid-feedback,.was-validated .form-check-input:valid~.valid-tooltip{display:block}.custom-control-input.is-valid~.custom-control-label,.was-validated .custom-control-input:valid~.custom-control-label{color:#28a745}.custom-control-input.is-valid~.custom-control-label::before,.was-validated .custom-control-input:valid~.custom-control-label::before{border-color:#28a745}.custom-control-input.is-valid:checked~.custom-control-label::before,.was-validated .custom-control-input:valid:checked~.custom-control-label::before{border-color:#34ce57;background-color:#34ce57}.custom-control-input.is-valid:focus~.custom-control-label::before,.was-validated .custom-control-input:valid:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.custom-control-input.is-valid:focus:not(:checked)~.custom-control-label::before,.was-validated .custom-control-input:valid:focus:not(:checked)~.custom-control-label::before{border-color:#28a745}.custom-file-input.is-valid~.custom-file-label,.was-validated .custom-file-input:valid~.custom-file-label{border-color:#28a745}.custom-file-input.is-valid:focus~.custom-file-label,.was-validated .custom-file-input:valid:focus~.custom-file-label{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#dc3545}.invalid-tooltip{position:absolute;top:100%;left:0;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.25rem}.form-row>.col>.invalid-tooltip,.form-row>[class*=col-]>.invalid-tooltip{left:5px}.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip,.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip{display:block}.form-control.is-invalid,.was-validated .form-control:invalid{border-color:#dc3545;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.was-validated .form-control:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.custom-select.is-invalid,.was-validated .custom-select:invalid{border-color:#dc3545;padding-right:calc(.75em + 2.3125rem);background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") right .75rem center/8px 10px no-repeat,#fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e") center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem) no-repeat}.custom-select.is-invalid:focus,.was-validated .custom-select:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#dc3545}.form-check-input.is-invalid~.invalid-feedback,.form-check-input.is-invalid~.invalid-tooltip,.was-validated .form-check-input:invalid~.invalid-feedback,.was-validated .form-check-input:invalid~.invalid-tooltip{display:block}.custom-control-input.is-invalid~.custom-control-label,.was-validated .custom-control-input:invalid~.custom-control-label{color:#dc3545}.custom-control-input.is-invalid~.custom-control-label::before,.was-validated .custom-control-input:invalid~.custom-control-label::before{border-color:#dc3545}.custom-control-input.is-invalid:checked~.custom-control-label::before,.was-validated .custom-control-input:invalid:checked~.custom-control-label::before{border-color:#e4606d;background-color:#e4606d}.custom-control-input.is-invalid:focus~.custom-control-label::before,.was-validated .custom-control-input:invalid:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.custom-control-input.is-invalid:focus:not(:checked)~.custom-control-label::before,.was-validated .custom-control-input:invalid:focus:not(:checked)~.custom-control-label::before{border-color:#dc3545}.custom-file-input.is-invalid~.custom-file-label,.was-validated .custom-file-input:invalid~.custom-file-label{border-color:#dc3545}.custom-file-input.is-invalid:focus~.custom-file-label,.was-validated .custom-file-input:invalid:focus~.custom-file-label{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.form-inline{display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-align:center;align-items:center}.form-inline .form-check{width:100%}@media (min-width:576px){.form-inline label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;margin-bottom:0}.form-inline .form-group{display:-ms-flexbox;display:flex;-ms-flex:0 0 auto;flex:0 0 auto;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-align:center;align-items:center;margin-bottom:0}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-plaintext{display:inline-block}.form-inline .custom-select,.form-inline .input-group{width:auto}.form-inline .form-check{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:auto;padding-left:0}.form-inline .form-check-input{position:relative;-ms-flex-negative:0;flex-shrink:0;margin-top:0;margin-right:.25rem;margin-left:0}.form-inline .custom-control{-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.form-inline .custom-control-label{margin-bottom:0}}.btn{display:inline-block;font-weight:400;color:#212529;text-align:center;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:.375rem .75rem;font-size:1rem;line-height:1.5;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{color:#212529;text-decoration:none}.btn.focus,.btn:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.btn.disabled,.btn:disabled{opacity:.65}.btn:not(:disabled):not(.disabled){cursor:pointer}a.btn.disabled,fieldset:disabled a.btn{pointer-events:none}.btn-primary{color:#fff;background-color:#007bff;border-color:#007bff}.btn-primary:hover{color:#fff;background-color:#0069d9;border-color:#0062cc}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#0069d9;border-color:#0062cc;box-shadow:0 0 0 .2rem rgba(38,143,255,.5)}.btn-primary.disabled,.btn-primary:disabled{color:#fff;background-color:#007bff;border-color:#007bff}.btn-primary:not(:disabled):not(.disabled).active,.btn-primary:not(:disabled):not(.disabled):active,.show>.btn-primary.dropdown-toggle{color:#fff;background-color:#0062cc;border-color:#005cbf}.btn-primary:not(:disabled):not(.disabled).active:focus,.btn-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(38,143,255,.5)}.btn-secondary{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:hover{color:#fff;background-color:#5a6268;border-color:#545b62}.btn-secondary.focus,.btn-secondary:focus{color:#fff;background-color:#5a6268;border-color:#545b62;box-shadow:0 0 0 .2rem rgba(130,138,145,.5)}.btn-secondary.disabled,.btn-secondary:disabled{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:not(:disabled):not(.disabled).active,.btn-secondary:not(:disabled):not(.disabled):active,.show>.btn-secondary.dropdown-toggle{color:#fff;background-color:#545b62;border-color:#4e555b}.btn-secondary:not(:disabled):not(.disabled).active:focus,.btn-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(130,138,145,.5)}.btn-success{color:#fff;background-color:#28a745;border-color:#28a745}.btn-success:hover{color:#fff;background-color:#218838;border-color:#1e7e34}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#218838;border-color:#1e7e34;box-shadow:0 0 0 .2rem rgba(72,180,97,.5)}.btn-success.disabled,.btn-success:disabled{color:#fff;background-color:#28a745;border-color:#28a745}.btn-success:not(:disabled):not(.disabled).active,.btn-success:not(:disabled):not(.disabled):active,.show>.btn-success.dropdown-toggle{color:#fff;background-color:#1e7e34;border-color:#1c7430}.btn-success:not(:disabled):not(.disabled).active:focus,.btn-success:not(:disabled):not(.disabled):active:focus,.show>.btn-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(72,180,97,.5)}.btn-info{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-info:hover{color:#fff;background-color:#138496;border-color:#117a8b}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#138496;border-color:#117a8b;box-shadow:0 0 0 .2rem rgba(58,176,195,.5)}.btn-info.disabled,.btn-info:disabled{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-info:not(:disabled):not(.disabled).active,.btn-info:not(:disabled):not(.disabled):active,.show>.btn-info.dropdown-toggle{color:#fff;background-color:#117a8b;border-color:#10707f}.btn-info:not(:disabled):not(.disabled).active:focus,.btn-info:not(:disabled):not(.disabled):active:focus,.show>.btn-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(58,176,195,.5)}.btn-warning{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-warning:hover{color:#212529;background-color:#e0a800;border-color:#d39e00}.btn-warning.focus,.btn-warning:focus{color:#212529;background-color:#e0a800;border-color:#d39e00;box-shadow:0 0 0 .2rem rgba(222,170,12,.5)}.btn-warning.disabled,.btn-warning:disabled{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-warning:not(:disabled):not(.disabled).active,.btn-warning:not(:disabled):not(.disabled):active,.show>.btn-warning.dropdown-toggle{color:#212529;background-color:#d39e00;border-color:#c69500}.btn-warning:not(:disabled):not(.disabled).active:focus,.btn-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(222,170,12,.5)}.btn-danger{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:hover{color:#fff;background-color:#c82333;border-color:#bd2130}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c82333;border-color:#bd2130;box-shadow:0 0 0 .2rem rgba(225,83,97,.5)}.btn-danger.disabled,.btn-danger:disabled{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:not(:disabled):not(.disabled).active,.btn-danger:not(:disabled):not(.disabled):active,.show>.btn-danger.dropdown-toggle{color:#fff;background-color:#bd2130;border-color:#b21f2d}.btn-danger:not(:disabled):not(.disabled).active:focus,.btn-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(225,83,97,.5)}.btn-light{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:hover{color:#212529;background-color:#e2e6ea;border-color:#dae0e5}.btn-light.focus,.btn-light:focus{color:#212529;background-color:#e2e6ea;border-color:#dae0e5;box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.btn-light.disabled,.btn-light:disabled{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:not(:disabled):not(.disabled).active,.btn-light:not(:disabled):not(.disabled):active,.show>.btn-light.dropdown-toggle{color:#212529;background-color:#dae0e5;border-color:#d3d9df}.btn-light:not(:disabled):not(.disabled).active:focus,.btn-light:not(:disabled):not(.disabled):active:focus,.show>.btn-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.btn-dark{color:#fff;background-color:#343a40;border-color:#343a40}.btn-dark:hover{color:#fff;background-color:#23272b;border-color:#1d2124}.btn-dark.focus,.btn-dark:focus{color:#fff;background-color:#23272b;border-color:#1d2124;box-shadow:0 0 0 .2rem rgba(82,88,93,.5)}.btn-dark.disabled,.btn-dark:disabled{color:#fff;background-color:#343a40;border-color:#343a40}.btn-dark:not(:disabled):not(.disabled).active,.btn-dark:not(:disabled):not(.disabled):active,.show>.btn-dark.dropdown-toggle{color:#fff;background-color:#1d2124;border-color:#171a1d}.btn-dark:not(:disabled):not(.disabled).active:focus,.btn-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(82,88,93,.5)}.btn-outline-primary{color:#007bff;border-color:#007bff}.btn-outline-primary:hover{color:#fff;background-color:#007bff;border-color:#007bff}.btn-outline-primary.focus,.btn-outline-primary:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{color:#007bff;background-color:transparent}.btn-outline-primary:not(:disabled):not(.disabled).active,.btn-outline-primary:not(:disabled):not(.disabled):active,.show>.btn-outline-primary.dropdown-toggle{color:#fff;background-color:#007bff;border-color:#007bff}.btn-outline-primary:not(:disabled):not(.disabled).active:focus,.btn-outline-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-outline-secondary{color:#6c757d;border-color:#6c757d}.btn-outline-secondary:hover{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-outline-secondary.focus,.btn-outline-secondary:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{color:#6c757d;background-color:transparent}.btn-outline-secondary:not(:disabled):not(.disabled).active,.btn-outline-secondary:not(:disabled):not(.disabled):active,.show>.btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-outline-secondary:not(:disabled):not(.disabled).active:focus,.btn-outline-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.btn-outline-success{color:#28a745;border-color:#28a745}.btn-outline-success:hover{color:#fff;background-color:#28a745;border-color:#28a745}.btn-outline-success.focus,.btn-outline-success:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{color:#28a745;background-color:transparent}.btn-outline-success:not(:disabled):not(.disabled).active,.btn-outline-success:not(:disabled):not(.disabled):active,.show>.btn-outline-success.dropdown-toggle{color:#fff;background-color:#28a745;border-color:#28a745}.btn-outline-success:not(:disabled):not(.disabled).active:focus,.btn-outline-success:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-outline-info{color:#17a2b8;border-color:#17a2b8}.btn-outline-info:hover{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-outline-info.focus,.btn-outline-info:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{color:#17a2b8;background-color:transparent}.btn-outline-info:not(:disabled):not(.disabled).active,.btn-outline-info:not(:disabled):not(.disabled):active,.show>.btn-outline-info.dropdown-toggle{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-outline-info:not(:disabled):not(.disabled).active:focus,.btn-outline-info:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-outline-warning{color:#ffc107;border-color:#ffc107}.btn-outline-warning:hover{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-outline-warning.focus,.btn-outline-warning:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{color:#ffc107;background-color:transparent}.btn-outline-warning:not(:disabled):not(.disabled).active,.btn-outline-warning:not(:disabled):not(.disabled):active,.show>.btn-outline-warning.dropdown-toggle{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-outline-warning:not(:disabled):not(.disabled).active:focus,.btn-outline-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-outline-danger{color:#dc3545;border-color:#dc3545}.btn-outline-danger:hover{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-outline-danger.focus,.btn-outline-danger:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{color:#dc3545;background-color:transparent}.btn-outline-danger:not(:disabled):not(.disabled).active,.btn-outline-danger:not(:disabled):not(.disabled):active,.show>.btn-outline-danger.dropdown-toggle{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-outline-danger:not(:disabled):not(.disabled).active:focus,.btn-outline-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-outline-light{color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:hover{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light.focus,.btn-outline-light:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{color:#f8f9fa;background-color:transparent}.btn-outline-light:not(:disabled):not(.disabled).active,.btn-outline-light:not(:disabled):not(.disabled):active,.show>.btn-outline-light.dropdown-toggle{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:not(:disabled):not(.disabled).active:focus,.btn-outline-light:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-dark{color:#343a40;border-color:#343a40}.btn-outline-dark:hover{color:#fff;background-color:#343a40;border-color:#343a40}.btn-outline-dark.focus,.btn-outline-dark:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{color:#343a40;background-color:transparent}.btn-outline-dark:not(:disabled):not(.disabled).active,.btn-outline-dark:not(:disabled):not(.disabled):active,.show>.btn-outline-dark.dropdown-toggle{color:#fff;background-color:#343a40;border-color:#343a40}.btn-outline-dark:not(:disabled):not(.disabled).active:focus,.btn-outline-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-link{font-weight:400;color:#007bff;text-decoration:none}.btn-link:hover{color:#0056b3;text-decoration:underline}.btn-link.focus,.btn-link:focus{text-decoration:underline}.btn-link.disabled,.btn-link:disabled{color:#6c757d;pointer-events:none}.btn-group-lg>.btn,.btn-lg{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.btn-group-sm>.btn,.btn-sm{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:.5rem}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{position:relative;height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.dropdown,.dropleft,.dropright,.dropup{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.dropdown-menu-left{right:auto;left:0}.dropdown-menu-right{right:0;left:auto}@media (min-width:576px){.dropdown-menu-sm-left{right:auto;left:0}.dropdown-menu-sm-right{right:0;left:auto}}@media (min-width:768px){.dropdown-menu-md-left{right:auto;left:0}.dropdown-menu-md-right{right:0;left:auto}}@media (min-width:992px){.dropdown-menu-lg-left{right:auto;left:0}.dropdown-menu-lg-right{right:0;left:auto}}@media (min-width:1200px){.dropdown-menu-xl-left{right:auto;left:0}.dropdown-menu-xl-right{right:0;left:auto}}.dropup .dropdown-menu{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}.dropup .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-menu{top:0;right:auto;left:100%;margin-top:0;margin-left:.125rem}.dropright .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropright .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-toggle::after{vertical-align:0}.dropleft .dropdown-menu{top:0;right:100%;left:auto;margin-top:0;margin-right:.125rem}.dropleft .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:""}.dropleft .dropdown-toggle::after{display:none}.dropleft .dropdown-toggle::before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropleft .dropdown-toggle:empty::after{margin-left:0}.dropleft .dropdown-toggle::before{vertical-align:0}.dropdown-menu[x-placement^=bottom],.dropdown-menu[x-placement^=left],.dropdown-menu[x-placement^=right],.dropdown-menu[x-placement^=top]{right:auto;bottom:auto}.dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid #e9ecef}.dropdown-item{display:block;width:100%;padding:.25rem 1.5rem;clear:both;font-weight:400;color:#212529;text-align:inherit;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:focus,.dropdown-item:hover{color:#16181b;text-decoration:none;background-color:#e9ecef}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#007bff}.dropdown-item.disabled,.dropdown-item:disabled{color:#adb5bd;pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:.5rem 1.5rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}.dropdown-item-text{display:block;padding:.25rem 1.5rem;color:#212529}.btn-group,.btn-group-vertical{position:relative;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;-ms-flex:1 1 auto;flex:1 1 auto}.btn-group-vertical>.btn:hover,.btn-group>.btn:hover{z-index:1}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus{z-index:1}.btn-toolbar{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:start;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group>.btn-group:not(:first-child),.btn-group>.btn:not(:first-child){margin-left:-1px}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split::after,.dropright .dropdown-toggle-split::after,.dropup .dropdown-toggle-split::after{margin-left:0}.dropleft .dropdown-toggle-split::before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:-1px}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.btn-group-toggle>.btn,.btn-group-toggle>.btn-group>.btn{margin-bottom:0}.btn-group-toggle>.btn input[type=checkbox],.btn-group-toggle>.btn input[type=radio],.btn-group-toggle>.btn-group>.btn input[type=checkbox],.btn-group-toggle>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:stretch;align-items:stretch;width:100%}.input-group>.custom-file,.input-group>.custom-select,.input-group>.form-control,.input-group>.form-control-plaintext{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;width:1%;min-width:0;margin-bottom:0}.input-group>.custom-file+.custom-file,.input-group>.custom-file+.custom-select,.input-group>.custom-file+.form-control,.input-group>.custom-select+.custom-file,.input-group>.custom-select+.custom-select,.input-group>.custom-select+.form-control,.input-group>.form-control+.custom-file,.input-group>.form-control+.custom-select,.input-group>.form-control+.form-control,.input-group>.form-control-plaintext+.custom-file,.input-group>.form-control-plaintext+.custom-select,.input-group>.form-control-plaintext+.form-control{margin-left:-1px}.input-group>.custom-file .custom-file-input:focus~.custom-file-label,.input-group>.custom-select:focus,.input-group>.form-control:focus{z-index:3}.input-group>.custom-file .custom-file-input:focus{z-index:4}.input-group>.custom-select:not(:first-child),.input-group>.form-control:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.custom-file{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input-group>.custom-file:not(:first-child) .custom-file-label,.input-group>.custom-file:not(:last-child) .custom-file-label{border-top-left-radius:0;border-bottom-left-radius:0}.input-group:not(.has-validation)>.custom-file:not(:last-child) .custom-file-label::after,.input-group:not(.has-validation)>.custom-select:not(:last-child),.input-group:not(.has-validation)>.form-control:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.input-group.has-validation>.custom-file:nth-last-child(n+3) .custom-file-label::after,.input-group.has-validation>.custom-select:nth-last-child(n+3),.input-group.has-validation>.form-control:nth-last-child(n+3){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-append,.input-group-prepend{display:-ms-flexbox;display:flex}.input-group-append .btn,.input-group-prepend .btn{position:relative;z-index:2}.input-group-append .btn:focus,.input-group-prepend .btn:focus{z-index:3}.input-group-append .btn+.btn,.input-group-append .btn+.input-group-text,.input-group-append .input-group-text+.btn,.input-group-append .input-group-text+.input-group-text,.input-group-prepend .btn+.btn,.input-group-prepend .btn+.input-group-text,.input-group-prepend .input-group-text+.btn,.input-group-prepend .input-group-text+.input-group-text{margin-left:-1px}.input-group-prepend{margin-right:-1px}.input-group-append{margin-left:-1px}.input-group-text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:.375rem .75rem;margin-bottom:0;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.25rem}.input-group-text input[type=checkbox],.input-group-text input[type=radio]{margin-top:0}.input-group-lg>.custom-select,.input-group-lg>.form-control:not(textarea){height:calc(1.5em + 1rem + 2px)}.input-group-lg>.custom-select,.input-group-lg>.form-control,.input-group-lg>.input-group-append>.btn,.input-group-lg>.input-group-append>.input-group-text,.input-group-lg>.input-group-prepend>.btn,.input-group-lg>.input-group-prepend>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.input-group-sm>.custom-select,.input-group-sm>.form-control:not(textarea){height:calc(1.5em + .5rem + 2px)}.input-group-sm>.custom-select,.input-group-sm>.form-control,.input-group-sm>.input-group-append>.btn,.input-group-sm>.input-group-append>.input-group-text,.input-group-sm>.input-group-prepend>.btn,.input-group-sm>.input-group-prepend>.input-group-text{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.input-group-lg>.custom-select,.input-group-sm>.custom-select{padding-right:1.75rem}.input-group.has-validation>.input-group-append:nth-last-child(n+3)>.btn,.input-group.has-validation>.input-group-append:nth-last-child(n+3)>.input-group-text,.input-group:not(.has-validation)>.input-group-append:not(:last-child)>.btn,.input-group:not(.has-validation)>.input-group-append:not(:last-child)>.input-group-text,.input-group>.input-group-append:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group>.input-group-append:last-child>.input-group-text:not(:last-child),.input-group>.input-group-prepend>.btn,.input-group>.input-group-prepend>.input-group-text{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.input-group-append>.btn,.input-group>.input-group-append>.input-group-text,.input-group>.input-group-prepend:first-child>.btn:not(:first-child),.input-group>.input-group-prepend:first-child>.input-group-text:not(:first-child),.input-group>.input-group-prepend:not(:first-child)>.btn,.input-group>.input-group-prepend:not(:first-child)>.input-group-text{border-top-left-radius:0;border-bottom-left-radius:0}.custom-control{position:relative;z-index:1;display:block;min-height:1.5rem;padding-left:1.5rem;-webkit-print-color-adjust:exact;color-adjust:exact}.custom-control-inline{display:-ms-inline-flexbox;display:inline-flex;margin-right:1rem}.custom-control-input{position:absolute;left:0;z-index:-1;width:1rem;height:1.25rem;opacity:0}.custom-control-input:checked~.custom-control-label::before{color:#fff;border-color:#007bff;background-color:#007bff}.custom-control-input:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-control-input:focus:not(:checked)~.custom-control-label::before{border-color:#80bdff}.custom-control-input:not(:disabled):active~.custom-control-label::before{color:#fff;background-color:#b3d7ff;border-color:#b3d7ff}.custom-control-input:disabled~.custom-control-label,.custom-control-input[disabled]~.custom-control-label{color:#6c757d}.custom-control-input:disabled~.custom-control-label::before,.custom-control-input[disabled]~.custom-control-label::before{background-color:#e9ecef}.custom-control-label{position:relative;margin-bottom:0;vertical-align:top}.custom-control-label::before{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;pointer-events:none;content:"";background-color:#fff;border:#adb5bd solid 1px}.custom-control-label::after{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;content:"";background:50%/50% 50% no-repeat}.custom-checkbox .custom-control-label::before{border-radius:.25rem}.custom-checkbox .custom-control-input:checked~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/%3e%3c/svg%3e")}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label::before{border-color:#007bff;background-color:#007bff}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3e%3cpath stroke='%23fff' d='M0 2h4'/%3e%3c/svg%3e")}.custom-checkbox .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-checkbox .custom-control-input:disabled:indeterminate~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-radio .custom-control-label::before{border-radius:50%}.custom-radio .custom-control-input:checked~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e")}.custom-radio .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-switch{padding-left:2.25rem}.custom-switch .custom-control-label::before{left:-2.25rem;width:1.75rem;pointer-events:all;border-radius:.5rem}.custom-switch .custom-control-label::after{top:calc(.25rem + 2px);left:calc(-2.25rem + 2px);width:calc(1rem - 4px);height:calc(1rem - 4px);background-color:#adb5bd;border-radius:.5rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-transform .15s ease-in-out;transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-transform .15s ease-in-out}@media (prefers-reduced-motion:reduce){.custom-switch .custom-control-label::after{transition:none}}.custom-switch .custom-control-input:checked~.custom-control-label::after{background-color:#fff;-webkit-transform:translateX(.75rem);transform:translateX(.75rem)}.custom-switch .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-select{display:inline-block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem 1.75rem .375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;vertical-align:middle;background:#fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") right .75rem center/8px 10px no-repeat;border:1px solid #ced4da;border-radius:.25rem;-webkit-appearance:none;-moz-appearance:none;appearance:none}.custom-select:focus{border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-select:focus::-ms-value{color:#495057;background-color:#fff}.custom-select[multiple],.custom-select[size]:not([size="1"]){height:auto;padding-right:.75rem;background-image:none}.custom-select:disabled{color:#6c757d;background-color:#e9ecef}.custom-select::-ms-expand{display:none}.custom-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #495057}.custom-select-sm{height:calc(1.5em + .5rem + 2px);padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem}.custom-select-lg{height:calc(1.5em + 1rem + 2px);padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem}.custom-file{position:relative;display:inline-block;width:100%;height:calc(1.5em + .75rem + 2px);margin-bottom:0}.custom-file-input{position:relative;z-index:2;width:100%;height:calc(1.5em + .75rem + 2px);margin:0;overflow:hidden;opacity:0}.custom-file-input:focus~.custom-file-label{border-color:#80bdff;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-file-input:disabled~.custom-file-label,.custom-file-input[disabled]~.custom-file-label{background-color:#e9ecef}.custom-file-input:lang(en)~.custom-file-label::after{content:"Browse"}.custom-file-input~.custom-file-label[data-browse]::after{content:attr(data-browse)}.custom-file-label{position:absolute;top:0;right:0;left:0;z-index:1;height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;overflow:hidden;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem}.custom-file-label::after{position:absolute;top:0;right:0;bottom:0;z-index:3;display:block;height:calc(1.5em + .75rem);padding:.375rem .75rem;line-height:1.5;color:#495057;content:"Browse";background-color:#e9ecef;border-left:inherit;border-radius:0 .25rem .25rem 0}.custom-range{width:100%;height:1.4rem;padding:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.custom-range:focus{outline:0}.custom-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range:focus::-ms-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range::-moz-focus-outer{border:0}.custom-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#007bff;border:0;border-radius:1rem;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.custom-range::-webkit-slider-thumb:active{background-color:#b3d7ff}.custom-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.custom-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#007bff;border:0;border-radius:1rem;-moz-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-moz-range-thumb{-moz-transition:none;transition:none}}.custom-range::-moz-range-thumb:active{background-color:#b3d7ff}.custom-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.custom-range::-ms-thumb{width:1rem;height:1rem;margin-top:0;margin-right:.2rem;margin-left:.2rem;background-color:#007bff;border:0;border-radius:1rem;-ms-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-ms-thumb{-ms-transition:none;transition:none}}.custom-range::-ms-thumb:active{background-color:#b3d7ff}.custom-range::-ms-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:transparent;border-color:transparent;border-width:.5rem}.custom-range::-ms-fill-lower{background-color:#dee2e6;border-radius:1rem}.custom-range::-ms-fill-upper{margin-right:15px;background-color:#dee2e6;border-radius:1rem}.custom-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}.custom-range:disabled::-webkit-slider-runnable-track{cursor:default}.custom-range:disabled::-moz-range-thumb{background-color:#adb5bd}.custom-range:disabled::-moz-range-track{cursor:default}.custom-range:disabled::-ms-thumb{background-color:#adb5bd}.custom-control-label::before,.custom-file-label,.custom-select{transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.custom-control-label::before,.custom-file-label,.custom-select{transition:none}}.nav{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:.5rem 1rem}.nav-link:focus,.nav-link:hover{text-decoration:none}.nav-link.disabled{color:#6c757d;pointer-events:none;cursor:default}.nav-tabs{border-bottom:1px solid #dee2e6}.nav-tabs .nav-link{margin-bottom:-1px;border:1px solid transparent;border-top-left-radius:.25rem;border-top-right-radius:.25rem}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{border-color:#e9ecef #e9ecef #dee2e6}.nav-tabs .nav-link.disabled{color:#6c757d;background-color:transparent;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:#495057;background-color:#fff;border-color:#dee2e6 #dee2e6 #fff}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.nav-pills .nav-link{border-radius:.25rem}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fff;background-color:#007bff}.nav-fill .nav-item,.nav-fill>.nav-link{-ms-flex:1 1 auto;flex:1 1 auto;text-align:center}.nav-justified .nav-item,.nav-justified>.nav-link{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;text-align:center}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{position:relative;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:.5rem 1rem}.navbar .container,.navbar .container-fluid,.navbar .container-lg,.navbar .container-md,.navbar .container-sm,.navbar .container-xl{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.navbar-brand{display:inline-block;padding-top:.3125rem;padding-bottom:.3125rem;margin-right:1rem;font-size:1.25rem;line-height:inherit;white-space:nowrap}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-nav{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link{padding-right:0;padding-left:0}.navbar-nav .dropdown-menu{position:static;float:none}.navbar-text{display:inline-block;padding-top:.5rem;padding-bottom:.5rem}.navbar-collapse{-ms-flex-preferred-size:100%;flex-basis:100%;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center}.navbar-toggler{padding:.25rem .75rem;font-size:1.25rem;line-height:1;background-color:transparent;border:1px solid transparent;border-radius:.25rem}.navbar-toggler:focus,.navbar-toggler:hover{text-decoration:none}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;content:"";background:50%/100% 100% no-repeat}.navbar-nav-scroll{max-height:75vh;overflow-y:auto}@media (max-width:575.98px){.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid,.navbar-expand-sm>.container-lg,.navbar-expand-sm>.container-md,.navbar-expand-sm>.container-sm,.navbar-expand-sm>.container-xl{padding-right:0;padding-left:0}}@media (min-width:576px){.navbar-expand-sm{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-sm .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid,.navbar-expand-sm>.container-lg,.navbar-expand-sm>.container-md,.navbar-expand-sm>.container-sm,.navbar-expand-sm>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}}@media (max-width:767.98px){.navbar-expand-md>.container,.navbar-expand-md>.container-fluid,.navbar-expand-md>.container-lg,.navbar-expand-md>.container-md,.navbar-expand-md>.container-sm,.navbar-expand-md>.container-xl{padding-right:0;padding-left:0}}@media (min-width:768px){.navbar-expand-md{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-md .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-md>.container,.navbar-expand-md>.container-fluid,.navbar-expand-md>.container-lg,.navbar-expand-md>.container-md,.navbar-expand-md>.container-sm,.navbar-expand-md>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}}@media (max-width:991.98px){.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid,.navbar-expand-lg>.container-lg,.navbar-expand-lg>.container-md,.navbar-expand-lg>.container-sm,.navbar-expand-lg>.container-xl{padding-right:0;padding-left:0}}@media (min-width:992px){.navbar-expand-lg{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-lg .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid,.navbar-expand-lg>.container-lg,.navbar-expand-lg>.container-md,.navbar-expand-lg>.container-sm,.navbar-expand-lg>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}}@media (max-width:1199.98px){.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid,.navbar-expand-xl>.container-lg,.navbar-expand-xl>.container-md,.navbar-expand-xl>.container-sm,.navbar-expand-xl>.container-xl{padding-right:0;padding-left:0}}@media (min-width:1200px){.navbar-expand-xl{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-xl .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid,.navbar-expand-xl>.container-lg,.navbar-expand-xl>.container-md,.navbar-expand-xl>.container-sm,.navbar-expand-xl>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}}.navbar-expand{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand>.container,.navbar-expand>.container-fluid,.navbar-expand>.container-lg,.navbar-expand>.container-md,.navbar-expand>.container-sm,.navbar-expand>.container-xl{padding-right:0;padding-left:0}.navbar-expand .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand>.container,.navbar-expand>.container-fluid,.navbar-expand>.container-lg,.navbar-expand>.container-md,.navbar-expand>.container-sm,.navbar-expand>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-light .navbar-brand{color:rgba(0,0,0,.9)}.navbar-light .navbar-brand:focus,.navbar-light .navbar-brand:hover{color:rgba(0,0,0,.9)}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.5)}.navbar-light .navbar-nav .nav-link:focus,.navbar-light .navbar-nav .nav-link:hover{color:rgba(0,0,0,.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(0,0,0,.3)}.navbar-light .navbar-nav .active>.nav-link,.navbar-light .navbar-nav .nav-link.active,.navbar-light .navbar-nav .nav-link.show,.navbar-light .navbar-nav .show>.nav-link{color:rgba(0,0,0,.9)}.navbar-light .navbar-toggler{color:rgba(0,0,0,.5);border-color:rgba(0,0,0,.1)}.navbar-light .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-light .navbar-text{color:rgba(0,0,0,.5)}.navbar-light .navbar-text a{color:rgba(0,0,0,.9)}.navbar-light .navbar-text a:focus,.navbar-light .navbar-text a:hover{color:rgba(0,0,0,.9)}.navbar-dark .navbar-brand{color:#fff}.navbar-dark .navbar-brand:focus,.navbar-dark .navbar-brand:hover{color:#fff}.navbar-dark .navbar-nav .nav-link{color:rgba(255,255,255,.5)}.navbar-dark .navbar-nav .nav-link:focus,.navbar-dark .navbar-nav .nav-link:hover{color:rgba(255,255,255,.75)}.navbar-dark .navbar-nav .nav-link.disabled{color:rgba(255,255,255,.25)}.navbar-dark .navbar-nav .active>.nav-link,.navbar-dark .navbar-nav .nav-link.active,.navbar-dark .navbar-nav .nav-link.show,.navbar-dark .navbar-nav .show>.nav-link{color:#fff}.navbar-dark .navbar-toggler{color:rgba(255,255,255,.5);border-color:rgba(255,255,255,.1)}.navbar-dark .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-dark .navbar-text{color:rgba(255,255,255,.5)}.navbar-dark .navbar-text a{color:#fff}.navbar-dark .navbar-text a:focus,.navbar-dark .navbar-text a:hover{color:#fff}.card{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid rgba(0,0,0,.125);border-radius:.25rem}.card>hr{margin-right:0;margin-left:0}.card>.list-group{border-top:inherit;border-bottom:inherit}.card>.list-group:first-child{border-top-width:0;border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card>.list-group:last-child{border-bottom-width:0;border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card>.card-header+.list-group,.card>.list-group+.card-footer{border-top:0}.card-body{-ms-flex:1 1 auto;flex:1 1 auto;min-height:1px;padding:1.25rem}.card-title{margin-bottom:.75rem}.card-subtitle{margin-top:-.375rem;margin-bottom:0}.card-text:last-child{margin-bottom:0}.card-link:hover{text-decoration:none}.card-link+.card-link{margin-left:1.25rem}.card-header{padding:.75rem 1.25rem;margin-bottom:0;background-color:rgba(0,0,0,.03);border-bottom:1px solid rgba(0,0,0,.125)}.card-header:first-child{border-radius:calc(.25rem - 1px) calc(.25rem - 1px) 0 0}.card-footer{padding:.75rem 1.25rem;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.125)}.card-footer:last-child{border-radius:0 0 calc(.25rem - 1px) calc(.25rem - 1px)}.card-header-tabs{margin-right:-.625rem;margin-bottom:-.75rem;margin-left:-.625rem;border-bottom:0}.card-header-pills{margin-right:-.625rem;margin-left:-.625rem}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1.25rem;border-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom,.card-img-top{-ms-flex-negative:0;flex-shrink:0;width:100%}.card-img,.card-img-top{border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom{border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card-deck .card{margin-bottom:15px}@media (min-width:576px){.card-deck{display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;margin-right:-15px;margin-left:-15px}.card-deck .card{-ms-flex:1 0 0%;flex:1 0 0%;margin-right:15px;margin-bottom:0;margin-left:15px}}.card-group>.card{margin-bottom:15px}@media (min-width:576px){.card-group{display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap}.card-group>.card{-ms-flex:1 0 0%;flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child) .card-header,.card-group>.card:not(:last-child) .card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-footer,.card-group>.card:not(:last-child) .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child) .card-header,.card-group>.card:not(:first-child) .card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-footer,.card-group>.card:not(:first-child) .card-img-bottom{border-bottom-left-radius:0}}.card-columns .card{margin-bottom:.75rem}@media (min-width:576px){.card-columns{-webkit-column-count:3;-moz-column-count:3;column-count:3;-webkit-column-gap:1.25rem;-moz-column-gap:1.25rem;column-gap:1.25rem;orphans:1;widows:1}.card-columns .card{display:inline-block;width:100%}}.accordion{overflow-anchor:none}.accordion>.card{overflow:hidden}.accordion>.card:not(:last-of-type){border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.accordion>.card:not(:first-of-type){border-top-left-radius:0;border-top-right-radius:0}.accordion>.card>.card-header{border-radius:0;margin-bottom:-1px}.breadcrumb{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:.75rem 1rem;margin-bottom:1rem;list-style:none;background-color:#e9ecef;border-radius:.25rem}.breadcrumb-item+.breadcrumb-item{padding-left:.5rem}.breadcrumb-item+.breadcrumb-item::before{float:left;padding-right:.5rem;color:#6c757d;content:"/"}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:underline}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:none}.breadcrumb-item.active{color:#6c757d}.pagination{display:-ms-flexbox;display:flex;padding-left:0;list-style:none;border-radius:.25rem}.page-link{position:relative;display:block;padding:.5rem .75rem;margin-left:-1px;line-height:1.25;color:#007bff;background-color:#fff;border:1px solid #dee2e6}.page-link:hover{z-index:2;color:#0056b3;text-decoration:none;background-color:#e9ecef;border-color:#dee2e6}.page-link:focus{z-index:3;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.page-item:first-child .page-link{margin-left:0;border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.page-item:last-child .page-link{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.page-item.active .page-link{z-index:3;color:#fff;background-color:#007bff;border-color:#007bff}.page-item.disabled .page-link{color:#6c757d;pointer-events:none;cursor:auto;background-color:#fff;border-color:#dee2e6}.pagination-lg .page-link{padding:.75rem 1.5rem;font-size:1.25rem;line-height:1.5}.pagination-lg .page-item:first-child .page-link{border-top-left-radius:.3rem;border-bottom-left-radius:.3rem}.pagination-lg .page-item:last-child .page-link{border-top-right-radius:.3rem;border-bottom-right-radius:.3rem}.pagination-sm .page-link{padding:.25rem .5rem;font-size:.875rem;line-height:1.5}.pagination-sm .page-item:first-child .page-link{border-top-left-radius:.2rem;border-bottom-left-radius:.2rem}.pagination-sm .page-item:last-child .page-link{border-top-right-radius:.2rem;border-bottom-right-radius:.2rem}.badge{display:inline-block;padding:.25em .4em;font-size:75%;font-weight:700;line-height:1;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.badge{transition:none}}a.badge:focus,a.badge:hover{text-decoration:none}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.badge-pill{padding-right:.6em;padding-left:.6em;border-radius:10rem}.badge-primary{color:#fff;background-color:#007bff}a.badge-primary:focus,a.badge-primary:hover{color:#fff;background-color:#0062cc}a.badge-primary.focus,a.badge-primary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.badge-secondary{color:#fff;background-color:#6c757d}a.badge-secondary:focus,a.badge-secondary:hover{color:#fff;background-color:#545b62}a.badge-secondary.focus,a.badge-secondary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.badge-success{color:#fff;background-color:#28a745}a.badge-success:focus,a.badge-success:hover{color:#fff;background-color:#1e7e34}a.badge-success.focus,a.badge-success:focus{outline:0;box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.badge-info{color:#fff;background-color:#17a2b8}a.badge-info:focus,a.badge-info:hover{color:#fff;background-color:#117a8b}a.badge-info.focus,a.badge-info:focus{outline:0;box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.badge-warning{color:#212529;background-color:#ffc107}a.badge-warning:focus,a.badge-warning:hover{color:#212529;background-color:#d39e00}a.badge-warning.focus,a.badge-warning:focus{outline:0;box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.badge-danger{color:#fff;background-color:#dc3545}a.badge-danger:focus,a.badge-danger:hover{color:#fff;background-color:#bd2130}a.badge-danger.focus,a.badge-danger:focus{outline:0;box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.badge-light{color:#212529;background-color:#f8f9fa}a.badge-light:focus,a.badge-light:hover{color:#212529;background-color:#dae0e5}a.badge-light.focus,a.badge-light:focus{outline:0;box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.badge-dark{color:#fff;background-color:#343a40}a.badge-dark:focus,a.badge-dark:hover{color:#fff;background-color:#1d2124}a.badge-dark.focus,a.badge-dark:focus{outline:0;box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.jumbotron{padding:2rem 1rem;margin-bottom:2rem;background-color:#e9ecef;border-radius:.3rem}@media (min-width:576px){.jumbotron{padding:4rem 2rem}}.jumbotron-fluid{padding-right:0;padding-left:0;border-radius:0}.alert{position:relative;padding:.75rem 1.25rem;margin-bottom:1rem;border:1px solid transparent;border-radius:.25rem}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:4rem}.alert-dismissible .close{position:absolute;top:0;right:0;z-index:2;padding:.75rem 1.25rem;color:inherit}.alert-primary{color:#004085;background-color:#cce5ff;border-color:#b8daff}.alert-primary hr{border-top-color:#9fcdff}.alert-primary .alert-link{color:#002752}.alert-secondary{color:#383d41;background-color:#e2e3e5;border-color:#d6d8db}.alert-secondary hr{border-top-color:#c8cbcf}.alert-secondary .alert-link{color:#202326}.alert-success{color:#155724;background-color:#d4edda;border-color:#c3e6cb}.alert-success hr{border-top-color:#b1dfbb}.alert-success .alert-link{color:#0b2e13}.alert-info{color:#0c5460;background-color:#d1ecf1;border-color:#bee5eb}.alert-info hr{border-top-color:#abdde5}.alert-info .alert-link{color:#062c33}.alert-warning{color:#856404;background-color:#fff3cd;border-color:#ffeeba}.alert-warning hr{border-top-color:#ffe8a1}.alert-warning .alert-link{color:#533f03}.alert-danger{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.alert-danger hr{border-top-color:#f1b0b7}.alert-danger .alert-link{color:#491217}.alert-light{color:#818182;background-color:#fefefe;border-color:#fdfdfe}.alert-light hr{border-top-color:#ececf6}.alert-light .alert-link{color:#686868}.alert-dark{color:#1b1e21;background-color:#d6d8d9;border-color:#c6c8ca}.alert-dark hr{border-top-color:#b9bbbe}.alert-dark .alert-link{color:#040505}@-webkit-keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}.progress{display:-ms-flexbox;display:flex;height:1rem;overflow:hidden;line-height:0;font-size:.75rem;background-color:#e9ecef;border-radius:.25rem}.progress-bar{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;overflow:hidden;color:#fff;text-align:center;white-space:nowrap;background-color:#007bff;transition:width .6s ease}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:1rem 1rem}.progress-bar-animated{-webkit-animation:1s linear infinite progress-bar-stripes;animation:1s linear infinite progress-bar-stripes}@media (prefers-reduced-motion:reduce){.progress-bar-animated{-webkit-animation:none;animation:none}}.media{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.media-body{-ms-flex:1;flex:1}.list-group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0;border-radius:.25rem}.list-group-item-action{width:100%;color:#495057;text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{z-index:1;color:#495057;text-decoration:none;background-color:#f8f9fa}.list-group-item-action:active{color:#212529;background-color:#e9ecef}.list-group-item{position:relative;display:block;padding:.75rem 1.25rem;background-color:#fff;border:1px solid rgba(0,0,0,.125)}.list-group-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.list-group-item:last-child{border-bottom-right-radius:inherit;border-bottom-left-radius:inherit}.list-group-item.disabled,.list-group-item:disabled{color:#6c757d;pointer-events:none;background-color:#fff}.list-group-item.active{z-index:2;color:#fff;background-color:#007bff;border-color:#007bff}.list-group-item+.list-group-item{border-top-width:0}.list-group-item+.list-group-item.active{margin-top:-1px;border-top-width:1px}.list-group-horizontal{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal>.list-group-item.active{margin-top:0}.list-group-horizontal>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}@media (min-width:576px){.list-group-horizontal-sm{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-sm>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-sm>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-sm>.list-group-item.active{margin-top:0}.list-group-horizontal-sm>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-sm>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:768px){.list-group-horizontal-md{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-md>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-md>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-md>.list-group-item.active{margin-top:0}.list-group-horizontal-md>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-md>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:992px){.list-group-horizontal-lg{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-lg>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-lg>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-lg>.list-group-item.active{margin-top:0}.list-group-horizontal-lg>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-lg>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:1200px){.list-group-horizontal-xl{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-xl>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-xl>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-xl>.list-group-item.active{margin-top:0}.list-group-horizontal-xl>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-xl>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}.list-group-flush{border-radius:0}.list-group-flush>.list-group-item{border-width:0 0 1px}.list-group-flush>.list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{color:#004085;background-color:#b8daff}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#004085;background-color:#9fcdff}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#004085;border-color:#004085}.list-group-item-secondary{color:#383d41;background-color:#d6d8db}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#383d41;background-color:#c8cbcf}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#383d41;border-color:#383d41}.list-group-item-success{color:#155724;background-color:#c3e6cb}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#155724;background-color:#b1dfbb}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#155724;border-color:#155724}.list-group-item-info{color:#0c5460;background-color:#bee5eb}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#0c5460;background-color:#abdde5}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#0c5460;border-color:#0c5460}.list-group-item-warning{color:#856404;background-color:#ffeeba}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#856404;background-color:#ffe8a1}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#856404;border-color:#856404}.list-group-item-danger{color:#721c24;background-color:#f5c6cb}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#721c24;background-color:#f1b0b7}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#721c24;border-color:#721c24}.list-group-item-light{color:#818182;background-color:#fdfdfe}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#818182;background-color:#ececf6}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#818182;border-color:#818182}.list-group-item-dark{color:#1b1e21;background-color:#c6c8ca}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#1b1e21;background-color:#b9bbbe}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#1b1e21;border-color:#1b1e21}.close{float:right;font-size:1.5rem;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.5}.close:hover{color:#000;text-decoration:none}.close:not(:disabled):not(.disabled):focus,.close:not(:disabled):not(.disabled):hover{opacity:.75}button.close{padding:0;background-color:transparent;border:0}a.close.disabled{pointer-events:none}.toast{-ms-flex-preferred-size:350px;flex-basis:350px;max-width:350px;font-size:.875rem;background-color:rgba(255,255,255,.85);background-clip:padding-box;border:1px solid rgba(0,0,0,.1);box-shadow:0 .25rem .75rem rgba(0,0,0,.1);opacity:0;border-radius:.25rem}.toast:not(:last-child){margin-bottom:.75rem}.toast.showing{opacity:1}.toast.show{display:block;opacity:1}.toast.hide{display:none}.toast-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:.25rem .75rem;color:#6c757d;background-color:rgba(255,255,255,.85);background-clip:padding-box;border-bottom:1px solid rgba(0,0,0,.05);border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.toast-body{padding:.75rem}.modal-open{overflow:hidden}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal{position:fixed;top:0;left:0;z-index:1050;display:none;width:100%;height:100%;overflow:hidden;outline:0}.modal-dialog{position:relative;width:auto;margin:.5rem;pointer-events:none}.modal.fade .modal-dialog{transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;transition:transform .3s ease-out,-webkit-transform .3s ease-out;-webkit-transform:translate(0,-50px);transform:translate(0,-50px)}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{-webkit-transform:none;transform:none}.modal.modal-static .modal-dialog{-webkit-transform:scale(1.02);transform:scale(1.02)}.modal-dialog-scrollable{display:-ms-flexbox;display:flex;max-height:calc(100% - 1rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 1rem);overflow:hidden}.modal-dialog-scrollable .modal-footer,.modal-dialog-scrollable .modal-header{-ms-flex-negative:0;flex-shrink:0}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:calc(100% - 1rem)}.modal-dialog-centered::before{display:block;height:calc(100vh - 1rem);height:-webkit-min-content;height:-moz-min-content;height:min-content;content:""}.modal-dialog-centered.modal-dialog-scrollable{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;height:100%}.modal-dialog-centered.modal-dialog-scrollable .modal-content{max-height:none}.modal-dialog-centered.modal-dialog-scrollable::before{content:none}.modal-content{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;outline:0}.modal-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.5}.modal-header{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:justify;justify-content:space-between;padding:1rem 1rem;border-bottom:1px solid #dee2e6;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.modal-header .close{padding:1rem 1rem;margin:-1rem -1rem -1rem auto}.modal-title{margin-bottom:0;line-height:1.5}.modal-body{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;padding:1rem}.modal-footer{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end;padding:.75rem;border-top:1px solid #dee2e6;border-bottom-right-radius:calc(.3rem - 1px);border-bottom-left-radius:calc(.3rem - 1px)}.modal-footer>*{margin:.25rem}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:576px){.modal-dialog{max-width:500px;margin:1.75rem auto}.modal-dialog-scrollable{max-height:calc(100% - 3.5rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 3.5rem)}.modal-dialog-centered{min-height:calc(100% - 3.5rem)}.modal-dialog-centered::before{height:calc(100vh - 3.5rem);height:-webkit-min-content;height:-moz-min-content;height:min-content}.modal-sm{max-width:300px}}@media (min-width:992px){.modal-lg,.modal-xl{max-width:800px}}@media (min-width:1200px){.modal-xl{max-width:1140px}}.tooltip{position:absolute;z-index:1070;display:block;margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;opacity:0}.tooltip.show{opacity:.9}.tooltip .arrow{position:absolute;display:block;width:.8rem;height:.4rem}.tooltip .arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[x-placement^=top],.bs-tooltip-top{padding:.4rem 0}.bs-tooltip-auto[x-placement^=top] .arrow,.bs-tooltip-top .arrow{bottom:0}.bs-tooltip-auto[x-placement^=top] .arrow::before,.bs-tooltip-top .arrow::before{top:0;border-width:.4rem .4rem 0;border-top-color:#000}.bs-tooltip-auto[x-placement^=right],.bs-tooltip-right{padding:0 .4rem}.bs-tooltip-auto[x-placement^=right] .arrow,.bs-tooltip-right .arrow{left:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=right] .arrow::before,.bs-tooltip-right .arrow::before{right:0;border-width:.4rem .4rem .4rem 0;border-right-color:#000}.bs-tooltip-auto[x-placement^=bottom],.bs-tooltip-bottom{padding:.4rem 0}.bs-tooltip-auto[x-placement^=bottom] .arrow,.bs-tooltip-bottom .arrow{top:0}.bs-tooltip-auto[x-placement^=bottom] .arrow::before,.bs-tooltip-bottom .arrow::before{bottom:0;border-width:0 .4rem .4rem;border-bottom-color:#000}.bs-tooltip-auto[x-placement^=left],.bs-tooltip-left{padding:0 .4rem}.bs-tooltip-auto[x-placement^=left] .arrow,.bs-tooltip-left .arrow{right:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=left] .arrow::before,.bs-tooltip-left .arrow::before{left:0;border-width:.4rem 0 .4rem .4rem;border-left-color:#000}.tooltip-inner{max-width:200px;padding:.25rem .5rem;color:#fff;text-align:center;background-color:#000;border-radius:.25rem}.popover{position:absolute;top:0;left:0;z-index:1060;display:block;max-width:276px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem}.popover .arrow{position:absolute;display:block;width:1rem;height:.5rem;margin:0 .3rem}.popover .arrow::after,.popover .arrow::before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid}.bs-popover-auto[x-placement^=top],.bs-popover-top{margin-bottom:.5rem}.bs-popover-auto[x-placement^=top]>.arrow,.bs-popover-top>.arrow{bottom:calc(-.5rem - 1px)}.bs-popover-auto[x-placement^=top]>.arrow::before,.bs-popover-top>.arrow::before{bottom:0;border-width:.5rem .5rem 0;border-top-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=top]>.arrow::after,.bs-popover-top>.arrow::after{bottom:1px;border-width:.5rem .5rem 0;border-top-color:#fff}.bs-popover-auto[x-placement^=right],.bs-popover-right{margin-left:.5rem}.bs-popover-auto[x-placement^=right]>.arrow,.bs-popover-right>.arrow{left:calc(-.5rem - 1px);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=right]>.arrow::before,.bs-popover-right>.arrow::before{left:0;border-width:.5rem .5rem .5rem 0;border-right-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=right]>.arrow::after,.bs-popover-right>.arrow::after{left:1px;border-width:.5rem .5rem .5rem 0;border-right-color:#fff}.bs-popover-auto[x-placement^=bottom],.bs-popover-bottom{margin-top:.5rem}.bs-popover-auto[x-placement^=bottom]>.arrow,.bs-popover-bottom>.arrow{top:calc(-.5rem - 1px)}.bs-popover-auto[x-placement^=bottom]>.arrow::before,.bs-popover-bottom>.arrow::before{top:0;border-width:0 .5rem .5rem .5rem;border-bottom-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=bottom]>.arrow::after,.bs-popover-bottom>.arrow::after{top:1px;border-width:0 .5rem .5rem .5rem;border-bottom-color:#fff}.bs-popover-auto[x-placement^=bottom] .popover-header::before,.bs-popover-bottom .popover-header::before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-.5rem;content:"";border-bottom:1px solid #f7f7f7}.bs-popover-auto[x-placement^=left],.bs-popover-left{margin-right:.5rem}.bs-popover-auto[x-placement^=left]>.arrow,.bs-popover-left>.arrow{right:calc(-.5rem - 1px);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=left]>.arrow::before,.bs-popover-left>.arrow::before{right:0;border-width:.5rem 0 .5rem .5rem;border-left-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=left]>.arrow::after,.bs-popover-left>.arrow::after{right:1px;border-width:.5rem 0 .5rem .5rem;border-left-color:#fff}.popover-header{padding:.5rem .75rem;margin-bottom:0;font-size:1rem;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.popover-header:empty{display:none}.popover-body{padding:.5rem .75rem;color:#212529}.carousel{position:relative}.carousel.pointer-event{-ms-touch-action:pan-y;touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner::after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out;transition:transform .6s ease-in-out,-webkit-transform .6s ease-in-out}@media (prefers-reduced-motion:reduce){.carousel-item{transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-right,.carousel-item-next:not(.carousel-item-left){-webkit-transform:translateX(100%);transform:translateX(100%)}.active.carousel-item-left,.carousel-item-prev:not(.carousel-item-right){-webkit-transform:translateX(-100%);transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;-webkit-transform:none;transform:none}.carousel-fade .carousel-item-next.carousel-item-left,.carousel-fade .carousel-item-prev.carousel-item-right,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{z-index:0;opacity:0;transition:opacity 0s .6s}@media (prefers-reduced-motion:reduce){.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:15%;color:#fff;text-align:center;opacity:.5;transition:opacity .15s ease}@media (prefers-reduced-motion:reduce){.carousel-control-next,.carousel-control-prev{transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:20px;height:20px;background:50%/100% 100% no-repeat}.carousel-control-prev-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5L4.25 4l2.5-2.5L5.25 0z'/%3e%3c/svg%3e")}.carousel-control-next-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5L3.75 4l-2.5 2.5L2.75 8l4-4-4-4z'/%3e%3c/svg%3e")}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:15;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding-left:0;margin-right:15%;margin-left:15%;list-style:none}.carousel-indicators li{box-sizing:content-box;-ms-flex:0 1 auto;flex:0 1 auto;width:30px;height:3px;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#fff;background-clip:padding-box;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media (prefers-reduced-motion:reduce){.carousel-indicators li{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center}@-webkit-keyframes spinner-border{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spinner-border{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.spinner-border{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;border:.25em solid currentColor;border-right-color:transparent;border-radius:50%;-webkit-animation:.75s linear infinite spinner-border;animation:.75s linear infinite spinner-border}.spinner-border-sm{width:1rem;height:1rem;border-width:.2em}@-webkit-keyframes spinner-grow{0%{-webkit-transform:scale(0);transform:scale(0)}50%{opacity:1;-webkit-transform:none;transform:none}}@keyframes spinner-grow{0%{-webkit-transform:scale(0);transform:scale(0)}50%{opacity:1;-webkit-transform:none;transform:none}}.spinner-grow{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;background-color:currentColor;border-radius:50%;opacity:0;-webkit-animation:.75s linear infinite spinner-grow;animation:.75s linear infinite spinner-grow}.spinner-grow-sm{width:1rem;height:1rem}@media (prefers-reduced-motion:reduce){.spinner-border,.spinner-grow{-webkit-animation-duration:1.5s;animation-duration:1.5s}}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.bg-primary{background-color:#007bff!important}a.bg-primary:focus,a.bg-primary:hover,button.bg-primary:focus,button.bg-primary:hover{background-color:#0062cc!important}.bg-secondary{background-color:#6c757d!important}a.bg-secondary:focus,a.bg-secondary:hover,button.bg-secondary:focus,button.bg-secondary:hover{background-color:#545b62!important}.bg-success{background-color:#28a745!important}a.bg-success:focus,a.bg-success:hover,button.bg-success:focus,button.bg-success:hover{background-color:#1e7e34!important}.bg-info{background-color:#17a2b8!important}a.bg-info:focus,a.bg-info:hover,button.bg-info:focus,button.bg-info:hover{background-color:#117a8b!important}.bg-warning{background-color:#ffc107!important}a.bg-warning:focus,a.bg-warning:hover,button.bg-warning:focus,button.bg-warning:hover{background-color:#d39e00!important}.bg-danger{background-color:#dc3545!important}a.bg-danger:focus,a.bg-danger:hover,button.bg-danger:focus,button.bg-danger:hover{background-color:#bd2130!important}.bg-light{background-color:#f8f9fa!important}a.bg-light:focus,a.bg-light:hover,button.bg-light:focus,button.bg-light:hover{background-color:#dae0e5!important}.bg-dark{background-color:#343a40!important}a.bg-dark:focus,a.bg-dark:hover,button.bg-dark:focus,button.bg-dark:hover{background-color:#1d2124!important}.bg-white{background-color:#fff!important}.bg-transparent{background-color:transparent!important}.border{border:1px solid #dee2e6!important}.border-top{border-top:1px solid #dee2e6!important}.border-right{border-right:1px solid #dee2e6!important}.border-bottom{border-bottom:1px solid #dee2e6!important}.border-left{border-left:1px solid #dee2e6!important}.border-0{border:0!important}.border-top-0{border-top:0!important}.border-right-0{border-right:0!important}.border-bottom-0{border-bottom:0!important}.border-left-0{border-left:0!important}.border-primary{border-color:#007bff!important}.border-secondary{border-color:#6c757d!important}.border-success{border-color:#28a745!important}.border-info{border-color:#17a2b8!important}.border-warning{border-color:#ffc107!important}.border-danger{border-color:#dc3545!important}.border-light{border-color:#f8f9fa!important}.border-dark{border-color:#343a40!important}.border-white{border-color:#fff!important}.rounded-sm{border-radius:.2rem!important}.rounded{border-radius:.25rem!important}.rounded-top{border-top-left-radius:.25rem!important;border-top-right-radius:.25rem!important}.rounded-right{border-top-right-radius:.25rem!important;border-bottom-right-radius:.25rem!important}.rounded-bottom{border-bottom-right-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.rounded-left{border-top-left-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.rounded-lg{border-radius:.3rem!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:50rem!important}.rounded-0{border-radius:0!important}.clearfix::after{display:block;clear:both;content:""}.d-none{display:none!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:-ms-flexbox!important;display:flex!important}.d-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}@media (min-width:576px){.d-sm-none{display:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:-ms-flexbox!important;display:flex!important}.d-sm-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:768px){.d-md-none{display:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:-ms-flexbox!important;display:flex!important}.d-md-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:992px){.d-lg-none{display:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:-ms-flexbox!important;display:flex!important}.d-lg-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:1200px){.d-xl-none{display:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:-ms-flexbox!important;display:flex!important}.d-xl-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media print{.d-print-none{display:none!important}.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:-ms-flexbox!important;display:flex!important}.d-print-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}.embed-responsive{position:relative;display:block;width:100%;padding:0;overflow:hidden}.embed-responsive::before{display:block;content:""}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-21by9::before{padding-top:42.857143%}.embed-responsive-16by9::before{padding-top:56.25%}.embed-responsive-4by3::before{padding-top:75%}.embed-responsive-1by1::before{padding-top:100%}.flex-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-center{-ms-flex-align:center!important;align-items:center!important}.align-items-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}@media (min-width:576px){.flex-sm-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-sm-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-sm-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-sm-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-sm-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-sm-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-sm-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-sm-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-sm-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-sm-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-sm-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-sm-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-sm-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-sm-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-sm-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-sm-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-sm-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-sm-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-sm-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-sm-center{-ms-flex-align:center!important;align-items:center!important}.align-items-sm-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-sm-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-sm-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-sm-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-sm-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-sm-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-sm-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-sm-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-sm-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-sm-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-sm-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-sm-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-sm-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-sm-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:768px){.flex-md-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-md-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-md-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-md-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-md-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-md-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-md-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-md-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-md-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-md-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-md-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-md-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-md-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-md-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-md-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-md-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-md-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-md-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-md-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-md-center{-ms-flex-align:center!important;align-items:center!important}.align-items-md-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-md-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-md-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-md-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-md-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-md-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-md-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-md-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-md-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-md-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-md-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-md-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-md-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-md-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:992px){.flex-lg-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-lg-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-lg-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-lg-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-lg-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-lg-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-lg-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-lg-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-lg-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-lg-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-lg-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-lg-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-lg-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-lg-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-lg-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-lg-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-lg-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-lg-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-lg-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-lg-center{-ms-flex-align:center!important;align-items:center!important}.align-items-lg-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-lg-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-lg-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-lg-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-lg-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-lg-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-lg-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-lg-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-lg-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-lg-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-lg-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-lg-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-lg-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-lg-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:1200px){.flex-xl-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-xl-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-xl-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-xl-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-xl-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-xl-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-xl-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-xl-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-xl-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-xl-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-xl-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-xl-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-xl-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-xl-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-xl-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-xl-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-xl-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-xl-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-xl-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-xl-center{-ms-flex-align:center!important;align-items:center!important}.align-items-xl-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-xl-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-xl-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-xl-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-xl-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-xl-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-xl-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-xl-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-xl-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-xl-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-xl-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-xl-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-xl-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-xl-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}.float-left{float:left!important}.float-right{float:right!important}.float-none{float:none!important}@media (min-width:576px){.float-sm-left{float:left!important}.float-sm-right{float:right!important}.float-sm-none{float:none!important}}@media (min-width:768px){.float-md-left{float:left!important}.float-md-right{float:right!important}.float-md-none{float:none!important}}@media (min-width:992px){.float-lg-left{float:left!important}.float-lg-right{float:right!important}.float-lg-none{float:none!important}}@media (min-width:1200px){.float-xl-left{float:left!important}.float-xl-right{float:right!important}.float-xl-none{float:none!important}}.user-select-all{-webkit-user-select:all!important;-moz-user-select:all!important;user-select:all!important}.user-select-auto{-webkit-user-select:auto!important;-moz-user-select:auto!important;-ms-user-select:auto!important;user-select:auto!important}.user-select-none{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:-webkit-sticky!important;position:sticky!important}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}@supports ((position:-webkit-sticky) or (position:sticky)){.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal}.shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}.shadow-none{box-shadow:none!important}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mw-100{max-width:100%!important}.mh-100{max-height:100%!important}.min-vw-100{min-width:100vw!important}.min-vh-100{min-height:100vh!important}.vw-100{width:100vw!important}.vh-100{height:100vh!important}.m-0{margin:0!important}.mt-0,.my-0{margin-top:0!important}.mr-0,.mx-0{margin-right:0!important}.mb-0,.my-0{margin-bottom:0!important}.ml-0,.mx-0{margin-left:0!important}.m-1{margin:.25rem!important}.mt-1,.my-1{margin-top:.25rem!important}.mr-1,.mx-1{margin-right:.25rem!important}.mb-1,.my-1{margin-bottom:.25rem!important}.ml-1,.mx-1{margin-left:.25rem!important}.m-2{margin:.5rem!important}.mt-2,.my-2{margin-top:.5rem!important}.mr-2,.mx-2{margin-right:.5rem!important}.mb-2,.my-2{margin-bottom:.5rem!important}.ml-2,.mx-2{margin-left:.5rem!important}.m-3{margin:1rem!important}.mt-3,.my-3{margin-top:1rem!important}.mr-3,.mx-3{margin-right:1rem!important}.mb-3,.my-3{margin-bottom:1rem!important}.ml-3,.mx-3{margin-left:1rem!important}.m-4{margin:1.5rem!important}.mt-4,.my-4{margin-top:1.5rem!important}.mr-4,.mx-4{margin-right:1.5rem!important}.mb-4,.my-4{margin-bottom:1.5rem!important}.ml-4,.mx-4{margin-left:1.5rem!important}.m-5{margin:3rem!important}.mt-5,.my-5{margin-top:3rem!important}.mr-5,.mx-5{margin-right:3rem!important}.mb-5,.my-5{margin-bottom:3rem!important}.ml-5,.mx-5{margin-left:3rem!important}.p-0{padding:0!important}.pt-0,.py-0{padding-top:0!important}.pr-0,.px-0{padding-right:0!important}.pb-0,.py-0{padding-bottom:0!important}.pl-0,.px-0{padding-left:0!important}.p-1{padding:.25rem!important}.pt-1,.py-1{padding-top:.25rem!important}.pr-1,.px-1{padding-right:.25rem!important}.pb-1,.py-1{padding-bottom:.25rem!important}.pl-1,.px-1{padding-left:.25rem!important}.p-2{padding:.5rem!important}.pt-2,.py-2{padding-top:.5rem!important}.pr-2,.px-2{padding-right:.5rem!important}.pb-2,.py-2{padding-bottom:.5rem!important}.pl-2,.px-2{padding-left:.5rem!important}.p-3{padding:1rem!important}.pt-3,.py-3{padding-top:1rem!important}.pr-3,.px-3{padding-right:1rem!important}.pb-3,.py-3{padding-bottom:1rem!important}.pl-3,.px-3{padding-left:1rem!important}.p-4{padding:1.5rem!important}.pt-4,.py-4{padding-top:1.5rem!important}.pr-4,.px-4{padding-right:1.5rem!important}.pb-4,.py-4{padding-bottom:1.5rem!important}.pl-4,.px-4{padding-left:1.5rem!important}.p-5{padding:3rem!important}.pt-5,.py-5{padding-top:3rem!important}.pr-5,.px-5{padding-right:3rem!important}.pb-5,.py-5{padding-bottom:3rem!important}.pl-5,.px-5{padding-left:3rem!important}.m-n1{margin:-.25rem!important}.mt-n1,.my-n1{margin-top:-.25rem!important}.mr-n1,.mx-n1{margin-right:-.25rem!important}.mb-n1,.my-n1{margin-bottom:-.25rem!important}.ml-n1,.mx-n1{margin-left:-.25rem!important}.m-n2{margin:-.5rem!important}.mt-n2,.my-n2{margin-top:-.5rem!important}.mr-n2,.mx-n2{margin-right:-.5rem!important}.mb-n2,.my-n2{margin-bottom:-.5rem!important}.ml-n2,.mx-n2{margin-left:-.5rem!important}.m-n3{margin:-1rem!important}.mt-n3,.my-n3{margin-top:-1rem!important}.mr-n3,.mx-n3{margin-right:-1rem!important}.mb-n3,.my-n3{margin-bottom:-1rem!important}.ml-n3,.mx-n3{margin-left:-1rem!important}.m-n4{margin:-1.5rem!important}.mt-n4,.my-n4{margin-top:-1.5rem!important}.mr-n4,.mx-n4{margin-right:-1.5rem!important}.mb-n4,.my-n4{margin-bottom:-1.5rem!important}.ml-n4,.mx-n4{margin-left:-1.5rem!important}.m-n5{margin:-3rem!important}.mt-n5,.my-n5{margin-top:-3rem!important}.mr-n5,.mx-n5{margin-right:-3rem!important}.mb-n5,.my-n5{margin-bottom:-3rem!important}.ml-n5,.mx-n5{margin-left:-3rem!important}.m-auto{margin:auto!important}.mt-auto,.my-auto{margin-top:auto!important}.mr-auto,.mx-auto{margin-right:auto!important}.mb-auto,.my-auto{margin-bottom:auto!important}.ml-auto,.mx-auto{margin-left:auto!important}@media (min-width:576px){.m-sm-0{margin:0!important}.mt-sm-0,.my-sm-0{margin-top:0!important}.mr-sm-0,.mx-sm-0{margin-right:0!important}.mb-sm-0,.my-sm-0{margin-bottom:0!important}.ml-sm-0,.mx-sm-0{margin-left:0!important}.m-sm-1{margin:.25rem!important}.mt-sm-1,.my-sm-1{margin-top:.25rem!important}.mr-sm-1,.mx-sm-1{margin-right:.25rem!important}.mb-sm-1,.my-sm-1{margin-bottom:.25rem!important}.ml-sm-1,.mx-sm-1{margin-left:.25rem!important}.m-sm-2{margin:.5rem!important}.mt-sm-2,.my-sm-2{margin-top:.5rem!important}.mr-sm-2,.mx-sm-2{margin-right:.5rem!important}.mb-sm-2,.my-sm-2{margin-bottom:.5rem!important}.ml-sm-2,.mx-sm-2{margin-left:.5rem!important}.m-sm-3{margin:1rem!important}.mt-sm-3,.my-sm-3{margin-top:1rem!important}.mr-sm-3,.mx-sm-3{margin-right:1rem!important}.mb-sm-3,.my-sm-3{margin-bottom:1rem!important}.ml-sm-3,.mx-sm-3{margin-left:1rem!important}.m-sm-4{margin:1.5rem!important}.mt-sm-4,.my-sm-4{margin-top:1.5rem!important}.mr-sm-4,.mx-sm-4{margin-right:1.5rem!important}.mb-sm-4,.my-sm-4{margin-bottom:1.5rem!important}.ml-sm-4,.mx-sm-4{margin-left:1.5rem!important}.m-sm-5{margin:3rem!important}.mt-sm-5,.my-sm-5{margin-top:3rem!important}.mr-sm-5,.mx-sm-5{margin-right:3rem!important}.mb-sm-5,.my-sm-5{margin-bottom:3rem!important}.ml-sm-5,.mx-sm-5{margin-left:3rem!important}.p-sm-0{padding:0!important}.pt-sm-0,.py-sm-0{padding-top:0!important}.pr-sm-0,.px-sm-0{padding-right:0!important}.pb-sm-0,.py-sm-0{padding-bottom:0!important}.pl-sm-0,.px-sm-0{padding-left:0!important}.p-sm-1{padding:.25rem!important}.pt-sm-1,.py-sm-1{padding-top:.25rem!important}.pr-sm-1,.px-sm-1{padding-right:.25rem!important}.pb-sm-1,.py-sm-1{padding-bottom:.25rem!important}.pl-sm-1,.px-sm-1{padding-left:.25rem!important}.p-sm-2{padding:.5rem!important}.pt-sm-2,.py-sm-2{padding-top:.5rem!important}.pr-sm-2,.px-sm-2{padding-right:.5rem!important}.pb-sm-2,.py-sm-2{padding-bottom:.5rem!important}.pl-sm-2,.px-sm-2{padding-left:.5rem!important}.p-sm-3{padding:1rem!important}.pt-sm-3,.py-sm-3{padding-top:1rem!important}.pr-sm-3,.px-sm-3{padding-right:1rem!important}.pb-sm-3,.py-sm-3{padding-bottom:1rem!important}.pl-sm-3,.px-sm-3{padding-left:1rem!important}.p-sm-4{padding:1.5rem!important}.pt-sm-4,.py-sm-4{padding-top:1.5rem!important}.pr-sm-4,.px-sm-4{padding-right:1.5rem!important}.pb-sm-4,.py-sm-4{padding-bottom:1.5rem!important}.pl-sm-4,.px-sm-4{padding-left:1.5rem!important}.p-sm-5{padding:3rem!important}.pt-sm-5,.py-sm-5{padding-top:3rem!important}.pr-sm-5,.px-sm-5{padding-right:3rem!important}.pb-sm-5,.py-sm-5{padding-bottom:3rem!important}.pl-sm-5,.px-sm-5{padding-left:3rem!important}.m-sm-n1{margin:-.25rem!important}.mt-sm-n1,.my-sm-n1{margin-top:-.25rem!important}.mr-sm-n1,.mx-sm-n1{margin-right:-.25rem!important}.mb-sm-n1,.my-sm-n1{margin-bottom:-.25rem!important}.ml-sm-n1,.mx-sm-n1{margin-left:-.25rem!important}.m-sm-n2{margin:-.5rem!important}.mt-sm-n2,.my-sm-n2{margin-top:-.5rem!important}.mr-sm-n2,.mx-sm-n2{margin-right:-.5rem!important}.mb-sm-n2,.my-sm-n2{margin-bottom:-.5rem!important}.ml-sm-n2,.mx-sm-n2{margin-left:-.5rem!important}.m-sm-n3{margin:-1rem!important}.mt-sm-n3,.my-sm-n3{margin-top:-1rem!important}.mr-sm-n3,.mx-sm-n3{margin-right:-1rem!important}.mb-sm-n3,.my-sm-n3{margin-bottom:-1rem!important}.ml-sm-n3,.mx-sm-n3{margin-left:-1rem!important}.m-sm-n4{margin:-1.5rem!important}.mt-sm-n4,.my-sm-n4{margin-top:-1.5rem!important}.mr-sm-n4,.mx-sm-n4{margin-right:-1.5rem!important}.mb-sm-n4,.my-sm-n4{margin-bottom:-1.5rem!important}.ml-sm-n4,.mx-sm-n4{margin-left:-1.5rem!important}.m-sm-n5{margin:-3rem!important}.mt-sm-n5,.my-sm-n5{margin-top:-3rem!important}.mr-sm-n5,.mx-sm-n5{margin-right:-3rem!important}.mb-sm-n5,.my-sm-n5{margin-bottom:-3rem!important}.ml-sm-n5,.mx-sm-n5{margin-left:-3rem!important}.m-sm-auto{margin:auto!important}.mt-sm-auto,.my-sm-auto{margin-top:auto!important}.mr-sm-auto,.mx-sm-auto{margin-right:auto!important}.mb-sm-auto,.my-sm-auto{margin-bottom:auto!important}.ml-sm-auto,.mx-sm-auto{margin-left:auto!important}}@media (min-width:768px){.m-md-0{margin:0!important}.mt-md-0,.my-md-0{margin-top:0!important}.mr-md-0,.mx-md-0{margin-right:0!important}.mb-md-0,.my-md-0{margin-bottom:0!important}.ml-md-0,.mx-md-0{margin-left:0!important}.m-md-1{margin:.25rem!important}.mt-md-1,.my-md-1{margin-top:.25rem!important}.mr-md-1,.mx-md-1{margin-right:.25rem!important}.mb-md-1,.my-md-1{margin-bottom:.25rem!important}.ml-md-1,.mx-md-1{margin-left:.25rem!important}.m-md-2{margin:.5rem!important}.mt-md-2,.my-md-2{margin-top:.5rem!important}.mr-md-2,.mx-md-2{margin-right:.5rem!important}.mb-md-2,.my-md-2{margin-bottom:.5rem!important}.ml-md-2,.mx-md-2{margin-left:.5rem!important}.m-md-3{margin:1rem!important}.mt-md-3,.my-md-3{margin-top:1rem!important}.mr-md-3,.mx-md-3{margin-right:1rem!important}.mb-md-3,.my-md-3{margin-bottom:1rem!important}.ml-md-3,.mx-md-3{margin-left:1rem!important}.m-md-4{margin:1.5rem!important}.mt-md-4,.my-md-4{margin-top:1.5rem!important}.mr-md-4,.mx-md-4{margin-right:1.5rem!important}.mb-md-4,.my-md-4{margin-bottom:1.5rem!important}.ml-md-4,.mx-md-4{margin-left:1.5rem!important}.m-md-5{margin:3rem!important}.mt-md-5,.my-md-5{margin-top:3rem!important}.mr-md-5,.mx-md-5{margin-right:3rem!important}.mb-md-5,.my-md-5{margin-bottom:3rem!important}.ml-md-5,.mx-md-5{margin-left:3rem!important}.p-md-0{padding:0!important}.pt-md-0,.py-md-0{padding-top:0!important}.pr-md-0,.px-md-0{padding-right:0!important}.pb-md-0,.py-md-0{padding-bottom:0!important}.pl-md-0,.px-md-0{padding-left:0!important}.p-md-1{padding:.25rem!important}.pt-md-1,.py-md-1{padding-top:.25rem!important}.pr-md-1,.px-md-1{padding-right:.25rem!important}.pb-md-1,.py-md-1{padding-bottom:.25rem!important}.pl-md-1,.px-md-1{padding-left:.25rem!important}.p-md-2{padding:.5rem!important}.pt-md-2,.py-md-2{padding-top:.5rem!important}.pr-md-2,.px-md-2{padding-right:.5rem!important}.pb-md-2,.py-md-2{padding-bottom:.5rem!important}.pl-md-2,.px-md-2{padding-left:.5rem!important}.p-md-3{padding:1rem!important}.pt-md-3,.py-md-3{padding-top:1rem!important}.pr-md-3,.px-md-3{padding-right:1rem!important}.pb-md-3,.py-md-3{padding-bottom:1rem!important}.pl-md-3,.px-md-3{padding-left:1rem!important}.p-md-4{padding:1.5rem!important}.pt-md-4,.py-md-4{padding-top:1.5rem!important}.pr-md-4,.px-md-4{padding-right:1.5rem!important}.pb-md-4,.py-md-4{padding-bottom:1.5rem!important}.pl-md-4,.px-md-4{padding-left:1.5rem!important}.p-md-5{padding:3rem!important}.pt-md-5,.py-md-5{padding-top:3rem!important}.pr-md-5,.px-md-5{padding-right:3rem!important}.pb-md-5,.py-md-5{padding-bottom:3rem!important}.pl-md-5,.px-md-5{padding-left:3rem!important}.m-md-n1{margin:-.25rem!important}.mt-md-n1,.my-md-n1{margin-top:-.25rem!important}.mr-md-n1,.mx-md-n1{margin-right:-.25rem!important}.mb-md-n1,.my-md-n1{margin-bottom:-.25rem!important}.ml-md-n1,.mx-md-n1{margin-left:-.25rem!important}.m-md-n2{margin:-.5rem!important}.mt-md-n2,.my-md-n2{margin-top:-.5rem!important}.mr-md-n2,.mx-md-n2{margin-right:-.5rem!important}.mb-md-n2,.my-md-n2{margin-bottom:-.5rem!important}.ml-md-n2,.mx-md-n2{margin-left:-.5rem!important}.m-md-n3{margin:-1rem!important}.mt-md-n3,.my-md-n3{margin-top:-1rem!important}.mr-md-n3,.mx-md-n3{margin-right:-1rem!important}.mb-md-n3,.my-md-n3{margin-bottom:-1rem!important}.ml-md-n3,.mx-md-n3{margin-left:-1rem!important}.m-md-n4{margin:-1.5rem!important}.mt-md-n4,.my-md-n4{margin-top:-1.5rem!important}.mr-md-n4,.mx-md-n4{margin-right:-1.5rem!important}.mb-md-n4,.my-md-n4{margin-bottom:-1.5rem!important}.ml-md-n4,.mx-md-n4{margin-left:-1.5rem!important}.m-md-n5{margin:-3rem!important}.mt-md-n5,.my-md-n5{margin-top:-3rem!important}.mr-md-n5,.mx-md-n5{margin-right:-3rem!important}.mb-md-n5,.my-md-n5{margin-bottom:-3rem!important}.ml-md-n5,.mx-md-n5{margin-left:-3rem!important}.m-md-auto{margin:auto!important}.mt-md-auto,.my-md-auto{margin-top:auto!important}.mr-md-auto,.mx-md-auto{margin-right:auto!important}.mb-md-auto,.my-md-auto{margin-bottom:auto!important}.ml-md-auto,.mx-md-auto{margin-left:auto!important}}@media (min-width:992px){.m-lg-0{margin:0!important}.mt-lg-0,.my-lg-0{margin-top:0!important}.mr-lg-0,.mx-lg-0{margin-right:0!important}.mb-lg-0,.my-lg-0{margin-bottom:0!important}.ml-lg-0,.mx-lg-0{margin-left:0!important}.m-lg-1{margin:.25rem!important}.mt-lg-1,.my-lg-1{margin-top:.25rem!important}.mr-lg-1,.mx-lg-1{margin-right:.25rem!important}.mb-lg-1,.my-lg-1{margin-bottom:.25rem!important}.ml-lg-1,.mx-lg-1{margin-left:.25rem!important}.m-lg-2{margin:.5rem!important}.mt-lg-2,.my-lg-2{margin-top:.5rem!important}.mr-lg-2,.mx-lg-2{margin-right:.5rem!important}.mb-lg-2,.my-lg-2{margin-bottom:.5rem!important}.ml-lg-2,.mx-lg-2{margin-left:.5rem!important}.m-lg-3{margin:1rem!important}.mt-lg-3,.my-lg-3{margin-top:1rem!important}.mr-lg-3,.mx-lg-3{margin-right:1rem!important}.mb-lg-3,.my-lg-3{margin-bottom:1rem!important}.ml-lg-3,.mx-lg-3{margin-left:1rem!important}.m-lg-4{margin:1.5rem!important}.mt-lg-4,.my-lg-4{margin-top:1.5rem!important}.mr-lg-4,.mx-lg-4{margin-right:1.5rem!important}.mb-lg-4,.my-lg-4{margin-bottom:1.5rem!important}.ml-lg-4,.mx-lg-4{margin-left:1.5rem!important}.m-lg-5{margin:3rem!important}.mt-lg-5,.my-lg-5{margin-top:3rem!important}.mr-lg-5,.mx-lg-5{margin-right:3rem!important}.mb-lg-5,.my-lg-5{margin-bottom:3rem!important}.ml-lg-5,.mx-lg-5{margin-left:3rem!important}.p-lg-0{padding:0!important}.pt-lg-0,.py-lg-0{padding-top:0!important}.pr-lg-0,.px-lg-0{padding-right:0!important}.pb-lg-0,.py-lg-0{padding-bottom:0!important}.pl-lg-0,.px-lg-0{padding-left:0!important}.p-lg-1{padding:.25rem!important}.pt-lg-1,.py-lg-1{padding-top:.25rem!important}.pr-lg-1,.px-lg-1{padding-right:.25rem!important}.pb-lg-1,.py-lg-1{padding-bottom:.25rem!important}.pl-lg-1,.px-lg-1{padding-left:.25rem!important}.p-lg-2{padding:.5rem!important}.pt-lg-2,.py-lg-2{padding-top:.5rem!important}.pr-lg-2,.px-lg-2{padding-right:.5rem!important}.pb-lg-2,.py-lg-2{padding-bottom:.5rem!important}.pl-lg-2,.px-lg-2{padding-left:.5rem!important}.p-lg-3{padding:1rem!important}.pt-lg-3,.py-lg-3{padding-top:1rem!important}.pr-lg-3,.px-lg-3{padding-right:1rem!important}.pb-lg-3,.py-lg-3{padding-bottom:1rem!important}.pl-lg-3,.px-lg-3{padding-left:1rem!important}.p-lg-4{padding:1.5rem!important}.pt-lg-4,.py-lg-4{padding-top:1.5rem!important}.pr-lg-4,.px-lg-4{padding-right:1.5rem!important}.pb-lg-4,.py-lg-4{padding-bottom:1.5rem!important}.pl-lg-4,.px-lg-4{padding-left:1.5rem!important}.p-lg-5{padding:3rem!important}.pt-lg-5,.py-lg-5{padding-top:3rem!important}.pr-lg-5,.px-lg-5{padding-right:3rem!important}.pb-lg-5,.py-lg-5{padding-bottom:3rem!important}.pl-lg-5,.px-lg-5{padding-left:3rem!important}.m-lg-n1{margin:-.25rem!important}.mt-lg-n1,.my-lg-n1{margin-top:-.25rem!important}.mr-lg-n1,.mx-lg-n1{margin-right:-.25rem!important}.mb-lg-n1,.my-lg-n1{margin-bottom:-.25rem!important}.ml-lg-n1,.mx-lg-n1{margin-left:-.25rem!important}.m-lg-n2{margin:-.5rem!important}.mt-lg-n2,.my-lg-n2{margin-top:-.5rem!important}.mr-lg-n2,.mx-lg-n2{margin-right:-.5rem!important}.mb-lg-n2,.my-lg-n2{margin-bottom:-.5rem!important}.ml-lg-n2,.mx-lg-n2{margin-left:-.5rem!important}.m-lg-n3{margin:-1rem!important}.mt-lg-n3,.my-lg-n3{margin-top:-1rem!important}.mr-lg-n3,.mx-lg-n3{margin-right:-1rem!important}.mb-lg-n3,.my-lg-n3{margin-bottom:-1rem!important}.ml-lg-n3,.mx-lg-n3{margin-left:-1rem!important}.m-lg-n4{margin:-1.5rem!important}.mt-lg-n4,.my-lg-n4{margin-top:-1.5rem!important}.mr-lg-n4,.mx-lg-n4{margin-right:-1.5rem!important}.mb-lg-n4,.my-lg-n4{margin-bottom:-1.5rem!important}.ml-lg-n4,.mx-lg-n4{margin-left:-1.5rem!important}.m-lg-n5{margin:-3rem!important}.mt-lg-n5,.my-lg-n5{margin-top:-3rem!important}.mr-lg-n5,.mx-lg-n5{margin-right:-3rem!important}.mb-lg-n5,.my-lg-n5{margin-bottom:-3rem!important}.ml-lg-n5,.mx-lg-n5{margin-left:-3rem!important}.m-lg-auto{margin:auto!important}.mt-lg-auto,.my-lg-auto{margin-top:auto!important}.mr-lg-auto,.mx-lg-auto{margin-right:auto!important}.mb-lg-auto,.my-lg-auto{margin-bottom:auto!important}.ml-lg-auto,.mx-lg-auto{margin-left:auto!important}}@media (min-width:1200px){.m-xl-0{margin:0!important}.mt-xl-0,.my-xl-0{margin-top:0!important}.mr-xl-0,.mx-xl-0{margin-right:0!important}.mb-xl-0,.my-xl-0{margin-bottom:0!important}.ml-xl-0,.mx-xl-0{margin-left:0!important}.m-xl-1{margin:.25rem!important}.mt-xl-1,.my-xl-1{margin-top:.25rem!important}.mr-xl-1,.mx-xl-1{margin-right:.25rem!important}.mb-xl-1,.my-xl-1{margin-bottom:.25rem!important}.ml-xl-1,.mx-xl-1{margin-left:.25rem!important}.m-xl-2{margin:.5rem!important}.mt-xl-2,.my-xl-2{margin-top:.5rem!important}.mr-xl-2,.mx-xl-2{margin-right:.5rem!important}.mb-xl-2,.my-xl-2{margin-bottom:.5rem!important}.ml-xl-2,.mx-xl-2{margin-left:.5rem!important}.m-xl-3{margin:1rem!important}.mt-xl-3,.my-xl-3{margin-top:1rem!important}.mr-xl-3,.mx-xl-3{margin-right:1rem!important}.mb-xl-3,.my-xl-3{margin-bottom:1rem!important}.ml-xl-3,.mx-xl-3{margin-left:1rem!important}.m-xl-4{margin:1.5rem!important}.mt-xl-4,.my-xl-4{margin-top:1.5rem!important}.mr-xl-4,.mx-xl-4{margin-right:1.5rem!important}.mb-xl-4,.my-xl-4{margin-bottom:1.5rem!important}.ml-xl-4,.mx-xl-4{margin-left:1.5rem!important}.m-xl-5{margin:3rem!important}.mt-xl-5,.my-xl-5{margin-top:3rem!important}.mr-xl-5,.mx-xl-5{margin-right:3rem!important}.mb-xl-5,.my-xl-5{margin-bottom:3rem!important}.ml-xl-5,.mx-xl-5{margin-left:3rem!important}.p-xl-0{padding:0!important}.pt-xl-0,.py-xl-0{padding-top:0!important}.pr-xl-0,.px-xl-0{padding-right:0!important}.pb-xl-0,.py-xl-0{padding-bottom:0!important}.pl-xl-0,.px-xl-0{padding-left:0!important}.p-xl-1{padding:.25rem!important}.pt-xl-1,.py-xl-1{padding-top:.25rem!important}.pr-xl-1,.px-xl-1{padding-right:.25rem!important}.pb-xl-1,.py-xl-1{padding-bottom:.25rem!important}.pl-xl-1,.px-xl-1{padding-left:.25rem!important}.p-xl-2{padding:.5rem!important}.pt-xl-2,.py-xl-2{padding-top:.5rem!important}.pr-xl-2,.px-xl-2{padding-right:.5rem!important}.pb-xl-2,.py-xl-2{padding-bottom:.5rem!important}.pl-xl-2,.px-xl-2{padding-left:.5rem!important}.p-xl-3{padding:1rem!important}.pt-xl-3,.py-xl-3{padding-top:1rem!important}.pr-xl-3,.px-xl-3{padding-right:1rem!important}.pb-xl-3,.py-xl-3{padding-bottom:1rem!important}.pl-xl-3,.px-xl-3{padding-left:1rem!important}.p-xl-4{padding:1.5rem!important}.pt-xl-4,.py-xl-4{padding-top:1.5rem!important}.pr-xl-4,.px-xl-4{padding-right:1.5rem!important}.pb-xl-4,.py-xl-4{padding-bottom:1.5rem!important}.pl-xl-4,.px-xl-4{padding-left:1.5rem!important}.p-xl-5{padding:3rem!important}.pt-xl-5,.py-xl-5{padding-top:3rem!important}.pr-xl-5,.px-xl-5{padding-right:3rem!important}.pb-xl-5,.py-xl-5{padding-bottom:3rem!important}.pl-xl-5,.px-xl-5{padding-left:3rem!important}.m-xl-n1{margin:-.25rem!important}.mt-xl-n1,.my-xl-n1{margin-top:-.25rem!important}.mr-xl-n1,.mx-xl-n1{margin-right:-.25rem!important}.mb-xl-n1,.my-xl-n1{margin-bottom:-.25rem!important}.ml-xl-n1,.mx-xl-n1{margin-left:-.25rem!important}.m-xl-n2{margin:-.5rem!important}.mt-xl-n2,.my-xl-n2{margin-top:-.5rem!important}.mr-xl-n2,.mx-xl-n2{margin-right:-.5rem!important}.mb-xl-n2,.my-xl-n2{margin-bottom:-.5rem!important}.ml-xl-n2,.mx-xl-n2{margin-left:-.5rem!important}.m-xl-n3{margin:-1rem!important}.mt-xl-n3,.my-xl-n3{margin-top:-1rem!important}.mr-xl-n3,.mx-xl-n3{margin-right:-1rem!important}.mb-xl-n3,.my-xl-n3{margin-bottom:-1rem!important}.ml-xl-n3,.mx-xl-n3{margin-left:-1rem!important}.m-xl-n4{margin:-1.5rem!important}.mt-xl-n4,.my-xl-n4{margin-top:-1.5rem!important}.mr-xl-n4,.mx-xl-n4{margin-right:-1.5rem!important}.mb-xl-n4,.my-xl-n4{margin-bottom:-1.5rem!important}.ml-xl-n4,.mx-xl-n4{margin-left:-1.5rem!important}.m-xl-n5{margin:-3rem!important}.mt-xl-n5,.my-xl-n5{margin-top:-3rem!important}.mr-xl-n5,.mx-xl-n5{margin-right:-3rem!important}.mb-xl-n5,.my-xl-n5{margin-bottom:-3rem!important}.ml-xl-n5,.mx-xl-n5{margin-left:-3rem!important}.m-xl-auto{margin:auto!important}.mt-xl-auto,.my-xl-auto{margin-top:auto!important}.mr-xl-auto,.mx-xl-auto{margin-right:auto!important}.mb-xl-auto,.my-xl-auto{margin-bottom:auto!important}.ml-xl-auto,.mx-xl-auto{margin-left:auto!important}}.stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:auto;content:"";background-color:rgba(0,0,0,0)}.text-monospace{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace!important}.text-justify{text-align:justify!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-left{text-align:left!important}.text-right{text-align:right!important}.text-center{text-align:center!important}@media (min-width:576px){.text-sm-left{text-align:left!important}.text-sm-right{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.text-md-left{text-align:left!important}.text-md-right{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.text-lg-left{text-align:left!important}.text-lg-right{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.text-xl-left{text-align:left!important}.text-xl-right{text-align:right!important}.text-xl-center{text-align:center!important}}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.font-weight-light{font-weight:300!important}.font-weight-lighter{font-weight:lighter!important}.font-weight-normal{font-weight:400!important}.font-weight-bold{font-weight:700!important}.font-weight-bolder{font-weight:bolder!important}.font-italic{font-style:italic!important}.text-white{color:#fff!important}.text-primary{color:#007bff!important}a.text-primary:focus,a.text-primary:hover{color:#0056b3!important}.text-secondary{color:#6c757d!important}a.text-secondary:focus,a.text-secondary:hover{color:#494f54!important}.text-success{color:#28a745!important}a.text-success:focus,a.text-success:hover{color:#19692c!important}.text-info{color:#17a2b8!important}a.text-info:focus,a.text-info:hover{color:#0f6674!important}.text-warning{color:#ffc107!important}a.text-warning:focus,a.text-warning:hover{color:#ba8b00!important}.text-danger{color:#dc3545!important}a.text-danger:focus,a.text-danger:hover{color:#a71d2a!important}.text-light{color:#f8f9fa!important}a.text-light:focus,a.text-light:hover{color:#cbd3da!important}.text-dark{color:#343a40!important}a.text-dark:focus,a.text-dark:hover{color:#121416!important}.text-body{color:#212529!important}.text-muted{color:#6c757d!important}.text-black-50{color:rgba(0,0,0,.5)!important}.text-white-50{color:rgba(255,255,255,.5)!important}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.text-decoration-none{text-decoration:none!important}.text-break{word-break:break-word!important;word-wrap:break-word!important}.text-reset{color:inherit!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media print{*,::after,::before{text-shadow:none!important;box-shadow:none!important}a:not(.btn){text-decoration:underline}abbr[title]::after{content:" (" attr(title) ")"}pre{white-space:pre-wrap!important}blockquote,pre{border:1px solid #adb5bd;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}@page{size:a3}body{min-width:992px!important}.container{min-width:992px!important}.navbar{display:none}.badge{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #dee2e6!important}.table-dark{color:inherit}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#dee2e6}.table .thead-dark th{color:inherit;border-color:#dee2e6}} +/*# sourceMappingURL=bootstrap.min.css.map */ \ No newline at end of file diff --git a/llvm-build/checksec/templates/css/font-awesome.min.css b/llvm-build/checksec/templates/css/font-awesome.min.css new file mode 100644 index 0000000000000000000000000000000000000000..5578ea5d6f1c9b24843d461dab816a721e327ed9 --- /dev/null +++ b/llvm-build/checksec/templates/css/font-awesome.min.css @@ -0,0 +1,4 @@ +/*! + * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.7.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.fa-handshake-o:before{content:"\f2b5"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-o:before{content:"\f2b7"}.fa-linode:before{content:"\f2b8"}.fa-address-book:before{content:"\f2b9"}.fa-address-book-o:before{content:"\f2ba"}.fa-vcard:before,.fa-address-card:before{content:"\f2bb"}.fa-vcard-o:before,.fa-address-card-o:before{content:"\f2bc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-circle-o:before{content:"\f2be"}.fa-user-o:before{content:"\f2c0"}.fa-id-badge:before{content:"\f2c1"}.fa-drivers-license:before,.fa-id-card:before{content:"\f2c2"}.fa-drivers-license-o:before,.fa-id-card-o:before{content:"\f2c3"}.fa-quora:before{content:"\f2c4"}.fa-free-code-camp:before{content:"\f2c5"}.fa-telegram:before{content:"\f2c6"}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thermometer-2:before,.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:"\f2cb"}.fa-shower:before{content:"\f2cc"}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:"\f2cd"}.fa-podcast:before{content:"\f2ce"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-times-rectangle:before,.fa-window-close:before{content:"\f2d3"}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:"\f2d4"}.fa-bandcamp:before{content:"\f2d5"}.fa-grav:before{content:"\f2d6"}.fa-etsy:before{content:"\f2d7"}.fa-imdb:before{content:"\f2d8"}.fa-ravelry:before{content:"\f2d9"}.fa-eercast:before{content:"\f2da"}.fa-microchip:before{content:"\f2db"}.fa-snowflake-o:before{content:"\f2dc"}.fa-superpowers:before{content:"\f2dd"}.fa-wpexplorer:before{content:"\f2de"}.fa-meetup:before{content:"\f2e0"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto} diff --git a/llvm-build/checksec/templates/failed_files_template.html b/llvm-build/checksec/templates/failed_files_template.html new file mode 100644 index 0000000000000000000000000000000000000000..3a0fa5bfd6f0ab181ae62abfa8a4151b2db9d18c --- /dev/null +++ b/llvm-build/checksec/templates/failed_files_template.html @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + +
+
+

Failed Files

+ Back +
+
+
+ {% for failed_file in check_file_list %} +
+ +
+ + + + + + + + + + + + + + + + + + + {% if failed_file.relro == "passed" %} + + {% else %} + + {% endif %} + {% if failed_file.canary == "passed" %} + + {% else %} + + {% endif %} + {% if failed_file.nx == "passed" %} + + {% else %} + + {% endif %} + {% if failed_file.pie == "passed" %} + + {% else %} + + {% endif %} + {% if failed_file.rpath == "passed" %} + + {% else %} + + {% endif %} + {% if failed_file.fortify == "passed" %} + + {% else %} + + {% endif %} + {% if failed_file.symbols == "passed" %} + + {% else %} + + {% endif %} + {% if failed_file.clangcfi == "passed" %} + + {% else %} + + {% endif %} + {% if failed_file.safestack == "passed" %} + + {% else %} + + {% endif %} + {% if failed_file.fortified == "passed" %} + + {% else %} + + {% endif %} + {% if failed_file.fortifiable == "passed" %} + + {% else %} + + {% endif %} + + +
relrocanarynxpierpathfortifysymbolsclangcfisafestackfortifiedfortify-able
{{failed_file.relro}}{{failed_file.relro}}{{failed_file.canary}}{{failed_file.canary}}{{failed_file.nx}}{{failed_file.nx}}{{failed_file.pie}}{{failed_file.pie}}{{failed_file.rpath}}{{failed_file.rpath}}{{failed_file.fortify}}{{failed_file.fortify}}{{failed_file.symbols}}{{failed_file.symbols}}{{failed_file.clangcfi}}{{failed_file.clangcfi}}{{failed_file.safestack}}{{failed_file.safestack}}{{failed_file.fortified}}{{failed_file.fortified}}{{failed_file.fortifiable}}{{failed_file.fortifiable}}
+
+
+ {% endfor %} +
+
+
+ + + \ No newline at end of file diff --git a/llvm-build/checksec/templates/fonts/FontAwesome.otf b/llvm-build/checksec/templates/fonts/FontAwesome.otf new file mode 100644 index 0000000000000000000000000000000000000000..401ec0f36e4f73b8efa40bd6f604fe80d286db70 Binary files /dev/null and b/llvm-build/checksec/templates/fonts/FontAwesome.otf differ diff --git a/llvm-build/checksec/templates/fonts/fontawesome-webfont.eot b/llvm-build/checksec/templates/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000000000000000000000000000000000000..e9f60ca953f93e35eab4108bd414bc02ddcf3928 Binary files /dev/null and b/llvm-build/checksec/templates/fonts/fontawesome-webfont.eot differ diff --git a/llvm-build/checksec/templates/fonts/fontawesome-webfont.svg b/llvm-build/checksec/templates/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000000000000000000000000000000000000..d7534c975b2a23edd3bd0b3f7e8c4be104f2a276 --- /dev/null +++ b/llvm-build/checksec/templates/fonts/fontawesome-webfont.svg @@ -0,0 +1,2671 @@ + + + + +Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 + By ,,, +Copyright Dave Gandy 2016. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/llvm-build/checksec/templates/fonts/fontawesome-webfont.ttf b/llvm-build/checksec/templates/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000000000000000000000000000000000000..35acda2fa1196aad98c2adf4378a7611dd713aa3 Binary files /dev/null and b/llvm-build/checksec/templates/fonts/fontawesome-webfont.ttf differ diff --git a/llvm-build/checksec/templates/fonts/fontawesome-webfont.woff b/llvm-build/checksec/templates/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000000000000000000000000000000000000..400014a4b06eee3d0c0d54402a47ab2601b2862b Binary files /dev/null and b/llvm-build/checksec/templates/fonts/fontawesome-webfont.woff differ diff --git a/llvm-build/checksec/templates/fonts/fontawesome-webfont.woff2 b/llvm-build/checksec/templates/fonts/fontawesome-webfont.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..4d13fc60404b91e398a37200c4a77b645cfd9586 Binary files /dev/null and b/llvm-build/checksec/templates/fonts/fontawesome-webfont.woff2 differ diff --git a/llvm-build/checksec/templates/index_files_template.html b/llvm-build/checksec/templates/index_files_template.html new file mode 100644 index 0000000000000000000000000000000000000000..8db2ae09935a51bb892c99a7bb6cc93193574ca5 --- /dev/null +++ b/llvm-build/checksec/templates/index_files_template.html @@ -0,0 +1,336 @@ + + + + + + + + + + + + + + + + + + + + +
+
+

Test Summary

+
+
+
+ Start time/End Time: + {{summary_data._start_time}} - {{summary_data._end_time}} +
+
+
+
+ Execution Time: + {{summary_data._execution_time}} +
+
+
+
+ +
+ Total Files +
+
+ +
+ +
+
+ +
+ Failed Files +
+
+
+
+
+
+ + + + + + + + +
Check ItemsPassedFailed
+
+
+ {% for check_item in check_items %} +
+
+ + + + + + + + +
{{check_item._name}} + {% if check_item._name == "relro" %} + + + + + {% elif check_item._name == "canary" %} + + + + + {% elif check_item._name == "nx" %} + + + + + {% elif check_item._name == "pie" %} + + + + + {% elif check_item._name == "rpath" %} + + + + + {% elif check_item._name == "fortify" %} + + + + + {% elif check_item._name == "clangcfi" %} + + + + + {% elif check_item._name == "safestack" %} + + + + + {% endif %} + {{check_item._passed_num}}{{check_item._failed_num}}
+
+
+ {% if check_item._do_check == "true" %} +
+
+ +
+ + + + + + + + + + + + {% for failed_file in check_item._failed_list %} + + + + + {% for found_file in total_file_info %} + {% if found_file.filename == failed_file %} + {% if check_item._name == "relro" and found_file.relro != check_item._check_flag%} + + {% elif check_item._name == "canary" and found_file.canary != check_item._check_flag %} + + {% elif check_item._name == "nx" and found_file.nx != check_item._check_flag %} + + {% elif check_item._name == "pie" and found_file.pie != check_item._check_flag %} + + {% elif check_item._name == "rpath" and found_file.rpath != check_item._check_flag %} + + {% elif check_item._name == "fortify" and found_file.fortify_source != check_item._check_flag %} + + {% elif check_item._name == "symbols" and found_file.symbols != check_item._check_flag %} + + {% elif check_item._name == "clangcfi" and found_file.clangcfi != check_item._check_flag %} + + {% elif check_item._name == "safestack" and found_file.safestack != check_item._check_flag %} + + {% elif check_item._name == "fortified" and found_file.fortified != check_item._check_flag %} + + {% elif check_item._name == "fortify-able" and found_file.fortify_able != check_item._check_flag %} + + {% endif %} + {% endif %} + {% endfor %} + + + {% endfor %} + +
NoFailed FilesExpectedActualResults
{{loop.index}}{{failed_file}}{{check_item._check_flag}}{{found_file.relro}}{{found_file.canary}}{{found_file.nx}}{{found_file.pie}}{{found_file.rpath}}{{found_file.fortify_source}}{{found_file.symbols}}{{found_file.clangcfi}}{{found_file.safestack}}{{found_file.fortified}}{{found_file.fortify_able}}Failed
+
+
+
+
+
+ +
+ + + + + + + + + + + + {% for pass_file in check_item._passed_list %} + + + + + {% for found_file in total_file_info %} + {% if found_file.filename == pass_file %} + {% if check_item._name == "relro" and found_file.relro == check_item._check_flag%} + + {% elif check_item._name == "canary" and found_file.canary == check_item._check_flag %} + + {% elif check_item._name == "nx" and found_file.nx == check_item._check_flag %} + + {% elif check_item._name == "pie" and found_file.pie == check_item._check_flag %} + + {% elif check_item._name == "rpath" and found_file.rpath == check_item._check_flag %} + + {% elif check_item._name == "fortify" and found_file.fortify_source == check_item._check_flag %} + + {% elif check_item._name == "symbols" and found_file.symbols == check_item._check_flag %} + + {% elif check_item._name == "clangcfi" and found_file.clangcfi == check_item._check_flag %} + + {% elif check_item._name == "safestack" and found_file.safestack == check_item._check_flag %} + + {% elif check_item._name == "fortified" and found_file.fortified == check_item._check_flag %} + + {% elif check_item._name == "fortify-able" and found_file.fortify_able == check_item._check_flag %} + + {% endif %} + {% endif %} + {% endfor %} + + + {% endfor %} + +
NoPassed FilesExpected Actual Results
{{loop.index}}{{pass_file}}{{check_item._check_flag}}{{found_file.relro}}{{found_file.canary}}{{found_file.nx}}{{found_file.pie}}{{found_file.rpath}}{{found_file.fortify_source}}{{found_file.symbols}}{{found_file.clangcfi}}{{found_file.safestack}}{{found_file.fortified}}{{found_file.fortify_able}}Passed
+
+
+
+ {% else %} +
+
+ + + + + + + + + + {% for pass_file in check_item._passed_list %} + + + + {% for found_file in total_file_info %} + {% if found_file.filename == pass_file %} + {% if check_item.name == "relro" %} + + {% elif check_item._name == "canary" %} + + {% elif check_item._name == "nx" %} + + {% elif check_item._name == "pie" %} + + {% elif check_item._name == "rpath" %} + + {% elif check_item._name == "fortify" %} + + {% elif check_item._name == "symbols" %} + + {% elif check_item._name == "clangcfi" %} + + {% elif check_item._name == "safestack" %} + + {% elif check_item._name == "fortified" %} + + {% elif check_item._name == "fortify-able" %} + + {% endif %} + {% endif %} + {% endfor %} + + {% endfor %} + +
NoPassed FilesActual
{{loop.index}}{{pass_file}}{{found_file.relro}}{{found_file.canary}}{{found_file.nx}}{{found_file.pie}}{{found_file.rpath}}{{found_file.fortify_source}}{{found_file.symbols}}{{found_file.clangcfi}}{{found_file.safestack}}{{found_file.fortified}}{{found_file.fortify_able}}
+
+
+ {% endif %} + {% endfor %} +
+
+ + + \ No newline at end of file diff --git a/llvm-build/checksec/templates/jquery.min.js b/llvm-build/checksec/templates/jquery.min.js new file mode 100644 index 0000000000000000000000000000000000000000..0de648ed3b5201e4e05ace86e01f8ef201d2770e --- /dev/null +++ b/llvm-build/checksec/templates/jquery.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.4 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.4",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.cssHas=ce(function(){try{return C.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),d.cssHas||y.push(":has"),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType&&e.documentElement||e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",v.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0 + + + + + + + + + + + + + + + + + + +
+
+

Total Files

+ Back +
+
+
+ {% for found_file in total_file_info %} +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
relrocanarynxpieclangcfisafestackrpathsymbolsfortifyfortifiedfortify-ablefile size
{{found_file.relro}}{{found_file.canary}}{{found_file.nx}}{{found_file.pie}}{{found_file.clangcfi}}{{found_file.safestack}}{{found_file.rpath}}{{found_file.symbols}}{{found_file.fortify_source}}{{found_file.fortified}}{{found_file.fortify_able}}{{found_file.file_single_size}}
+
+
+ {% endfor %} +
+
+
+ + + \ No newline at end of file diff --git a/llvm-build/cross_toolchain_builder.py b/llvm-build/cross_toolchain_builder.py new file mode 100644 index 0000000000000000000000000000000000000000..7f2bb792fa7815e9bd22292ceb7e7e22f9719adc --- /dev/null +++ b/llvm-build/cross_toolchain_builder.py @@ -0,0 +1,299 @@ +#!/usr/bin/env python3 +# 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. + +import os +import shutil +from typing import List +from build import BuildConfig, BuildUtils, LlvmLibs, SysrootComposer, LlvmPackage +from python_builder import OHOSPythonBuilder + + +class CrossToolchainBuilder: + def __init__(self, llvm_triple, install_python_from_prebuilts=False) -> None: + self._llvm_triple = llvm_triple + # Currently not supported for ohos + self._install_python_from_prebuilts = install_python_from_prebuilts + self._platform = llvm_triple.split("-")[0] + self._system_name = "ohos" if "ohos" in llvm_triple else "linux" + self._build_config = BuildConfig() + self._build_utils = BuildUtils(self._build_config) + self._sysroot_composer = SysrootComposer(self._build_config) + self._llvm_package = LlvmPackage(self._build_config) + self._llvm_libs = LlvmLibs( + self._build_config, self._sysroot_composer, self._llvm_package + ) + self._python_builder = None if install_python_from_prebuilts else \ + OHOSPythonBuilder(self._build_utils, self._llvm_triple) + self._python_install_dir = os.path.join(self._build_config.REPOROOT_DIR, 'prebuilts', + self._build_config.LLDB_PYTHON, 'linux-arm64', self._build_config.LLDB_PY_DETAILED_VERSION) \ + if install_python_from_prebuilts else \ + self._build_utils.merge_python_install_dir(self._llvm_triple) + self._llvm_project_path = os.path.abspath( + os.path.join(self._build_config.LLVM_PROJECT_DIR, "llvm") + ) + self._llvm_path = self._build_utils.merge_out_path(f"{self._system_name}-{self._platform}") + self._llvm_install = self._build_utils.merge_out_path( + f"{self._system_name}-{self._platform}-install" + ) + self._llvm_root = self._build_utils.merge_out_path("llvm-install") + self._sysroot = self._build_utils.merge_out_path("sysroot") + + self._cflags = self._init_cflags() + self._ldflags = self._init_ldflags() + self._llvm_defines = self._init_llvm_defines() + + def _init_cflags(self) -> List[str]: + cflags = [ + "-fstack-protector-strong", + "--target=%s" % self._llvm_triple, + "-ffunction-sections", + "-fdata-sections", + ] + return cflags + + def _init_ldflags(self) -> List[str]: + ldflags = [ + "-fuse-ld=lld", + "-Wl,--gc-sections", + "-Wl,--build-id=sha1", + "-Wl,-z,relro,-z,now", + "-pie", + ] + if self._system_name == "ohos": + ldflags.extend([ + "--rtlib=compiler-rt", + "-lunwind", + ]) + return ldflags + + def _init_llvm_defines(self): + llvm_defines = {} + llvm_defines["LLVM_TARGET_ARCH"] = self._platform + llvm_defines["OHOS"] = "1" + llvm_defines["CMAKE_SYSTEM_NAME"] = "OHOS" + llvm_defines["CMAKE_CROSSCOMPILING"] = "True" + llvm_defines["CMAKE_INSTALL_PREFIX"] = self._llvm_install + llvm_defines["CMAKE_SYSROOT"] = self._sysroot + llvm_defines["LLVM_HOST_TRIPLE"] = self._llvm_triple + llvm_defines["LLVM_TARGETS_TO_BUILD"] = self._build_config.TARGETS + llvm_defines["LLVM_DEFAULT_TARGET_TRIPLE"] = self._llvm_triple + llvm_defines["LLVM_ENABLE_TERMINFO"] = "OFF" + llvm_defines["LLVM_CONFIG_PATH"] = os.path.join( + self._llvm_root, "bin", "llvm-config" + ) + llvm_defines["LLVM_TABLEGEN"] = os.path.join( + self._llvm_root, "bin", "llvm-tblgen" + ) + llvm_defines["CMAKE_C_COMPILER"] = os.path.join(self._llvm_root, "bin", "clang") + llvm_defines["CMAKE_CXX_COMPILER"] = os.path.join( + self._llvm_root, "bin", "clang++" + ) + llvm_defines["CMAKE_AR"] = os.path.join(self._llvm_root, "bin", "llvm-ar") + llvm_defines["CMAKE_FIND_ROOT_PATH_MODE_INCLUDE"] = "ONLY" + llvm_defines["CMAKE_FIND_ROOT_PATH_MODE_LIBRARY"] = "ONLY" + llvm_defines["CMAKE_FIND_ROOT_PATH_MODE_PACKAGE"] = "ONLY" + llvm_defines["CMAKE_FIND_ROOT_PATH_MODE_PROGRAM"] = "NEVER" + llvm_defines["Python3_EXECUTABLE"] = os.path.join( + self._build_utils.get_python_dir(), "bin", self._build_config.LLDB_PYTHON + ) + + if self._build_config.debug: + llvm_defines["CMAKE_BUILD_TYPE"] = "Debug" + else: + llvm_defines["CMAKE_BUILD_TYPE"] = "Release" + + llvm_defines.update(self._init_lldb_defines()) + + return llvm_defines + + def _init_lldb_defines(self): + lldb_defines = {} + lldb_defines["LLDB_INCLUDE_TESTS"] = "OFF" + if self._build_config.lldb_timeout: + lldb_defines["LLDB_ENABLE_TIMEOUT"] = "True" + # Optional Dependencies + if self._build_config.build_ncurses: + lldb_defines["LLDB_ENABLE_CURSES"] = "ON" + lldb_defines["CURSES_INCLUDE_DIRS"] = ";".join( + [ + self._build_utils.merge_ncurses_install_dir( + self._llvm_triple, "include" + ), + self._build_utils.merge_ncurses_install_dir( + self._llvm_triple, "include", "ncurses" + ), + ] + ) + ncurses_libs = [] + for library in self._build_utils.get_ncurses_dependence_libs(self._llvm_triple): + library_path = self._build_utils.merge_ncurses_install_dir( + self._llvm_triple, + "lib", + f"{library}.so.%s" % self._build_utils.get_ncurses_version(), + ) + ncurses_libs.append(library_path) + lldb_defines["CURSES_LIBRARIES"] = ";".join(ncurses_libs) + lldb_defines["PANEL_LIBRARIES"] = ";".join(ncurses_libs) + + if self._build_config.build_libxml2: + self._build_config.LIBXML2_VERSION = self._build_utils.get_libxml2_version() + + lldb_defines["LLDB_ENABLE_LIBXML2"] = "ON" + lldb_defines["LIBXML2_INCLUDE_DIR"] = ( + self._build_utils.merge_libxml2_install_dir( + self._llvm_triple, "include", "libxml2" + ) + ) + lldb_defines["LIBXML2_LIBRARY"] = ( + self._build_utils.merge_libxml2_install_dir( + self._llvm_triple, + "lib", + "libxml2.so.%s" % self._build_utils.get_libxml2_version(), + ) + ) + + if self._build_config.build_libedit: + lldb_defines["LLDB_ENABLE_LIBEDIT"] = "ON" + lldb_defines["LibEdit_INCLUDE_DIRS"] = ( + self._build_utils.merge_libedit_install_dir( + self._llvm_triple, "include" + ) + ) + lldb_defines["LibEdit_LIBRARIES"] = ( + self._build_utils.merge_libedit_install_dir( + self._llvm_triple, "lib", "libedit.so.0.0.68" + ) + ) + + if self._build_config.enable_lzma_7zip: + lldb_defines['LLDB_ENABLE_LZMA'] = 'ON' + lldb_defines['LLDB_ENABLE_LZMA_7ZIP'] = 'ON' + lldb_defines['LIBLZMA_INCLUDE_DIRS'] = ( + self._build_utils.merge_install_dir('lzma', self._llvm_triple, 'include') + ) + lldb_defines['LIBLZMA_LIBRARIES'] = ( + self._build_utils.merge_install_dir('lzma', self._llvm_triple, 'lib', 'liblzma.so') + ) + + if self._build_config.build_python or self._install_python_from_prebuilts: + lldb_defines["LLDB_ENABLE_PYTHON"] = "ON" + lldb_defines["LLDB_EMBED_PYTHON_HOME"] = "ON" + lldb_defines["LLDB_PYTHON_HOME"] = f"../{self._build_config.LLDB_PYTHON}" + lldb_defines["LLDB_PYTHON_RELATIVE_PATH"] = "bin/python/lib/python%s" % ( + self._build_config.LLDB_PY_VERSION + ) + lldb_defines["LLDB_PYTHON_EXE_RELATIVE_PATH"] = "bin/python3" + lldb_defines["LLDB_PYTHON_EXT_SUFFIX"] = ".so" + + lldb_defines["Python3_INCLUDE_DIRS"] = os.path.join( + self._python_install_dir, + "include", + f"python{self._build_config.LLDB_PY_VERSION}" + ) + lldb_defines["Python3_LIBRARIES"] = os.path.join( + self._python_install_dir, + "lib", + "libpython%s.so" % self._build_config.LLDB_PY_VERSION, + ) + lldb_defines['Python3_RPATH'] = os.path.join('$ORIGIN', '..', 'python3', 'lib') + + # Debug & Tuning + if self._build_config.enable_monitoring: + lldb_defines["LLDB_ENABLE_PERFORMANCE"] = "ON" + + return lldb_defines + + def _build_and_install(self, build_target): + if self._build_config.build_ncurses: + self._llvm_libs.build_ncurses(self._llvm_path, self._llvm_install, self._llvm_triple) + if self._build_config.build_libxml2: + self._llvm_libs.build_libxml2(self._llvm_triple, self._llvm_path, self._llvm_install) + if self._build_config.build_libedit: + self._llvm_libs.build_libedit(self._llvm_path, self._llvm_install, self._llvm_triple) + if self._build_config.build_python: + self._python_builder.build() + self._python_builder.prepare_for_package() + if self._build_config.enable_lzma_7zip: + self._llvm_libs.build_lzma(self._llvm_path, self._llvm_install, self._llvm_triple) + + self._build_utils.invoke_cmake( + self._llvm_project_path, + self._llvm_path, + self._llvm_defines, + env=dict(self._build_config.ORIG_ENV), + ) + + self._build_utils.invoke_ninja( + out_path=self._llvm_path, + env=dict(self._build_config.ORIG_ENV), + target=build_target, + install=True, + ) + + if self._build_config.build_python: + self._llvm_package.copy_python_to_host(self._python_builder._install_dir, self._llvm_path) + self._llvm_package.copy_python_to_host(self._python_builder._install_dir, self._llvm_install) + + if self._install_python_from_prebuilts: + libpython = f'libpython{self._build_config.LLDB_PY_VERSION}.so.1.0' + shutil.copyfile(os.path.join(self._python_install_dir, "lib", libpython), + os.path.join(self._llvm_install, 'lib', libpython)) + self._build_utils.check_copy_tree(self._python_install_dir, + os.path.join(self._llvm_install, self._build_config.LLDB_PYTHON)) + + # Copy required arm-linux-ohos libs from main toolchain build. + arch_list = [ + self._build_utils.liteos_triple("arm"), + self._build_utils.open_ohos_triple("arm"), + self._build_utils.open_ohos_triple("aarch64"), + self._build_utils.open_ohos_triple("riscv64"), + self._build_utils.open_ohos_triple("loongarch64"), + self._build_utils.open_ohos_triple("mipsel"), + self._build_utils.open_ohos_triple("x86_64"), + ] + for arch in arch_list: + self._build_utils.check_copy_tree( + os.path.join(self._llvm_root, "lib", arch), + os.path.join(self._llvm_install, "lib", arch), + ) + self._build_utils.check_copy_tree( + os.path.join(self._llvm_root, "lib", "clang", "15.0.4", "lib", arch), + os.path.join(self._llvm_install, "lib", "clang", "15.0.4", "lib", arch), + ) + + # Copy required c++ headerfiles from main toolchain build. + self._build_utils.check_copy_tree( + os.path.join(self._llvm_root, "include", "c++"), + os.path.join(self._llvm_install, "include", "c++"), + ) + self._build_utils.check_copy_tree( + os.path.join(self._llvm_root, "include", "libcxx-ohos"), + os.path.join(self._llvm_install, "include", "libcxx-ohos"), + ) + + def _package_if_need(self): + if self._build_config.do_package: + self._llvm_package.package_operation(self._llvm_install, f"{self._system_name}-{self._platform}") + + # virtual function + def _update_build_args(self): + return + + def build(self, build_target=None): + self._update_build_args() + + self._build_and_install(build_target) + + self._package_if_need() diff --git a/llvm-build/data/llvm_build.png b/llvm-build/data/llvm_build.png new file mode 100644 index 0000000000000000000000000000000000000000..a7f0bdb0c100cf88771a169dc06772109799650d Binary files /dev/null and b/llvm-build/data/llvm_build.png differ diff --git a/llvm-build/data/one_time_setup.png b/llvm-build/data/one_time_setup.png new file mode 100644 index 0000000000000000000000000000000000000000..5d7573173460eedb09eef86edbf8562c687c40f4 Binary files /dev/null and b/llvm-build/data/one_time_setup.png differ diff --git a/llvm-build/default_clang_lib_so_permission.checklist b/llvm-build/default_clang_lib_so_permission.checklist new file mode 100644 index 0000000000000000000000000000000000000000..4e3ab067c37faf7dec9e8690a84677420a002712 --- /dev/null +++ b/llvm-build/default_clang_lib_so_permission.checklist @@ -0,0 +1,98 @@ +lib/liblzma.so,-rwxr-xr-x +lib/libLLVM-15.so,-rw-r--r-- +lib/libarcher.so,-rw-r--r-- +lib/libclang-cpp.so,-rw-r--r-- +lib/LLVMgold.so,-rw-r--r-- +lib/libompd.so,-rw-r--r-- +lib/libRemarks.so,-rw-r--r-- +lib/libLTO.so,-rw-r--r-- +lib/liblldb.so,-rw-r--r-- +lib/libomptarget.rtl.amdgpu.so,-rw-r--r-- +lib/libomptarget.rtl.cuda.so,-rw-r--r-- +lib/libLLVM-15.0.4.so,-rw-r--r-- +lib/liblldbIntelFeatures.so,-rw-r--r-- +lib/libomptarget.so,-rw-r--r-- +lib/libLLVM.so,-rw-r--r-- +lib/libomptarget.rtl.x86_64.so,-rw-r--r-- +lib/libclang.so,-rw-r--r-- +lib/mipsel-linux-ohos/libc++.so,-rw-r--r-- +lib/mipsel-linux-ohos/nanlegacy/libc++.so,-rw-r--r-- +lib/arm-linux-ohos/libc++.so,-rw-r--r-- +lib/arm-linux-ohos/a7_softfp_neon-vfpv4/libc++.so,-rw-r--r-- +lib/arm-linux-ohos/a7_soft/libc++.so,-rw-r--r-- +lib/arm-linux-ohos/a7_hard_neon-vfpv4/libc++.so,-rw-r--r-- +lib/aarch64-linux-ohos/libc++.so,-rw-r--r-- +lib/riscv64-linux-ohos/libc++.so,-rw-r--r-- +lib/clang/15.0.4/lib/mipsel-linux-ohos/libclang_rt.ubsan_standalone.so,-rw-r--r-- +lib/clang/15.0.4/lib/mipsel-linux-ohos/libclang_rt.ubsan_minimal.so,-rw-r--r-- +lib/clang/15.0.4/lib/mipsel-linux-ohos/libclang_rt.scudo.so,-rw-r--r-- +lib/clang/15.0.4/lib/mipsel-linux-ohos/libclang_rt.asan.so,-rw-r--r-- +lib/clang/15.0.4/lib/mipsel-linux-ohos/libclang_rt.scudo_minimal.so,-rw-r--r-- +lib/clang/15.0.4/lib/mipsel-linux-ohos/libclang_rt.scudo_standalone.so,-rw-r--r-- +lib/clang/15.0.4/lib/mipsel-linux-ohos/nanlegacy/libclang_rt.ubsan_standalone.so,-rw-r--r-- +lib/clang/15.0.4/lib/mipsel-linux-ohos/nanlegacy/libclang_rt.ubsan_minimal.so,-rw-r--r-- +lib/clang/15.0.4/lib/mipsel-linux-ohos/nanlegacy/libclang_rt.scudo.so,-rw-r--r-- +lib/clang/15.0.4/lib/mipsel-linux-ohos/nanlegacy/libclang_rt.asan.so,-rw-r--r-- +lib/clang/15.0.4/lib/mipsel-linux-ohos/nanlegacy/libclang_rt.scudo_minimal.so,-rw-r--r-- +lib/clang/15.0.4/lib/mipsel-linux-ohos/nanlegacy/libclang_rt.scudo_standalone.so,-rw-r--r-- +lib/clang/15.0.4/lib/arm-linux-ohos/libclang_rt.ubsan_standalone.so,-rw-r--r-- +lib/clang/15.0.4/lib/arm-linux-ohos/libclang_rt.ubsan_minimal.so,-rw-r--r-- +lib/clang/15.0.4/lib/arm-linux-ohos/libclang_rt.scudo.so,-rw-r--r-- +lib/clang/15.0.4/lib/arm-linux-ohos/libclang_rt.asan.so,-rw-r--r-- +lib/clang/15.0.4/lib/arm-linux-ohos/libclang_rt.scudo_minimal.so,-rw-r--r-- +lib/clang/15.0.4/lib/arm-linux-ohos/libclang_rt.scudo_standalone.so,-rw-r--r-- +lib/clang/15.0.4/lib/arm-linux-ohos/a7_softfp_neon-vfpv4/libclang_rt.ubsan_standalone.so,-rw-r--r-- +lib/clang/15.0.4/lib/arm-linux-ohos/a7_softfp_neon-vfpv4/libclang_rt.ubsan_minimal.so,-rw-r--r-- +lib/clang/15.0.4/lib/arm-linux-ohos/a7_softfp_neon-vfpv4/libclang_rt.scudo.so,-rw-r--r-- +lib/clang/15.0.4/lib/arm-linux-ohos/a7_softfp_neon-vfpv4/libclang_rt.asan.so,-rw-r--r-- +lib/clang/15.0.4/lib/arm-linux-ohos/a7_softfp_neon-vfpv4/libclang_rt.scudo_minimal.so,-rw-r--r-- +lib/clang/15.0.4/lib/arm-linux-ohos/a7_softfp_neon-vfpv4/libclang_rt.scudo_standalone.so,-rw-r--r-- +lib/clang/15.0.4/lib/arm-linux-ohos/a7_soft/libclang_rt.ubsan_standalone.so,-rw-r--r-- +lib/clang/15.0.4/lib/arm-linux-ohos/a7_soft/libclang_rt.ubsan_minimal.so,-rw-r--r-- +lib/clang/15.0.4/lib/arm-linux-ohos/a7_soft/libclang_rt.scudo.so,-rw-r--r-- +lib/clang/15.0.4/lib/arm-linux-ohos/a7_soft/libclang_rt.asan.so,-rw-r--r-- +lib/clang/15.0.4/lib/arm-linux-ohos/a7_soft/libclang_rt.scudo_minimal.so,-rw-r--r-- +lib/clang/15.0.4/lib/arm-linux-ohos/a7_soft/libclang_rt.scudo_standalone.so,-rw-r--r-- +lib/clang/15.0.4/lib/arm-linux-ohos/a7_hard_neon-vfpv4/libclang_rt.ubsan_standalone.so,-rw-r--r-- +lib/clang/15.0.4/lib/arm-linux-ohos/a7_hard_neon-vfpv4/libclang_rt.ubsan_minimal.so,-rw-r--r-- +lib/clang/15.0.4/lib/arm-linux-ohos/a7_hard_neon-vfpv4/libclang_rt.scudo.so,-rw-r--r-- +lib/clang/15.0.4/lib/arm-linux-ohos/a7_hard_neon-vfpv4/libclang_rt.asan.so,-rw-r--r-- +lib/clang/15.0.4/lib/arm-linux-ohos/a7_hard_neon-vfpv4/libclang_rt.scudo_minimal.so,-rw-r--r-- +lib/clang/15.0.4/lib/arm-linux-ohos/a7_hard_neon-vfpv4/libclang_rt.scudo_standalone.so,-rw-r--r-- +lib/clang/15.0.4/lib/aarch64-linux-ohos/libclang_rt.ubsan_standalone.so,-rw-r--r-- +lib/clang/15.0.4/lib/aarch64-linux-ohos/libclang_rt.ubsan_minimal.so,-rw-r--r-- +lib/clang/15.0.4/lib/aarch64-linux-ohos/libclang_rt.scudo.so,-rw-r--r-- +lib/clang/15.0.4/lib/aarch64-linux-ohos/libclang_rt.asan.so,-rw-r--r-- +lib/clang/15.0.4/lib/aarch64-linux-ohos/libclang_rt.scudo_minimal.so,-rw-r--r-- +lib/clang/15.0.4/lib/aarch64-linux-ohos/libclang_rt.tsan.so,-rw-r--r-- +lib/clang/15.0.4/lib/aarch64-linux-ohos/libclang_rt.hwasan.so,-rw-r--r-- +lib/clang/15.0.4/lib/aarch64-linux-ohos/libclang_rt.scudo_standalone.so,-rw-r--r-- +lib/clang/15.0.4/lib/riscv64-linux-ohos/libclang_rt.ubsan_standalone.so,-rw-r--r-- +lib/clang/15.0.4/lib/riscv64-linux-ohos/libclang_rt.ubsan_minimal.so,-rw-r--r-- +lib/clang/15.0.4/lib/riscv64-linux-ohos/libclang_rt.asan.so,-rw-r--r-- +lib/clang/15.0.4/lib/loongarch64-linux-ohos/libclang_rt.ubsan_standalone.so,-rw-r--r-- +lib/clang/15.0.4/lib/loongarch64-linux-ohos/libclang_rt.ubsan_minimal.so,-rw-r--r-- +lib/clang/15.0.4/lib/loongarch64-linux-ohos/libclang_rt.scudo.so,-rw-r--r-- +lib/clang/15.0.4/lib/loongarch64-linux-ohos/libclang_rt.asan.so,-rw-r--r-- +lib/clang/15.0.4/lib/loongarch64-linux-ohos/libclang_rt.scudo_minimal.so,-rw-r--r-- +lib/clang/15.0.4/lib/loongarch64-linux-ohos/libclang_rt.tsan.so,-rw-r--r-- +lib/clang/15.0.4/lib/loongarch64-linux-ohos/libclang_rt.scudo_standalone.so,-rw-r--r-- +lib/clang/15.0.4/lib/x86_64-linux-ohos/libclang_rt.ubsan_standalone.so,-rw-r--r-- +lib/clang/15.0.4/lib/x86_64-linux-ohos/libclang_rt.ubsan_minimal.so,-rw-r--r-- +lib/clang/15.0.4/lib/x86_64-linux-ohos/libclang_rt.scudo.so,-rw-r--r-- +lib/clang/15.0.4/lib/x86_64-linux-ohos/libclang_rt.asan.so,-rw-r--r-- +lib/clang/15.0.4/lib/x86_64-linux-ohos/libclang_rt.scudo_minimal.so,-rw-r--r-- +lib/clang/15.0.4/lib/x86_64-linux-ohos/libclang_rt.tsan.so,-rw-r--r-- +lib/clang/15.0.4/lib/x86_64-linux-ohos/libclang_rt.hwasan.so,-rw-r--r-- +lib/clang/15.0.4/lib/x86_64-linux-ohos/libclang_rt.scudo_standalone.so,-rw-r--r-- +lib/clang/15.0.4/lib/x86_64-linux-ohos/libclang_rt.dyndd.so,-rw-r--r-- +lib/clang/15.0.4/lib/x86_64-linux-ohos/libclang_rt.hwasan_aliases.so,-rw-r--r-- +lib/loongarch64-linux-ohos/libc++.so,-rw-r--r-- +lib/x86_64-unknown-linux-gnu/libunwind.so,-rw-r--r-- +lib/x86_64-unknown-linux-gnu/libc++.so,-rw-r--r-- +lib/x86_64-unknown-linux-gnu/libc++abi.so,-rw-r--r-- +lib/arm-liteos-ohos/libc++.so,-rw-r--r-- +lib/arm-liteos-ohos/a7_softfp_neon-vfpv4/libc++.so,-rw-r--r-- +lib/arm-liteos-ohos/a7_soft/libc++.so,-rw-r--r-- +lib/arm-liteos-ohos/a7_hard_neon-vfpv4/libc++.so,-rw-r--r-- +lib/x86_64-linux-ohos/libc++.so,-rw-r--r-- diff --git a/llvm-build/default_ndk_lib_so_permission.checklist b/llvm-build/default_ndk_lib_so_permission.checklist new file mode 100644 index 0000000000000000000000000000000000000000..56168fb1761dfc7a67b1b4886f5a4e0a21d2b1a7 --- /dev/null +++ b/llvm-build/default_ndk_lib_so_permission.checklist @@ -0,0 +1,14 @@ +lib/mipsel-linux-ohos/libc++_shared.so,-rw-r--r-- +lib/mipsel-linux-ohos/nanlegacy/libc++_shared.so,-rw-r--r-- +lib/arm-linux-ohos/libc++_shared.so,-rw-r--r-- +lib/arm-linux-ohos/a7_softfp_neon-vfpv4/libc++_shared.so,-rw-r--r-- +lib/arm-linux-ohos/a7_soft/libc++_shared.so,-rw-r--r-- +lib/arm-linux-ohos/a7_hard_neon-vfpv4/libc++_shared.so,-rw-r--r-- +lib/aarch64-linux-ohos/libc++_shared.so,-rw-r--r-- +lib/riscv64-linux-ohos/libc++_shared.so,-rw-r--r-- +lib/loongarch64-linux-ohos/libc++_shared.so,-rw-r--r-- +lib/arm-liteos-ohos/libc++_shared.so,-rw-r--r-- +lib/arm-liteos-ohos/a7_softfp_neon-vfpv4/libc++_shared.so,-rw-r--r-- +lib/arm-liteos-ohos/a7_soft/libc++_shared.so,-rw-r--r-- +lib/arm-liteos-ohos/a7_hard_neon-vfpv4/libc++_shared.so,-rw-r--r-- +lib/x86_64-linux-ohos/libc++_shared.so,-rw-r--r-- diff --git a/llvm-build/env_prepare.sh b/llvm-build/env_prepare.sh new file mode 100755 index 0000000000000000000000000000000000000000..e1393a461ba4c06b242090b984bf691944c550c3 --- /dev/null +++ b/llvm-build/env_prepare.sh @@ -0,0 +1,171 @@ +case $(uname -s) in + Linux) + + host_platform=linux + ;; + Darwin) + host_platform=darwin + ;; + *) + echo "Unsupported host platform: $(uname -s)" + exit 1 +esac + +case $(uname -m) in + arm64) + + host_cpu=arm64 + ;; + *) + host_cpu=x86_64 +esac + +linux_platform=linux-x86 +darwin_platform=darwin-x86 +download_url=https://mirrors.huaweicloud.com + +# sync code directory +code_dir=$(pwd) + +# downloaded files will be automatically unzipped under this path +bin_dir=${code_dir}/download_packages + +# download and initialize prebuild files +if [ ! -d "${bin_dir}" ];then + mkdir -p "${bin_dir}" +fi + +DOWNLOADER="wget -t3 -T10 -O" + +function download_and_archive() { + archive_dir=$1 + download_source_url=$2 + bin_file=$(basename ${download_source_url}) + ${DOWNLOADER} "${bin_dir}/${bin_file}" "${download_source_url}" + if (( $? )) ; then + echo "Failed to download ${download_source_url}" 2>& 1 + exit 1 + fi + if [ ! -d "${code_dir}/${archive_dir}" ];then + mkdir -p "${code_dir}/${archive_dir}" + fi + if [ "X${bin_file:0-3}" = "Xzip" ];then + unzip -o "${bin_dir}/${bin_file}" -d "${code_dir}/${archive_dir}/" + elif [ "X${bin_file:0-6}" = "Xtar.gz" ];then + tar -xvzf "${bin_dir}/${bin_file}" -C "${code_dir}/${archive_dir}" + else + tar -xvf "${bin_dir}/${bin_file}" -C "${code_dir}/${archive_dir}" + fi + if (( $? )) ; then + echo "Failed to unpack ${bin_dir}/${bin_file}, corrupted?" 2>& 1 + exit 1 + fi +} + + +copy_config=""" +""" +copy_config_linux_x86_64=""" +prebuilts/cmake,cmake-${linux_platform} +prebuilts/clang/ohos/${host_platform}-${host_cpu},linux/clang_${linux_platform} +prebuilts/python3,python-${linux_platform} +prebuilts/python3,python-linux-arm64 +prebuilts/build-tools/${host_platform}-x86/bin,gn-${linux_platform} +prebuilts/build-tools/${host_platform}-x86/bin,ninja-${linux_platform} +""" + +copy_config_darwin_x86_64=""" +prebuilts/cmake,cmake-darwin-universal +prebuilts/clang/ohos/${host_platform}-${host_cpu},darwin_x86_64/clang_${darwin_platform} +prebuilts/python3,python-${darwin_platform} +prebuilts/build-tools/${host_platform}-x86/bin,gn-${darwin_platform} +prebuilts/build-tools/${host_platform}-x86/bin,ninja-${darwin_platform} +""" + +copy_config_darwin_arm64=""" +prebuilts/cmake,cmake-darwin-universal +prebuilts/clang/ohos/${host_platform}-${host_cpu},darwin_arm64/clang_darwin-arm64 +prebuilts/python3,python-${host_platform}-${host_cpu} +prebuilts/build-tools/${host_platform}-${host_cpu}/bin,gn-${darwin_platform} +prebuilts/build-tools/${host_platform}-${host_cpu}/bin,ninja-darwin-arm +""" + +if [[ "${host_platform}" == "linux" ]]; then + if [[ "${host_cpu}" == "x86_64" ]]; then + copy_config+=${copy_config_linux_x86_64} + echo "add ubuntu here" + else + echo "unknwon host_cpu - ${host_cpu} for linux" + fi +elif [[ "${host_platform}" == "darwin" ]]; then + if [[ "${host_cpu}" == "x86_64" ]]; then + copy_config+=${copy_config_darwin_x86_64} + echo "add x86-64 mac here" + elif [[ "${host_cpu}" == "arm64" ]]; then + copy_config+=${copy_config_darwin_arm64} + echo "add m1 config here" + else + echo "unknwon host_cpu - ${host_cpu} for darwin" + fi +else + echo "unknown ${host_platform}" +fi + + +for i in $(echo ${copy_config}) +do + unzip_dir=$(echo $i|awk -F ',' '{print $1}') + keyword=$(echo $i|awk -F ',' '{print $2}') + url_part=$(cat ./build/prebuilts_download_config.json | sort | uniq | grep "$keyword" | grep -oE '"/[^"]+"' | sed 's/^"//;s/"$//' |head -1) + echo $url_part + if [ -n "$url_part" ]; then + full_url="${download_url}${url_part}" + else + echo "URL not found" + exit 1 + fi + download_and_archive "${unzip_dir}" "${full_url}" + +done + +linux_filename=$(cat ./build/prebuilts_download_config.json | sort | uniq | grep "clang_linux-x86" | grep -oE '"/[^"]+"' | sed 's/^"//;s/"$//') +CLANG_LINUX_BUILD=$(basename "$linux_filename" .tar.bz2) + +darwin_x86_filename=$(cat ./build/prebuilts_download_config.json | sort | uniq | grep "clang_darwin-x86_64" | grep -oE '"/[^"]+"' | sed 's/^"//;s/"$//') +CLANG_DARWIN_X86_BUILD=$(basename "$darwin_x86_filename" .tar.bz2) + +darwin_arm_filename=$(cat ./build/prebuilts_download_config.json | sort | uniq | grep "clang_darwin-arm64" | grep -oE '"/[^"]+"' | sed 's/^"//;s/"$//') +CLANG_DARWIN_ARM_BUILD=$(basename "$darwin_arm_filename" .tar.bz2) + +if [ -d "${code_dir}/prebuilts/clang/ohos/linux-x86_64/${CLANG_LINUX_BUILD}" ]; then + SET_CLANG_VERSION='15.0.4' + mv "${code_dir}/prebuilts/clang/ohos/linux-x86_64/${CLANG_LINUX_BUILD}" "${code_dir}/prebuilts/clang/ohos/linux-x86_64/clang-${SET_CLANG_VERSION}" + ln -s "${code_dir}/prebuilts/clang/ohos/linux-x86_64/clang-${SET_CLANG_VERSION}" "${code_dir}/prebuilts/clang/ohos/linux-x86_64/llvm" +fi + +if [ -d "${code_dir}/prebuilts/clang/ohos/darwin-x86_64/${CLANG_DARWIN_X86_BUILD}" ]; then + SET_CLANG_VERSION='15.0.4' + mv "${code_dir}/prebuilts/clang/ohos/darwin-x86_64/${CLANG_DARWIN_X86_BUILD}" "${code_dir}/prebuilts/clang/ohos/darwin-x86_64/clang-${SET_CLANG_VERSION}" + ln -s "${code_dir}/prebuilts/clang/ohos/darwin-x86_64/clang-${SET_CLANG_VERSION}" "${code_dir}/prebuilts/clang/ohos/darwin-x86_64/llvm" +fi + +if [ -d "${code_dir}/prebuilts/clang/ohos/darwin-arm64/${CLANG_DARWIN_ARM_BUILD}" ]; then + SET_CLANG_VERSION='15.0.4' + mv "${code_dir}/prebuilts/clang/ohos/darwin-arm64/${CLANG_DARWIN_ARM_BUILD}" "${code_dir}/prebuilts/clang/ohos/darwin-arm64/clang-${SET_CLANG_VERSION}" + mv "${code_dir}/prebuilts/cmake/darwin-x86" "${code_dir}/prebuilts/cmake/darwin-arm64" + ln -s "${code_dir}/prebuilts/clang/ohos/darwin-arm64/clang-${SET_CLANG_VERSION}" "${code_dir}/prebuilts/clang/ohos/darwin-arm64/llvm" +fi + +# try to detect version ... +BASE_CLANG_DIR="${code_dir}/prebuilts/clang/ohos/${host_platform}-${host_cpu}" +CLANG_FOUND_VERSION=$(cd ${BASE_CLANG_DIR}; basename $(ls -d clang*/ | head -1) | sed s/clang-//) + +# check that pipe above didn't fail and that we have (any) clang version +if [ ! $? == 0 ] || [ x == x${CLANG_FOUND_VERSION} ] ; then + echo "env_prepare.sh: could not detect clang version" 2>&1 + exit 1 +fi +# ... and compare it with one in python file +echo "prebuilts_clang_version='${CLANG_FOUND_VERSION}'" | diff -q - $(dirname $0)/prebuilts_clang_version.py || ( echo Clang versions mismatch ; exit 1 ) +exit 0 + diff --git a/llvm-build/get_ohos_flags.py b/llvm-build/get_ohos_flags.py new file mode 100644 index 0000000000000000000000000000000000000000..1596ef8ff6d46278965652b7f5525e158aeb8bec --- /dev/null +++ b/llvm-build/get_ohos_flags.py @@ -0,0 +1,57 @@ +import os + +def get_ohos_flags(out_path, flag_type): + oh_ninja_path = os.path.join(out_path, 'obj', 'toolchain', 'llvm-project', 'llvm-build', 'llvm_test.ninja') + with open(oh_ninja_path, 'r') as file: + lines = file.readlines() + for line in lines: + line = line.lstrip() + if line.startswith(flag_type): + flag_line = line.replace(flag_type, "") + flag_list = list(tuple(flag_line.split( ))) + flag_list = sorted(set(flag_list), key=flag_list.index) + return flag_list + +def get_ohos_cflags(out_path, llvm_cflags): + cflag_list = get_ohos_flags(out_path, 'cflags = ') + filter_list = [ + '-Xclang', + '-mllvm', + '-instcombine-lower-dbg-declare=0', + '-ffunction-sections', + '-Werror', + '-g2', + ] + + filter_re = [ + '--target=', + '-march=', + '-mfloat-abi=', + '-mtune=', + ] + for filter_str in filter_re: + for cflag in cflag_list: + if cflag.startswith(filter_str) or cflag in filter_list: + cflag_list.remove(cflag) + + if llvm_cflags: + cflag_list.extend(llvm_cflags) + return sorted(set(cflag_list), key=cflag_list.index) + +def get_ohos_ldflags(out_path, llvm_ldflags): + ldflag_list = get_ohos_flags(out_path, 'ldflags = ') + filter_list = [ + '-Wl,--exclude-libs=libunwind_llvm.a', + '-Wl,--exclude-libs=libc++_static.a', + '-Wl,--exclude-libs=libvpx_assembly_arm.a', + '--target=arm-linux-ohos', + '-Werror', + '--sysroot=obj/third_party/musl', + ] + for ldflag in filter_list: + if ldflag in ldflag_list: + ldflag_list.remove(ldflag) + + if llvm_ldflags: + ldflag_list.extend(llvm_ldflags) + return sorted(set(ldflag_list), key=ldflag_list.index) diff --git a/llvm-build/libcxx_abidiff/aarch64-linux-ohos/libc++_shared.abi b/llvm-build/libcxx_abidiff/aarch64-linux-ohos/libc++_shared.abi new file mode 100644 index 0000000000000000000000000000000000000000..757c2c4e24a7c5c67474f6f01f7b2a8dd3c4a3e7 --- /dev/null +++ b/llvm-build/libcxx_abidiff/aarch64-linux-ohos/libc++_shared.abi @@ -0,0 +1,2366 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/llvm-build/libcxx_abidiff/arm-linux-ohos/a7_hard_neon-vfpv4/libc++_shared.abi b/llvm-build/libcxx_abidiff/arm-linux-ohos/a7_hard_neon-vfpv4/libc++_shared.abi new file mode 100644 index 0000000000000000000000000000000000000000..9ab042d5bce09ba9f564a213e6e50a327c4fc7f1 --- /dev/null +++ b/llvm-build/libcxx_abidiff/arm-linux-ohos/a7_hard_neon-vfpv4/libc++_shared.abi @@ -0,0 +1,2372 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/llvm-build/libcxx_abidiff/arm-linux-ohos/a7_soft/libc++_shared.abi b/llvm-build/libcxx_abidiff/arm-linux-ohos/a7_soft/libc++_shared.abi new file mode 100644 index 0000000000000000000000000000000000000000..9ab042d5bce09ba9f564a213e6e50a327c4fc7f1 --- /dev/null +++ b/llvm-build/libcxx_abidiff/arm-linux-ohos/a7_soft/libc++_shared.abi @@ -0,0 +1,2372 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/llvm-build/libcxx_abidiff/arm-linux-ohos/a7_softfp_neon-vfpv4/libc++_shared.abi b/llvm-build/libcxx_abidiff/arm-linux-ohos/a7_softfp_neon-vfpv4/libc++_shared.abi new file mode 100644 index 0000000000000000000000000000000000000000..9ab042d5bce09ba9f564a213e6e50a327c4fc7f1 --- /dev/null +++ b/llvm-build/libcxx_abidiff/arm-linux-ohos/a7_softfp_neon-vfpv4/libc++_shared.abi @@ -0,0 +1,2372 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/llvm-build/libcxx_abidiff/arm-linux-ohos/libc++_shared.abi b/llvm-build/libcxx_abidiff/arm-linux-ohos/libc++_shared.abi new file mode 100644 index 0000000000000000000000000000000000000000..9ab042d5bce09ba9f564a213e6e50a327c4fc7f1 --- /dev/null +++ b/llvm-build/libcxx_abidiff/arm-linux-ohos/libc++_shared.abi @@ -0,0 +1,2372 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/llvm-build/libcxx_abidiff/arm-liteos-ohos/a7_hard_neon-vfpv4/libc++_shared.abi b/llvm-build/libcxx_abidiff/arm-liteos-ohos/a7_hard_neon-vfpv4/libc++_shared.abi new file mode 100644 index 0000000000000000000000000000000000000000..60a1c87eaead3844f3f9d62f6648fd1c004f0740 --- /dev/null +++ b/llvm-build/libcxx_abidiff/arm-liteos-ohos/a7_hard_neon-vfpv4/libc++_shared.abi @@ -0,0 +1,2372 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/llvm-build/libcxx_abidiff/arm-liteos-ohos/a7_soft/libc++_shared.abi b/llvm-build/libcxx_abidiff/arm-liteos-ohos/a7_soft/libc++_shared.abi new file mode 100644 index 0000000000000000000000000000000000000000..60a1c87eaead3844f3f9d62f6648fd1c004f0740 --- /dev/null +++ b/llvm-build/libcxx_abidiff/arm-liteos-ohos/a7_soft/libc++_shared.abi @@ -0,0 +1,2372 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/llvm-build/libcxx_abidiff/arm-liteos-ohos/a7_softfp_neon-vfpv4/libc++_shared.abi b/llvm-build/libcxx_abidiff/arm-liteos-ohos/a7_softfp_neon-vfpv4/libc++_shared.abi new file mode 100644 index 0000000000000000000000000000000000000000..60a1c87eaead3844f3f9d62f6648fd1c004f0740 --- /dev/null +++ b/llvm-build/libcxx_abidiff/arm-liteos-ohos/a7_softfp_neon-vfpv4/libc++_shared.abi @@ -0,0 +1,2372 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/llvm-build/libcxx_abidiff/arm-liteos-ohos/libc++_shared.abi b/llvm-build/libcxx_abidiff/arm-liteos-ohos/libc++_shared.abi new file mode 100644 index 0000000000000000000000000000000000000000..60a1c87eaead3844f3f9d62f6648fd1c004f0740 --- /dev/null +++ b/llvm-build/libcxx_abidiff/arm-liteos-ohos/libc++_shared.abi @@ -0,0 +1,2372 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/llvm-build/libcxx_abidiff/mipsel-linux-ohos/libc++_shared.abi b/llvm-build/libcxx_abidiff/mipsel-linux-ohos/libc++_shared.abi new file mode 100644 index 0000000000000000000000000000000000000000..65cda7fbf2990236fcc9974e3d569ead09aa113f --- /dev/null +++ b/llvm-build/libcxx_abidiff/mipsel-linux-ohos/libc++_shared.abi @@ -0,0 +1,2366 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/llvm-build/libcxx_abidiff/mipsel-linux-ohos/nanlegacy/libc++_shared.abi b/llvm-build/libcxx_abidiff/mipsel-linux-ohos/nanlegacy/libc++_shared.abi new file mode 100644 index 0000000000000000000000000000000000000000..65cda7fbf2990236fcc9974e3d569ead09aa113f --- /dev/null +++ b/llvm-build/libcxx_abidiff/mipsel-linux-ohos/nanlegacy/libc++_shared.abi @@ -0,0 +1,2366 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/llvm-build/libcxx_abidiff/riscv64-linux-ohos/libc++_shared.abi b/llvm-build/libcxx_abidiff/riscv64-linux-ohos/libc++_shared.abi new file mode 100644 index 0000000000000000000000000000000000000000..d8e41fef4660728be1b0d7fe97a6242fd14fcbd6 --- /dev/null +++ b/llvm-build/libcxx_abidiff/riscv64-linux-ohos/libc++_shared.abi @@ -0,0 +1,2364 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/llvm-build/libcxx_abidiff/x86_64-linux-ohos/libc++_shared.abi b/llvm-build/libcxx_abidiff/x86_64-linux-ohos/libc++_shared.abi new file mode 100644 index 0000000000000000000000000000000000000000..f14d3a5e37971597fef358fecbcbdd1223317abe --- /dev/null +++ b/llvm-build/libcxx_abidiff/x86_64-linux-ohos/libc++_shared.abi @@ -0,0 +1,2365 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/llvm-build/libcxx_patch/script/build_patch.sh b/llvm-build/libcxx_patch/script/build_patch.sh new file mode 100755 index 0000000000000000000000000000000000000000..44863f92461fe9ad2bf4d8d784e2ef756c791909 --- /dev/null +++ b/llvm-build/libcxx_patch/script/build_patch.sh @@ -0,0 +1,81 @@ +#!/bin/sh +# Copyright (C) 2025 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. + +# usage build_patch.sh +# check the args +if [ $# -ne 1 ]; then + echo "Usage: $0 " + echo "Hint: is the directory where the directory llvm-project is built." + echo "Example: $0 /home/ohos/workplace/ohos/llvm-toolchain/out" + exit 1 +fi + +# check the install path +# there should be a directory named llvm in the install path +# and the llvm directory should contain the bin/clang file +LLVM_OUT_PATH=$1 +if [ ! -d $LLVM_OUT_PATH/llvm-install ]; then + echo "Error: The LLVM_OUT_PATH: $LLVM_OUT_PATH does not a legal path." + echo "Hint: is the directory where the directory llvm-project is built." + exit 1 +fi +echo "LLVM_OUT_PATH: $LLVM_OUT_PATH" + +BUILD_PATH=/tmp/libcxx_patch_build_$(($RANDOM + $(date +%s))) +echo "Building the patch..." +echo "BUILD_PATH: $BUILD_PATH" + +# libc++.so +echo "Copying libc++.so..." +mkdir -p $BUILD_PATH/patch/llvm/system_libcxx/lib/aarch64-linux-ohos +cp $LLVM_OUT_PATH/llvm-install/lib/aarch64-linux-ohos/libc++.so $BUILD_PATH/patch/llvm/system_libcxx/lib/aarch64-linux-ohos/ + +# __config_site +echo "Copying __config_site..." +mkdir -p $BUILD_PATH/patch/llvm/system_libcxx/include +cp $LLVM_OUT_PATH/llvm-install/include/libcxx-ohos/include/c++/v1/__config_site $BUILD_PATH/patch/llvm/system_libcxx/include/ + +# ohos.toolchain.cmake +echo "Copying ohos.toolchain.cmake..." +mkdir -p $BUILD_PATH/patch/build/cmake +cp $LLVM_OUT_PATH/../build/ohos/ndk/cmake/ohos.toolchain.cmake $BUILD_PATH/patch/build/cmake/ + +echo "Patching cmake toolchain file..." +sed -i '/elseif(OHOS_STL STREQUAL c++_shared)/a\ +elseif(OHOS_STL STREQUAL system)\ + # system libcxx is only supported for aarch64-linux-ohos\ + if(OHOS_TOOLCHAIN_NAME STREQUAL aarch64-linux-ohos)\ + include_directories("${OHOS_SDK_NATIVE}/llvm/system_libcxx/include")\ + link_directories("${OHOS_SDK_NATIVE}/llvm/system_libcxx/lib/${OHOS_TOOLCHAIN_NAME}")\ + else()\ + message(FATAL_ERROR "Unsupported STL configuration: ${OHOS_STL} which is only available for aarch64-linux-ohos.")\ + endif()' $BUILD_PATH/patch/build/cmake/ohos.toolchain.cmake + +# script.sh +echo "Copying install.sh..." +mkdir -p $BUILD_PATH/script +cp -r $(dirname "$(realpath "$0")")/install.sh $BUILD_PATH/script + +# test +echo "Copying test..." +mkdir -p $BUILD_PATH/test +cp -r $(dirname "$(realpath "$0")")/../test/* $BUILD_PATH/test + +# tar the patch +echo "Taring the patch..." +tar -cf $LLVM_OUT_PATH/../packages/libcxx_patch.tar.xz -C $BUILD_PATH/.. $(basename $BUILD_PATH) + +echo "Patch built successfully." +echo "The patch is saved in $LLVM_OUT_PATH/../packages/libcxx_patch.tar.xz" diff --git a/llvm-build/libcxx_patch/script/install.sh b/llvm-build/libcxx_patch/script/install.sh new file mode 100755 index 0000000000000000000000000000000000000000..b535caff2e5f483658e46d166328aa9236974b74 --- /dev/null +++ b/llvm-build/libcxx_patch/script/install.sh @@ -0,0 +1,92 @@ +#!/bin/sh +# Copyright (C) 2025 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. + +# usage install.sh +# check the args +if [ $# -ne 1 ]; then + echo "Usage: $0 " + echo "Hint: is the directory where the directory llvm is located." + echo "Example: $0 /home/ohos/command-line-tools/sdk/default/openharmony/native" + exit 1 +fi + +# check the install path +# there should be a directory named llvm in the install path +# and the llvm directory should contain the bin/clang file +INSTALL_PATH=$1 +if [ ! -f $INSTALL_PATH/llvm/bin/clang ]; then + echo "Error: The INSTALL_PATH: $INSTALL_PATH does not a legal path." + echo "Hint: is the directory where the directory llvm is located." + exit 1 +fi +echo "INSTALL_PATH: $INSTALL_PATH" + +# apply the patch +echo "Applying the patch..." +SCRIPT_PATH=$(dirname "$(realpath "$0")") +cp -rf $SCRIPT_PATH/../patch/* $INSTALL_PATH +echo "Patch applied." + +# testing the patch +echo "Testing the patch..." + +# find cmake +CMAKE=$INSTALL_PATH/build-tools/cmake/bin/cmake +if [ ! -f $CMAKE ]; then + echo "Error: The cmake is not found in the path: $CMAKE" + exit 1 +else + echo "CMAKE: $CMAKE" +fi + +# find llvm-readelf +READELF=$INSTALL_PATH/llvm/bin/llvm-readelf +if [ ! -f $READELF ]; then + echo "Error: The llvm-readelf is not found in the path: $READELF" + exit 1 +else + echo "READELF: $READELF" +fi + +# == test c++_shared == +# build the test +BUILD_PATH_SHARED=/tmp/libcxx_patch_c++_shared_$(($RANDOM + $(date +%s))) +echo "Testing OHOS_STL=c++_shared..." +$CMAKE -DOHOS_STL=c++_shared -DCMAKE_TOOLCHAIN_FILE=$INSTALL_PATH/build/cmake/ohos.toolchain.cmake -B $BUILD_PATH_SHARED -S $SCRIPT_PATH/../test > /dev/null +$CMAKE --build $BUILD_PATH_SHARED > /dev/null +# check the shared library using readelf +$READELF -d $BUILD_PATH_SHARED/test | grep libc++_shared.so +if [ $? -ne 0 ]; then + echo "Error: Test failed: The libc++_shared.so is not linked." + exit 1 +fi + +# == test system == +# build the test + +BUILD_PATH_SYSTEM=/tmp/libcxx_patch_c++_system_$(($RANDOM + $(date +%s))) +echo "Testing OHOS_STL=system..." +$CMAKE -DOHOS_STL=system -DCMAKE_TOOLCHAIN_FILE=$INSTALL_PATH/build/cmake/ohos.toolchain.cmake -B $BUILD_PATH_SYSTEM -S $SCRIPT_PATH/../test > /dev/null +$CMAKE --build $BUILD_PATH_SYSTEM > /dev/null +# check the shared library using readelf +$READELF -d $BUILD_PATH_SYSTEM/test | grep libc++.so +if [ $? -ne 0 ]; then + echo "Error: Test failed: The libc++.so is not linked." + exit 1 +fi + +echo "All tests passed." +echo "Patch installed successfully." + diff --git a/llvm-build/libcxx_patch/test/CMakeLists.txt b/llvm-build/libcxx_patch/test/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..a58165fed4282a400c51404b563af310033ac8d1 --- /dev/null +++ b/llvm-build/libcxx_patch/test/CMakeLists.txt @@ -0,0 +1,23 @@ +# Copyright (C) 2025 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. + +cmake_minimum_required(VERSION 3.16) +project(ndk-patch-test) + +set(OHOS_ARCH arm64-v8a) +set(OHOS_PLATFORM OHOS) + +add_compile_options(-Wno-unused-command-line-argument) + +add_executable(test ./src/main.cpp) \ No newline at end of file diff --git a/llvm-build/libcxx_patch/test/src/main.cpp b/llvm-build/libcxx_patch/test/src/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8e01c3de431f5d61355183674c07f8b2e5c4adc0 --- /dev/null +++ b/llvm-build/libcxx_patch/test/src/main.cpp @@ -0,0 +1,21 @@ +/** + * Copyright (c) 2025 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. + */ + +#include + +int main() { + std::cout << "Hello, World!" << std::endl; + return 0; +} \ No newline at end of file diff --git a/llvm-build/mingw.py b/llvm-build/mingw.py new file mode 100755 index 0000000000000000000000000000000000000000..8597491acd47a84124e1d949ab968365e7ad50c2 --- /dev/null +++ b/llvm-build/mingw.py @@ -0,0 +1,246 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2021 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. + +"""donwload and build mingw64-7.0.0 sysroot""" + +import logging +import os +import shutil +import subprocess +import sys + +def force_symlink(src, dst): + if os.path.exists(dst): + os.remove(dst) + os.symlink(src, dst) + +class BuildConfig(): + + def __init__(self, clang_version, buildtools_path): + self.buildtools_path = buildtools_path + self.LLVM_BUILD_DIR = os.path.realpath(os.path.dirname(__file__)) + + parent_of_llvm_build = os.path.basename(os.path.dirname(self.LLVM_BUILD_DIR)) + if parent_of_llvm_build == 'toolchain': + self.REPOROOT_DIR = os.path.realpath(os.path.join(self.LLVM_BUILD_DIR, '../..')) + else: + assert parent_of_llvm_build == 'llvm-project' + self.REPOROOT_DIR = os.path.realpath(os.path.join(self.LLVM_BUILD_DIR, '../../..')) + + self.OUT_DIR = os.environ.get('OUT_DIR', self.repo_root('out')) + self.CLANG_VERSION = clang_version + self.LLVM_TRIPLE = 'x86_64-windows-gnu' + + def repo_root(self, *args): + return os.path.join(self.REPOROOT_DIR, *args) + + def out_root(self, *args): + return os.path.join(self.OUT_DIR, *args) + + def mingw64_dir(self): + return self.out_root('mingw', self.LLVM_TRIPLE) + + def llvm_path(self, *args): + return os.path.join(self.REPOROOT_DIR, 'toolchain/llvm-project', *args) + + +class LlvmMingw(): + + def __init__(self, build_config): + self.build_config = build_config + + self.CMAKE_BIN_PATH = os.path.join(self.cmake_prebuilt_bin_dir(), 'cmake') + self.NINJA_BIN_PATH = os.path.join(self.build_config.repo_root(self.build_config.buildtools_path, 'build-tools', 'linux-x86', 'bin'), 'ninja') + + self.LLVM_ROOT = self.build_config.out_root('llvm-install') + self.LLVM_CONFIG = os.path.join(self.LLVM_ROOT, 'bin', 'llvm-config') + self.SYSROOT = self.build_config.mingw64_dir() + self.CRT_PATH = self.build_config.out_root('lib', 'mingw-clangrt-%s' % self.build_config.LLVM_TRIPLE) + self.CRT_INSTALL = self.build_config.out_root('llvm-install', 'lib', 'clang', self.build_config.CLANG_VERSION) + # prefix & env + self.prefix = build_config.mingw64_dir() + common_flags = "-target x86_64-w64-mingw32 -rtlib=compiler-rt -stdlib=libc++ \ + -fuse-ld=lld -Qunused-arguments -g -O2 --sysroot=" + self.build_config.mingw64_dir() + self.env = { + "CC": "%s/bin/clang" % self.LLVM_ROOT, + "CXX": "%s/bin/clang++" % self.LLVM_ROOT, + "AR": "%s/bin/llvm-ar" % self.LLVM_ROOT, + "DLLTOOL": "%s/bin/llvm-dlltool" % self.LLVM_ROOT, + "LD": "%s/bin/ld.lld" % self.LLVM_ROOT, + "RANLIB": "%s/bin/llvm-ranlib" % self.LLVM_ROOT, + "STRIP": "%s/bin/llvm-strip" % self.LLVM_ROOT, + "LDFLAGS": common_flags, + "CFLAGS": common_flags, + "CXXFLAGS": common_flags, + "PATH": os.environ["PATH"], + } + + def cmake_prebuilt_bin_dir(self): + return self.build_config.repo_root(self.build_config.buildtools_path, 'cmake', 'linux-x86', 'bin') + + def base_cmake_defines(self): + self.cmake_defines = {} + self.cmake_defines['CMAKE_BUILD_TYPE'] = 'Release' + self.cmake_defines['LLVM_ENABLE_ASSERTIONS'] = 'OFF' + self.cmake_defines['LLVM_ENABLE_TERMINFO'] = 'OFF' + self.cmake_defines['LLVM_ENABLE_THREADS'] = 'ON' + self.cmake_defines['LLVM_USE_NEWPM'] = 'ON' + self.cmake_defines['COMPILER_RT_BUILD_XRAY'] = 'OFF' + return self.cmake_defines + + @staticmethod + def check_create_path(path): + if not os.path.exists(path): + os.makedirs(path) + + @staticmethod + def check_call(cmd, *args, **kwargs): + subprocess.check_call(cmd, *args, **kwargs) + + @staticmethod + def update_cmake_sysroot_flags(defines, sysroot): + defines['CMAKE_SYSROOT'] = sysroot + defines['CMAKE_FIND_ROOT_PATH_MODE_INCLUDE'] = 'ONLY' + defines['CMAKE_FIND_ROOT_PATH_MODE_LIBRARY'] = 'ONLY' + defines['CMAKE_FIND_ROOT_PATH_MODE_PACKAGE'] = 'ONLY' + defines['CMAKE_FIND_ROOT_PATH_MODE_PROGRAM'] = 'NEVER' + + def compiler_rt_defines(self): + arch = 'x86_64' + cc = os.path.join(self.LLVM_ROOT, 'bin', 'clang') + cxx = os.path.join(self.LLVM_ROOT, 'bin', 'clang++') + self.crt_defines = {} + self.crt_defines['CMAKE_C_COMPILER'] = cc + self.crt_defines['CMAKE_CXX_COMPILER'] = cxx + self.crt_defines['LLVM_CONFIG_PATH'] = self.LLVM_CONFIG + clang_libcxx_lib = self.build_config.out_root('clang_mingw', 'clang-%s' % self.build_config.CLANG_VERSION, 'lib') + ldflags = [ + '-L%s' % clang_libcxx_lib, + '-fuse-ld=lld', + '-Wl,--gc-sections', + '-pie', + '--rtlib=compiler-rt', + '-stdlib=libc++', + '-v', + ] + self.crt_defines['CMAKE_SHARED_LINKER_FLAGS'] = ' '.join(ldflags) + self.update_cmake_sysroot_flags(self.crt_defines, self.SYSROOT) + cflags = [ + '--target=%s' % self.build_config.LLVM_TRIPLE, + '-ffunction-sections', + '-fdata-sections', + ] + cflags.append('-funwind-tables') + cflags.append('-v') + self.crt_defines['CMAKE_C_FLAGS'] = ' '.join(cflags) + self.crt_defines['CMAKE_ASM_FLAGS'] = ' '.join(cflags) + self.crt_defines['CMAKE_CXX_FLAGS'] = ' '.join(cflags) + self.crt_defines['COMPILER_RT_TEST_COMPILER_CFLAGS'] = ' '.join(cflags) + self.crt_defines['COMPILER_RT_TEST_TARGET_TRIPLE'] = self.build_config.LLVM_TRIPLE + self.crt_defines['COMPILER_RT_DEFAULT_TARGET_TRIPLE'] = self.build_config.LLVM_TRIPLE + self.crt_defines['COMPILER_RT_INCLUDE_TESTS'] = 'OFF' + self.crt_defines['CMAKE_INSTALL_PREFIX'] = self.CRT_INSTALL + self.crt_defines['COMPILER_RT_BUILD_LIBFUZZER'] = 'OFF' + self.crt_defines['COMPILER_RT_USE_BUILTINS_LIBRARY'] = 'TRUE' + self.crt_defines['CMAKE_SYSTEM_NAME'] = 'Windows' + self.crt_defines['CMAKE_CROSSCOMPILING'] = 'True' + self.crt_defines['CMAKE_C_COMPILER_WORKS'] = '1' + self.crt_defines['CMAKE_CXX_COMPILER_WORKS'] = '1' + self.crt_defines['SANITIZER_CXX_ABI'] = 'libcxxabi' + self.crt_defines['CMAKE_TRY_COMPILE_TARGET_TYPE'] = 'STATIC_LIBRARY' + self.crt_defines['COMPILER_RT_BUILD_SANITIZERS'] = 'OFF' + self.crt_defines['COMPILER_RT_EXCLUDE_ATOMIC_BUILTIN'] = 'OFF' + #cmake config + self.crt_defines.update(self.base_cmake_defines()) + return self.crt_defines + + def build_compiler_rt(self): + crt_defines = self.compiler_rt_defines() + #environ + crt_env = dict(dict(os.environ)) + #compiler-rt path + crt_cmake_path = self.build_config.llvm_path('compiler-rt') + #cmake + self.invoke_cmake( + out_path=self.CRT_PATH, + defines=crt_defines, + env=crt_env, + cmake_path=crt_cmake_path) + + def invoke_cmake(self, out_path, defines, env, cmake_path, target=None, install=True): + flags = ['-G', 'Ninja'] + flags += ['-DCMAKE_PREFIX_PATH=%s' % self.cmake_prebuilt_bin_dir()] + + for key in defines: + newdef = ''.join(['-D', key, '=', defines[key]]) + flags += [newdef] + flags += [cmake_path] + + self.check_create_path(out_path) + + if target: + ninja_target = [target] + else: + ninja_target = [] + + self.check_call([self.CMAKE_BIN_PATH] + flags, cwd=out_path, env=env) + self.check_call([self.NINJA_BIN_PATH] + ninja_target, cwd=out_path, env=env) + if install: + self.check_call([self.NINJA_BIN_PATH, 'install'], cwd=out_path, env=env) + + def build_mingw64_headers(self): + headers_dir = self.build_config.repo_root('third_party', 'mingw-w64', 'mingw-w64-headers', 'build') + if os.path.isdir(headers_dir): + shutil.rmtree(headers_dir) + os.makedirs(headers_dir) + os.chdir(headers_dir) + cmd = ['../configure', '--prefix=%s' % self.prefix, + '--enable-idl', '--with-default-win32-winnt=0x600', + '--with-default-msvcrt=ucrt'] + self.env['INSTALL'] = "install -C" + self.check_call(cmd, env=self.env) + self.check_call(['make', 'install'], env=self.env) + + def build_mingw64_crtlibs(self): + crtlibs_dir = self.build_config.repo_root('third_party', 'mingw-w64', 'mingw-w64-crt', 'build') + if os.path.isdir(crtlibs_dir): + shutil.rmtree(crtlibs_dir) + os.makedirs(crtlibs_dir) + os.chdir(crtlibs_dir) + cmd = ['../configure', '--prefix=%s' % self.prefix, + '--host=x86_64-w64-mingw32', '--disable-lib32', + '--enable-lib64', '--with-default-msvcrt=ucrt'] + self.check_call(cmd, env=self.env) + self.check_call(['make', '-j4'], env=self.env) + self.check_call(['make', 'install'], env=self.env) + # Fix for stack protection library, see: + # https://sourceforge.net/p/mingw-w64/mingw-w64/ci/10394c9a966f8e93e9e2f09677dab273a0f6c00c/ + mingw_lib_dir = os.path.join(self.prefix, 'lib') + libmingwex = os.path.join(mingw_lib_dir, 'libmingwex.a') + force_symlink(libmingwex, os.path.join(mingw_lib_dir, 'libssp.a')) + force_symlink(libmingwex, os.path.join(mingw_lib_dir, 'libssp_nonshared.a')) + + +def main(clang_version, buildtools_path): + build_config = BuildConfig(clang_version, buildtools_path) + llvm_mingw = LlvmMingw(build_config) + + llvm_mingw.build_mingw64_headers() + llvm_mingw.build_mingw64_crtlibs() + llvm_mingw.build_compiler_rt() + return 0 + +if __name__ == '__main__': + main() diff --git a/llvm-build/platform_package.sh b/llvm-build/platform_package.sh new file mode 100644 index 0000000000000000000000000000000000000000..e5cff03aff7a13179d2a23e64818dc2edd21756e --- /dev/null +++ b/llvm-build/platform_package.sh @@ -0,0 +1,147 @@ +#!/bin/bash +# 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. + +# init variable +commit_id="" +date="" + +clang_linux_x86_64_tar="clang-dev-linux-x86_64.tar.gz" +clang_darwin_arm64_tar="clang-dev-darwin-arm64.tar.gz" +clang_darwin_x86_64_tar="clang-dev-darwin-x86_64.tar.gz" +clang_windows_x86_64_tar="clang-dev-windows-x86_64.tar.gz" +clang_ohos_arm64_tar="clang-dev-ohos-aarch64.tar.gz" +clang_linux_aarch64_tar="clang-dev-linux-aarch64.tar.gz" +libcxx_ndk_linux_x86_64_tar="libcxx-ndk-dev-linux-x86_64.tar.gz" +libcxx_ndk_darwin_x86_64_tar="libcxx-ndk-dev-darwin-x86_64.tar.gz" +libcxx_ndk_darwin_arm64_tar="libcxx-ndk-dev-darwin-arm64.tar.gz" +libcxx_ndk_windows_x86_64_tar="libcxx-ndk-dev-windows-x86_64.tar.gz" +libcxx_ndk_linux_aarch64_tar="libcxx-ndk-dev-linux-aarch64.tar.gz" + +clang_linux_x86_64="clang_linux-x86_64-${commit_id}-${date}" +clang_darwin_arm64="clang_darwin-arm64-${commit_id}-${date}" +clang_darwin_x86_64="clang_darwin-x86_64-${commit_id}-${date}" +clang_windows_x86_64="clang_windows-x86_64-${commit_id}-${date}" +clang_ohos_arm64="clang_ohos-arm64-${commit_id}-${date}" +clang_linux_aarch64="clang_linux_aarch64-${commit_id}-${date}" +libcxx_ndk_linux_x86_64="libcxx-ndk_linux-x86_64-${commit_id}-${date}" +libcxx_ndk_darwin_x86_64="libcxx-ndk_darwin-x86_64-${commit_id}-${date}" +libcxx_ndk_darwin_arm64="libcxx-ndk_darwin-arm64-${commit_id}-${date}" +libcxx_ndk_windows_x86_64="libcxx-ndk_windows-x86_64-${commit_id}-${date}" +libcxx_ndk_ohos_arm64="libcxx_ndk_ohos-arm64-${commit_id}-${date}" +libcxx_ndk_linux_aarch64="libcxx-ndk_linux-aarch64-${commit_id}-${date}" +llvm_list=($clang_linux_x86_64 $clang_darwin_arm64 $clang_darwin_x86_64 $clang_windows_x86_64 $clang_ohos_arm64 $clang_linux_aarch64 $libcxx_ndk_linux_x86_64 $libcxx_ndk_darwin_x86_64 $libcxx_ndk_darwin_arm64 $libcxx_ndk_windows_x86_64 $libcxx_ndk_ohos_arm64 $libcxx_ndk_linux_aarch64) + +# decompress file and rename +tar -xvf ${clang_linux_x86_64_tar} +mv clang-dev ${clang_linux_x86_64} +tar -xvf ${clang_darwin_arm64_tar} +mv clang-dev ${clang_darwin_arm64} +tar -xvf ${clang_darwin_x86_64_tar} +mv clang-dev ${clang_darwin_x86_64} +tar -xvf ${clang_windows_x86_64_tar} +mv clang-dev ${clang_windows_x86_64} +tar -xvf ${clang_ohos_arm64_tar} +mv clang-dev ${clang_ohos_arm64} +tar -xvf ${clang_linux_aarch64_tar} +mv clang-dev ${clang_linux_aarch64} +tar -xvf ${libcxx_ndk_linux_x86_64_tar} +mv libcxx-ndk ${libcxx_ndk_linux_x86_64} +tar -xvf ${libcxx_ndk_darwin_x86_64_tar} +mv libcxx-ndk ${libcxx_ndk_darwin_x86_64} +tar -xvf ${libcxx_ndk_darwin_arm64_tar} +mv libcxx-ndk ${libcxx_ndk_darwin_arm64} +tar -xvf ${libcxx_ndk_windows_x86_64_tar} +mv libcxx-ndk ${libcxx_ndk_windows_x86_64} +cp -ar ${libcxx_ndk_linux_x86_64} ${libcxx_ndk_ohos_arm64} +tar -xvf ${libcxx_ndk_linux_aarch64_tar} +mv libcxx-ndk ${libcxx_ndk_linux_aarch64} + +#clang-dev-darwin-arm64 +cp -rf ${clang_linux_x86_64}/lib/aarch64-linux-ohos ${clang_darwin_arm64}/lib +cp -rf ${clang_linux_x86_64}/lib/arm-liteos-ohos ${clang_darwin_arm64}/lib +cp -rf ${clang_linux_x86_64}/include/libcxx-ohos ${clang_darwin_arm64}/include +cp -rf ${clang_linux_x86_64}/lib/arm-linux-ohos ${clang_darwin_arm64}/lib +cp -rf ${clang_linux_x86_64}/lib/loongarch64-linux-ohos ${clang_darwin_arm64}/lib +cp -rf ${clang_linux_x86_64}/lib/x86_64-linux-ohos ${clang_darwin_arm64}/lib +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/bin ${clang_darwin_arm64}/lib/clang/15.0.4 +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/include/profile ${clang_darwin_arm64}/lib/clang/15.0.4/include +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/include/fuzzer ${clang_darwin_arm64}/lib/clang/15.0.4/include +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/share ${clang_darwin_arm64}/lib/clang/15.0.4 +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/include/sanitizer ${clang_darwin_arm64}/lib/clang/15.0.4/include +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/lib/ ${clang_darwin_arm64}/lib/clang/15.0.4 + +#clang-dev-darwin-x86_64 +cp -rf ${clang_linux_x86_64}/lib/aarch64-linux-ohos ${clang_darwin_x86_64}/lib +cp -rf ${clang_linux_x86_64}/lib/arm-liteos-ohos ${clang_darwin_x86_64}/lib +cp -rf ${clang_linux_x86_64}/lib/arm-linux-ohos ${clang_darwin_x86_64}/lib +cp -rf ${clang_linux_x86_64}/lib/x86_64-linux-ohos ${clang_darwin_x86_64}/lib +cp -rf ${clang_linux_x86_64}/lib/loongarch64-linux-ohos ${clang_darwin_x86_64}/lib +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/bin ${clang_darwin_x86_64}/lib/clang/15.0.4 +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/share ${clang_darwin_x86_64}/lib/clang/15.0.4 +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/lib ${clang_darwin_x86_64}/lib/clang/15.0.4 +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/include/profile ${clang_darwin_x86_64}/lib/clang/15.0.4/include +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/include/fuzzer ${clang_darwin_x86_64}/lib/clang/15.0.4/include +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/include/sanitizer ${clang_darwin_x86_64}/lib/clang/15.0.4/include +cp -rf ${clang_linux_x86_64}/include/libcxx-ohos ${clang_darwin_x86_64}/include + +#clang-dev-windows-x86_64 +cp -rf ${clang_linux_x86_64}/include/libcxx-ohos ${clang_windows_x86_64}/include +cp -rf ${clang_linux_x86_64}/lib/aarch64-linux-ohos ${clang_windows_x86_64}/lib +cp -rf ${clang_linux_x86_64}/lib/arm-liteos-ohos ${clang_windows_x86_64}/lib +cp -rf ${clang_linux_x86_64}/lib/arm-linux-ohos ${clang_windows_x86_64}/lib +cp -rf ${clang_linux_x86_64}/lib/x86_64-linux-ohos ${clang_windows_x86_64}/lib +cp -rf ${clang_linux_x86_64}/lib/loongarch64-linux-ohos ${clang_windows_x86_64}/lib +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/bin ${clang_windows_x86_64}/lib/clang/15.0.4 +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/share ${clang_windows_x86_64}/lib/clang/15.0.4 +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/lib ${clang_windows_x86_64}/lib/clang/15.0.4 +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/include/profile ${clang_windows_x86_64}/lib/clang/15.0.4/include +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/include/fuzzer ${clang_windows_x86_64}/lib/clang/15.0.4/include +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/include/sanitizer ${clang_windows_x86_64}/lib/clang/15.0.4/include + + +#clang-dev-ohos-aarch64 +cp -rf ${clang_linux_x86_64}/include/libcxx-ohos ${clang_ohos_arm64}/include +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/bin ${clang_ohos_arm64}/lib/clang/15.0.4 +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/share ${clang_ohos_arm64}/lib/clang/15.0.4 +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/lib ${clang_ohos_arm64}/lib/clang/15.0.4 +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/include/profile ${clang_ohos_arm64}/lib/clang/15.0.4/include +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/include/fuzzer ${clang_ohos_arm64}/lib/clang/15.0.4/include +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/include/sanitizer ${clang_ohos_arm64}/lib/clang/15.0.4/include + +#clang-dev-linux-aarch64 +cp -rf ${clang_linux_x86_64}/include/libcxx-ohos ${clang_linux_aarch64}/include +cp -rf ${clang_linux_x86_64}/lib/aarch64-linux-ohos ${clang_linux_aarch64}/lib +cp -rf ${clang_linux_x86_64}/lib/arm-liteos-ohos ${clang_linux_aarch64}/lib +cp -rf ${clang_linux_x86_64}/lib/arm-linux-ohos ${clang_linux_aarch64}/lib +cp -rf ${clang_linux_x86_64}/lib/x86_64-linux-ohos ${clang_linux_aarch64}/lib +cp -rf ${clang_linux_x86_64}/lib/loongarch64-linux-ohos ${clang_linux_aarch64}/lib +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/bin ${clang_linux_aarch64}/lib/clang/15.0.4 +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/share ${clang_linux_aarch64}/lib/clang/15.0.4 +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/lib ${clang_linux_aarch64}/lib/clang/15.0.4 +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/include/profile ${clang_linux_aarch64}/lib/clang/15.0.4/include +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/include/fuzzer ${clang_linux_aarch64}/lib/clang/15.0.4/include +cp -rf ${clang_linux_x86_64}/lib/clang/15.0.4/include/sanitizer ${clang_linux_aarch64}/lib/clang/15.0.4/include + + +#archive +mkdir target_location +function package_llvm(){ +for i in ${llvm_list[@]} +do + tar zcvf target_location/${i}.tar.gz ${i} + sha256sum target_location/${i}.tar.gz |awk '{print $1}' > target_location/${i}.tar.gz.sha256 +done +} + +package_llvm diff --git a/llvm-build/prebuilts_clang_version.py b/llvm-build/prebuilts_clang_version.py new file mode 100644 index 0000000000000000000000000000000000000000..1281c1f0ca347a19976ad2ef9ac26d1677e35187 --- /dev/null +++ b/llvm-build/prebuilts_clang_version.py @@ -0,0 +1 @@ +prebuilts_clang_version='15.0.4' diff --git a/llvm-build/python_builder.py b/llvm-build/python_builder.py new file mode 100755 index 0000000000000000000000000000000000000000..1438f2db5b3a84da7fd7f6ab3a763dc044eb400d --- /dev/null +++ b/llvm-build/python_builder.py @@ -0,0 +1,370 @@ +# Copyright (C) 2023 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. + +import logging +import os +from pathlib import Path +import shutil +import subprocess +from typing import List, Mapping +import binascii + +class PythonBuilder: + target_platform = "" + patches = [] + + def __init__(self, build_config) -> None: + self.repo_root = Path(build_config.REPOROOT_DIR).resolve() + self._out_dir = Path(build_config.OUT_PATH).resolve() + self._clang_toolchain_dir = self._out_dir / 'llvm-install' + self._lldb_py_version = build_config.LLDB_PY_VERSION + self._version = build_config.LLDB_PY_DETAILED_VERSION + version_parts = self._version.split('.') + self._major_version = version_parts[0] + '.' + version_parts[1] + self._source_dir = self.repo_root / 'third_party' / 'python' + self._patch_dir = self._source_dir / 'patches' + self._prebuilts_path = os.path.join(self.repo_root, 'prebuilts', 'python3', 'linux-x86', self._version) + self._prebuilts_python_path = os.path.join(self._prebuilts_path, 'bin', 'python%s' % self._lldb_py_version) + self._install_dir = "" + + self._clean_patches() + + @property + def _logger(self) -> logging.Logger: + return logging.getLogger(__name__) + + @property + def _cc(self) -> Path: + return self._clang_toolchain_dir/ 'bin' / 'clang' + + @property + def _cflags(self) -> List[str]: + return [] + + @property + def _ldflags(self) -> List[str]: + return [] + + @property + def _cxx(self) -> Path: + return self._clang_toolchain_dir / 'bin' / 'clang++' + + @property + def _strip(self) -> Path: + return self._clang_toolchain_dir / 'bin' / 'llvm-strip' + + @property + def _cxxflags(self) -> List[str]: + return self._cflags.copy() + + @property + def _rcflags(self) -> List[str]: + return [] + + @property + def _env(self) -> Mapping[str, str]: + clang_bin_dir = self._clang_toolchain_dir / 'bin' + env = os.environ.copy() + + env.update({ + 'CC': str(self._cc), + 'CXX': str(self._cxx), + 'WINDRES': str(clang_bin_dir / 'llvm-windres'), + 'AR': str(clang_bin_dir / 'llvm-ar'), + 'READELF': str(clang_bin_dir / 'llvm-readelf'), + 'LD': str(clang_bin_dir / 'ld.lld'), + 'DLLTOOL': str(clang_bin_dir / 'llvm-dlltoo'), + 'RANLIB': str(clang_bin_dir / 'llvm-ranlib'), + 'STRIP': str(self._strip), + 'CFLAGS': ' '.join(self._cflags), + 'CXXFLAGS': ' '.join(self._cxxflags), + 'LDFLAGS': ' '.join(self._ldflags), + 'RCFLAGS': ' '.join(self._rcflags), + 'CPPFLAGS': ' '.join(self._cflags), + }) + return env + + def _configure(self) -> None: + return + + def _clean_patches(self) -> None: + subprocess.check_call(['git', 'reset', '--hard', 'HEAD'], cwd=self._source_dir) + subprocess.check_call(['git', 'clean', '-df'], cwd=self._source_dir) + + def _pre_build(self) -> None: + if self._patch_ignore_file.is_file(): + self._logger.warning('Patches for Python have being applied, skip patching') + return + + if not self._patch_dir.is_dir(): + self._logger.warning('Patches are not found, skip patching') + return + + for patch in self._patch_dir.iterdir(): + if patch.is_file() and patch.name in self.patches: + cmd = [ 'git', 'apply', str(patch) ] + subprocess.check_call(cmd, cwd=self._source_dir) + + def build(self) -> None: + self._pre_build() + if self._build_dir.exists(): + shutil.rmtree(self._build_dir) + if self._install_dir.exists(): + shutil.rmtree(self._install_dir) + self._build_dir.mkdir(parents=True) + self._install_dir.mkdir(parents=True) + self._configure() + self._install() + + def _install(self) -> None: + num_jobs = os.cpu_count() or 8 + cmd = [ 'make', f'-j{num_jobs}', 'install'] + subprocess.check_call(cmd, cwd=self._build_dir) + + def _strip_in_place(self, file: Path) -> None: + cmd = [ + str(self._strip), + str(file), + ] + subprocess.check_call(cmd) + + def _clean_bin_dir(self) -> None: + python_bin_dir = self._install_dir / 'bin' + if not python_bin_dir.is_dir(): + return + + windows_suffixes = ( '.exe', '.dll' ) + for f in python_bin_dir.iterdir(): + if f.suffix not in windows_suffixes or f.is_symlink(): + f.unlink() + continue + self._strip_in_place(f) + + def _remove_dir(self, dir_path: Path) -> None: + if dir_path.is_dir(): + shutil.rmtree(dir_path) + + def _clean_share_dir(self) -> None: + share_dir = self._install_dir / 'share' + self._remove_dir(share_dir) + + def _clean_lib_dir(self) -> None: + python_lib_dir = self._install_dir / 'lib' + pkgconfig_dir = python_lib_dir / 'pkgconfig' + self._remove_dir(pkgconfig_dir) + + def _remove_exclude(self) -> None: + exclude_dirs_tuple = ( + 'config-' + self._lldb_py_version, + '__pycache__', # EXCLUDE_FROM_LIB + 'idlelib', # IDLE_DIRS_ONLY + 'tkinter', 'turtledemo', # TCLTK_DIRS_ONLY + 'test', 'tests' # TEST_DIRS_ONLY + ) + exclude_files_tuple = ( + 'bdist_wininst.py', # BDIST_WININST_FILES_ONLY + 'turtle.py', # TCLTK_FILES_ONLY + '.whl', + '.pyc', '.pickle' # EXCLUDE_FROM_LIB + ) + + for root, dirs, files in os.walk(self._install_dir / 'lib'): + for item in dirs: + if item.startswith(exclude_dirs_tuple): + shutil.rmtree(os.path.join(root, item)) + for item in files: + if item.endswith(exclude_files_tuple): + os.remove(os.path.join(root, item)) + + def _is_elf_file(self, file_path: Path) -> None: + with open(file_path, 'rb') as f: + magic_numbers = f.read(4) + hex_magic_number = binascii.hexlify(magic_numbers).decode('utf-8') + if hex_magic_number == '7f454c46': + return True + else: + return False + + @property + def install_dir(self) -> str: + return str(self._install_dir) + + +class MinGWPythonBuilder(PythonBuilder): + def __init__(self, build_config) -> None: + super().__init__(build_config) + + self.target_platform = "x86_64-w64-mingw32" + self.patches = [ f'cpython_mingw_v{self._version}.patch' ] + + self._mingw_install_dir = self._out_dir / 'mingw' / build_config.MINGW_TRIPLE + self._build_dir = self._out_dir / 'python-windows-build' + self._install_dir = self._out_dir / 'python-windows-install' + + # This file is used to detect whether patches are applied + self._patch_ignore_file = self._source_dir / 'mingw_ignorefile.txt' + + + for directory in (self._clang_toolchain_dir, self._mingw_install_dir, + self._source_dir): + if not directory.is_dir(): + raise ValueError(f'No such directory "{directory}"') + + @property + def _cflags(self) -> List[str]: + cflags = [ + f'-target {self.target_platform}', + f'--sysroot={self._mingw_install_dir}', + f'-fstack-protector-strong', + ] + return cflags + + @property + def _ldflags(self) -> List[str]: + ldflags = [ + f'--sysroot={self._mingw_install_dir}', + f'-rtlib=compiler-rt', + f'-target {self.target_platform}', + f'-lucrt', + f'-lucrtbase', + f'-fuse-ld=lld', + ] + return ldflags + + @property + def _rcflags(self) -> List[str]: + return [ f'-I{self._mingw_install_dir}/include' ] + + def _configure(self) -> None: + subprocess.check_call(['autoreconf', '-vfi'], cwd=self._source_dir) + build_platform = subprocess.check_output( + ['./config.guess'], cwd=self._source_dir).decode().strip() + config_flags = [ + f'--prefix={self._install_dir}', + f'--build={build_platform}', + f'--host={self.target_platform}', + f'--with-build-python={self._prebuilts_python_path}', + '--enable-shared', + '--without-ensurepip', + '--enable-loadable-sqlite-extensions', + ] + cmd = [str(self._source_dir / 'configure')] + config_flags + subprocess.check_call(cmd, env=self._env, cwd=self._build_dir) + + def prepare_for_package(self) -> None: + self._clean_bin_dir() + self._clean_share_dir() + self._clean_lib_dir() + self._remove_exclude() + + def package(self) -> None: + archive = self._out_dir / f'cpython-mingw-clang-{self._version}.tar.gz' + if archive.exists(): + archive.unlink() + cmd = [ + 'tar', + '-czf', + str(archive), + '--exclude=__pycache__', # Do not package __pycache__ directory + '--transform', + # Pack under directory python3/windows-x86 + f's,^,python3/windows-x86/{self._version}/,', + ] + [ f.name for f in self._install_dir.iterdir() ] + subprocess.check_call(cmd, cwd=self._install_dir) + + +class OHOSPythonBuilder(PythonBuilder): + def __init__(self, build_utils, target_platform) -> None: + super().__init__(build_utils.build_config) + + self.target_platform = target_platform + self.patches = ["cross_compile_support_ohos.patch"] + + self._build_dir = Path(build_utils.merge_python_build_dir(target_platform)) + self._install_dir = Path(build_utils.merge_python_install_dir(target_platform)) + + # This file is used to detect whether patches are applied + self._patch_ignore_file = self._source_dir / 'support_ohos_ignorefile.txt' + + self.build_utils = build_utils + return + + @property + def _cflags(self) -> List[str]: + cflags = [ + f'--target={self.target_platform}', + f'-fstack-protector-strong', + '-nostdinc', + '-I%s' % str(self._out_dir / 'sysroot' / self.target_platform / 'usr' / 'include'), + ] + if str(self.target_platform).find("arm") > 0: + cflags.append('-march=armv7-a -mfloat-abi=soft') + return cflags + + @property + def _ldflags(self) -> List[str]: + ldflags = [ + f'-rtlib=compiler-rt', + f'--target={self.target_platform}', + f'-fuse-ld=lld', + f'-Wl,-z,relro,-z,now -Wl,-z,noexecstack', + '-fstack-protector-strong', + '-L%s' % str(self._out_dir / 'sysroot' / self.target_platform / 'usr' / 'lib'), + '-lc', + '-Wl,-rpath,\\$$ORIGIN/../lib', + ] + return ldflags + + def _configure(self) -> None: + subprocess.check_call(['autoreconf', '-vfi'], cwd=self._source_dir) + build_platform = subprocess.check_output( + ['./config.guess'], cwd=self._source_dir).decode().strip() + config_flags = [ + f'--prefix={self._install_dir}', + f'--build={build_platform}', + f'--host={self.target_platform}', + f'--with-build-python={self._prebuilts_python_path}', + '--enable-shared', + '--without-ensurepip', + '--enable-loadable-sqlite-extensions', + '--disable-ipv6', + 'ac_cv_file__dev_ptmx=no', + 'ac_cv_file__dev_ptc=no', + '--without-system-ffi', + '--without-pydebug', + '--without-doc-strings', + '--without-dtrace', + ] + cmd = [str(self._source_dir / 'configure')] + config_flags + subprocess.check_call(cmd, env=self._env, cwd=self._build_dir) + + def prepare_for_package(self) -> None: + self._remove_exclude() + if self.build_utils.build_config.strip: + python_bin_dir = self._install_dir / 'bin' + if not python_bin_dir.is_dir(): + return + + for f in python_bin_dir.iterdir(): + if f.is_symlink(): + continue + if self._is_elf_file(f): + self._strip_in_place(f) + + for root, dirs, files in os.walk(self._install_dir / 'lib'): + for item in files: + f = os.path.join(root, item) + if os.path.islink(f): + continue + if self._is_elf_file(f): + self._strip_in_place(f) diff --git a/llvm-build/so_permission_check_readme_en.md b/llvm-build/so_permission_check_readme_en.md new file mode 100644 index 0000000000000000000000000000000000000000..02d34f3e5b90be9224c8fd099a32932e79faeb46 --- /dev/null +++ b/llvm-build/so_permission_check_readme_en.md @@ -0,0 +1,37 @@ +# LLVM Toolchain Compiled Product SO File Permission Check Script +## Purpose +To verify whether the permissions of all .so files in the lib folders of LLVM compiled products, Clang, and NDK meet the requirements. + +## Version Description +The permission check list included in the current submission is based on the version 15.0.4-6fe50d generated from the mirror site (https://mirrors.huaweicloud.com/harmonyos/compiler/clang/15.0.4-6fe50d/linux/). + +## Usage +Checks are performed separately on the lib folders of Clang and NDK. The {lib_path} should be the absolute path or relative path (relative to the location of the Python script) corresponding to the first-level lib directory, and it should end with lib. + +### Generate SO File Permission List +Search and check each .so file in the lib folder, and record the permission list to the output file. + +```shell +python so_permission_check.py -g {lib_path} {filename} +``` +### Generate Default SO File Permission List +Search and check each .so file in the lib folder, and record the permission list to the output file. The default check lists are default_clang_lib_so_permission.checklist and default_ndk_lib_so_permission.checklist. +```shell +# Generate default permission list for Clang lib +python so_permission_check.py -cdg {lib_path} +# Generate default permission list for NDK lib +python so_permission_check.py -ndg {lib_path} +``` +### Check Custom List +Check the permissions of the .so files in the input lib folder based on the provided permission check list. +```shell +python so_permission_check.py -v {lib_path} {filename} +``` +### Check Default List +Verify the permissions of the .so files in the input lib folder against the permission list of the baseline version (before running this command, ensure that the directory contains default_clang_lib_so_permission.checklist and default_ndk_lib_so_permission.checklist). +```shell +# Check Clang lib +python so_permission_check.py -cdv {lib_path} +# Check NDK lib +python so_permission_check.py -ndv {lib_path} +``` \ No newline at end of file diff --git a/llvm-build/so_permission_check_readme_zh.md b/llvm-build/so_permission_check_readme_zh.md new file mode 100644 index 0000000000000000000000000000000000000000..7e6a0912ec708b811a01b6fd2f430bae5c67a09a --- /dev/null +++ b/llvm-build/so_permission_check_readme_zh.md @@ -0,0 +1,33 @@ +# llvm工具链编译产物中so文件权限校验脚本 +## 用途 +校验llvm编译产物clang和ndk中lib文件夹下所有的so文件权限是否符合要求 +## 版本说明 +当前提交中包含的权限检查列表基于镜像网站中15.0.4-6fe50d版本生成(https://mirrors.huaweicloud.com/harmonyos/compiler/clang/15.0.4-6fe50d/linux/) +## 使用方法 +针对clang和ndk中lib文件夹分别进行校验,`{lib_path}`为clang或ndk下第一层lib对应绝对路径或相较于py脚本所在位置的相对路径,且以lib结尾 +### so文件权限列表生成 +搜索并检查lib文件夹内的每个.so文件,记录权限列表到输出文件中 +```shell +python so_permission_check.py -g {lib_path} {filename} +``` +### 默认so文件权限列表生成 +搜索并检查lib文件夹内的每个.so文件,记录权限列表到输出文件中,默认检查列表为default_clang_lib_so_permission.checklist和default_ndk_lib_so_permission.checklist +```shell +# clang lib默认权限列表生成 +python so_permission_check.py -cdg {lib_path} +# ndk lib默认权限列表生成 +python so_permission_check.py -ndg {lib_path} +``` +### 校验自定义列表 +根据给定的权限校验列表,校验输入lib文件夹内.so文件的权限是否正确 +```shell +python so_permission_check.py -v {lib_path} {filename} +``` +### 校验默认列表 +根据基准版本的.so权限列表,校验输入lib文件夹内.so文件的权限是否正确(运行该指令之前,确保目录中包含default_clang_lib_so_permission.checklist和default_ndk_lib_so_permission.checklist) +```shell +# clang lib校验 +python so_permission_check.py -cdv {lib_path} +# ndk lib校验 +python so_permission_check.py -ndv {lib_path} +``` \ No newline at end of file diff --git a/llvm-build/so_permissions_check.py b/llvm-build/so_permissions_check.py new file mode 100644 index 0000000000000000000000000000000000000000..1301ca239a95fb68266b5302224eb5e5c22b555f --- /dev/null +++ b/llvm-build/so_permissions_check.py @@ -0,0 +1,170 @@ +#!/usr/bin/env python3 +# 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. + +import os +import stat +import sys +from datetime import datetime +import logging + +class SoPermissionCheck: + SO_PERMISSION_CHECK_MIN_ARGS_NUMBER = 3 + DEFAULT_CLANG_LIB_SO_PERMISSION_CHECKLIST_PATH = "default_clang_lib_so_permission.checklist" + DEFAULT_NDK_LIB_SO_PERMISSION_CHECKLIST_PATH = "default_ndk_lib_so_permission.checklist" + logger = None + + def __init__(self) -> None: + self.logger = logging.getLogger("so permission check") + self.logger.setLevel(logging.INFO) + ch = logging.StreamHandler() + ch.setLevel(logging.INFO) + formatter = logging.Formatter('%(asctime)s: %(levelname)s: %(name)s: %(message)s') + ch.setFormatter(formatter) + self.logger.addHandler(ch) + + def so_permissions_list_generate(self, directory: str, output_file: str): + ''' + Read all .so files in the lib folder and generate a verification file. + Typically used for generating new verification files after a version update. + + Args: + directory(str): the clang lib path or the ndk lib path + output_file(str): path and filename of the output file to save the permission check list + Return: + No return value but a checklist file will be generated. + ''' + with open(output_file, 'w') as ff: + pass + total = 0 + for root, dirs, files in os.walk(directory): + for file in files: + if file.endswith('.so'): + total += 1 + file_path = os.path.join(root, file) + file_stat = os.stat(file_path) + file_mode = stat.filemode(file_stat.st_mode) + with open(output_file, 'a') as f: + f.write('lib' + file_path.replace(directory, '').replace('\\', '/') + ',' + file_mode+ '\n') + self.logger.info(f"Total {total} .so files in {directory}") + + def so_files_permissions_check(self, directory: str, checklist_file: str) -> bool: + ''' + Check if the permissions of the binary files match those in the checklist file. + + Args: + directory(str): the clang lib path or the ndk lib path + checklist_file(str): path and filename of the checklist file saved the permission check list + Return: + True(all permission check succeeded) or False(one or more check failed). + ''' + lack = 0 + total = 0 + fail = 0 + success = 0 + + timestamp = datetime.now().strftime("%Y_%m_%d_%H_%M_%S") + log_file_path = "so_permissions_check_log" + timestamp + ".txt" + + success_log = "" + error_log = "" + lack_log = "" + with open(checklist_file, 'r') as ff: + for line in ff: + lib_file_path = os.path.join(directory, line.split(',')[0].split('lib/', 1)[1]).replace('\\', '/') + so_file_stat_expected = line.split(',')[1].replace('\n', '') + so_file_stat_real = self.get_file_permissions(lib_file_path) + if so_file_stat_real is None: + lack += 1 + total += 1 + lack_log += f"{lib_file_path} check failed, the file is missed.\n" + elif so_file_stat_expected == stat.filemode(os.stat(lib_file_path).st_mode): + success += 1 + total += 1 + success_log += f"{lib_file_path} check succeeded.\n" + else: + fail += 1 + total += 1 + error_log += f"{lib_file_path} check failed, expected: {so_file_stat_expected}, real: {stat.filemode(os.stat(lib_file_path).st_mode)}\n" + + with open(log_file_path, 'w') as f: + f.write(f'llvm so permissions check complete, Success: {success}/{total}, Failed: {fail}/{total}, Lack: {lack}/{total}\n') + f.write(f'\n{fail}/{total} checks failed.\n') + f.write(error_log) + f.write(f'\n{lack}/{total} file missed.\n') + f.write(lack_log) + f.write(f'\n{success}/{total} checks succeed.\n') + f.write(success_log) + + if success == total: + self.logger.info(f"{directory} so permissions check passed.") + return True + else: + self.logger.error(f"{directory} so permissions check failed.") + self.logger.error(f"{fail}/{total} checks failed.\n") + self.logger.error(error_log) + self.logger.error(f"{lack}/{total} file missed.\n") + self.logger.error(lack_log) + self.logger.error(f"{fail + lack}/{total} checks failed, check logs are in {os.path.join(os.getcwd(), log_file_path)}") + return False + + def get_file_permissions(self, file_path: str) -> str: + '''Get file permissions and throw possible exceptions.''' + try: + file_stat = os.stat(file_path) + permissions = stat.filemode(file_stat.st_mode) + return permissions + except FileNotFoundError: + self.logger.error(f"file '{file_path}' not found.") + except PermissionError: + self.logger.error(f"no read permission for '{file_path}'.") + except Exception as e: + self.logger.error(f"unknown error - {e}") + return None + + def check(self, clang_lib_path: str, ndk_lib_path: str) -> bool: + ''' + Main build script calling interface. + Check the so file permissions in clang and ndk lib directories based on the default check list. + ''' + return self.so_files_permissions_check(clang_lib_path, self.DEFAULT_CLANG_LIB_SO_PERMISSION_CHECKLIST_PATH) \ + & self.so_files_permissions_check(ndk_lib_path, self.DEFAULT_NDK_LIB_SO_PERMISSION_CHECKLIST_PATH) + + def cmd_handler(self) -> None: + '''Perform parameter recognition and execute corresponding tasks.''' + args = sys.argv + if len(args) < self.SO_PERMISSION_CHECK_MIN_ARGS_NUMBER: + self.logger.info("Missing arguments. Correct eg: python so_permission_check.py -g clang/lib") + return + + match args[1]: + case '-g': + self.so_permissions_list_generate(args[2], args[3]) + case '-cdg': + self.so_permissions_list_generate(args[2], self.DEFAULT_CLANG_LIB_SO_PERMISSION_CHECKLIST_PATH) + case '-ndg': + self.so_permissions_list_generate(args[2], self.DEFAULT_NDK_LIB_SO_PERMISSION_CHECKLIST_PATH) + case '-v': + self.so_files_permissions_check(args[2], args[3]) + case '-cdv': + self.so_files_permissions_check(args[2], self.DEFAULT_CLANG_LIB_SO_PERMISSION_CHECKLIST_PATH) + case '-ndv': + self.so_files_permissions_check(args[2], self.DEFAULT_NDK_LIB_SO_PERMISSION_CHECKLIST_PATH) + case _: + self.logger.info("The input arguments are incorrect. Check the input arguments by reading the README document.") +def main(): + so_permission_check = SoPermissionCheck() + so_permission_check.cmd_handler() +if __name__ == '__main__': + main() diff --git a/llvm-build/toolchain_readme.md b/llvm-build/toolchain_readme.md new file mode 100644 index 0000000000000000000000000000000000000000..de059bf7752f740cb6449e3da07f8f77591a4f78 --- /dev/null +++ b/llvm-build/toolchain_readme.md @@ -0,0 +1,26 @@ +## Overview + +This readme briefly describes the functionality of our LLVM toolchain and what we have included specially to the LLVM toolchain. + +## Functionality + +The LLVM toolchain is built based on LLVM 15.0.4. It is used to provide capability of building ohos image. For detailed information about LLVM 15.0.4, please refer to [LLVM 15.0.4](https://discourse.llvm.org/t/llvm-15-0-4-released/66337). +
+ + +## Specifically Included Triplets + +Despite all the components provided by LLVM community, we included several triplets for different types of ohos devices to our LLVM toochain, listed as below. For specification, liteos is a newly included OS name which indicate the simplified linux kernel. + +| Triplet Name | Architecture | System Kernel | System | +| ---------------------- | ------------ | ------------- | --------------- | +| arm-liteos-ohos | ARM 32bits | LiteOS | Small system | +| arm-linux-ohos | ARM 32bits | Linux | Small system | +| arm-linux-ohos | ARM 32bits | Linux | Standard system | +| aarch64-linux-ohos | ARM 64bits | Linux | Standard system | + +For detailed definition of Small System and Standard System, please refer to [System Types](https://gitee.com/openharmony/docs/blob/master/en/device-dev/Readme-EN.md). + +### Specify the triplet + +To build images for different types of platform, you can configure the triplet in the build scripts by setting "--target=xxx" using cflags, xxx should be replaced with a specific triplet name. diff --git a/llvm-build/utils/logging.sh b/llvm-build/utils/logging.sh new file mode 100755 index 0000000000000000000000000000000000000000..6ac918acb7aaf39ed2d0792200ba0eeae81b22eb --- /dev/null +++ b/llvm-build/utils/logging.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# +# Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved. +# + +function error() { + echo "E: ${@}" >&2 +} + +function info() { + echo "I: ${@}" >&2 +} diff --git a/llvm-build/utils/remote_interfaces/i_adb.sh b/llvm-build/utils/remote_interfaces/i_adb.sh new file mode 100644 index 0000000000000000000000000000000000000000..1922e4344f78bdb2e73f043de5387fc18210a994 --- /dev/null +++ b/llvm-build/utils/remote_interfaces/i_adb.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# +# Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved. +# + +source "$(dirname $0)/logging.sh" + +function remote_shell() { + info "executing on device: ${@}" + adb shell ${@} +} + +function remote_pull() { + # pull with filter progress information + local host="$(echo $@ | awk '{print $NF}')" + local remote="${@:1:$#-1}" + info "pulling files: ${remote}" + info "to: ${host}" + adb pull "${remote}" "${host}" 2>&1 | grep -v '\[\(1\| \)\([0-9]\| \)[0-9]%\]' +} + +function remote_push() { + # push with filter progress information + local remote="$(echo $@ | awk '{print $NF}')" + local host="${@:1:$#-1}" + info "pushing files: ${host}" + info "to: ${remote}" + adb push ${host} ${remote} 2>&1 | grep -v '\[\(1\| \)\([0-9]\| \)[0-9]%\]' +} diff --git a/llvm-build/utils/remote_interfaces/i_hdc.sh b/llvm-build/utils/remote_interfaces/i_hdc.sh new file mode 100644 index 0000000000000000000000000000000000000000..e779a54063244426ca05de32b4fc3f87ccbc413e --- /dev/null +++ b/llvm-build/utils/remote_interfaces/i_hdc.sh @@ -0,0 +1,74 @@ +#!/bin/bash +# +# Copyright (c) Huawei Technologies Co., Ltd. 2024. All rights reserved. +# + +cmd_tool="hdc" + +source "$(dirname $0)/logging.sh" + +function get_cmd_prefix() { + cmd_prefix="${cmd_tool}" + if [[ ! -z "${HDC_SERVER_SOCKET:-}" ]]; then + cmd_prefix="${cmd_prefix} -s ${HDC_SERVER_SOCKET}" + fi + if [[ ! -z "${HDC_DEVICE_SERIAL:-}" ]]; then + cmd_prefix="${cmd_prefix} -t ${HDC_DEVICE_SERIAL}" + fi +} + +function sync_files_mode() { + + function sync_file() { + local local_file="${1}" + local remote_file="${2}" + local local_mode="$(stat -c "%a" "${local_file}")" + remote_shell chmod "${local_mode}" "${remote_file}" + } + + local remote="${1}" + local host="${2}" + + get_cmd_prefix + + remote_type="$(remote_shell file "${remote}" | cut -f2 -d' ')" + + if [[ "${remote_type}" == "directory" && ! -d "${host}" ]]; then + for f in ${host}; do + sync_file "${f}" "${remote}/$(basename "${f}")" + done + else + sync_file "${host}" "${remote}" + fi + +} + +function remote_shell() { + info "executing on device: ${@}" + get_cmd_prefix + # sed: remove only trailing \r and \n symbols + $cmd_prefix shell ${@} | sed "s/\([\r\n]*\)$//" +} + +function remote_pull() { + # pull with filter progress information + local host="$(echo $@ | awk '{print $NF}')" + local remote="${@:1:$#-1}" + info "pulling files: ${remote}" + info "to: ${host}" + get_cmd_prefix + $cmd_prefix file recv ${remote} ${host} 2>&1 | grep -v '\[\(1\| \)\([0-9]\| \)[0-9]%\]' +} + +function remote_push() { + # push with filter progress information + local remote="$(echo $@ | awk '{print $NF}')" + local host="${@:1:$#-1}" + info "pushing files: ${host}" + info "to: ${remote}" + get_cmd_prefix + $cmd_prefix file send ${host} ${remote} 2>&1 | grep -v '\[\(1\| \)\([0-9]\| \)[0-9]%\]' + + sync_files_mode "${remote}" "${host}" + +} diff --git a/llvm-build/utils/remote_interfaces/i_ssh.sh b/llvm-build/utils/remote_interfaces/i_ssh.sh new file mode 100644 index 0000000000000000000000000000000000000000..72d9a038649543df0f2cf3a59b0a9c820150874f --- /dev/null +++ b/llvm-build/utils/remote_interfaces/i_ssh.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# +# Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved. +# + +source "$(dirname $0)/logging.sh" + +function check_ssh_env() { + msg="" + [ -n "${SSH_USER}" ] || msg+="SSH_USER not set; " + [ -n "${SSH_PORT}" ] || msg+="SSH_PORT not set; " + [ -n "${SSH_HOST}" ] || msg+="SSH_HOST not set; " + if [ -n "${msg}" ]; then + error "${msg}" + exit 1 + fi +} + +function remote_shell() { + check_ssh_env + info "executing on device: $@" + ssh -o "StrictHostKeyChecking no" -q -l ${SSH_USER} -p ${SSH_PORT} ${SSH_HOST} $@ +} + +function remote_pull() { + check_ssh_env + local host="$(echo $@ | awk '{print $NF}')" + local remote="$(echo ${@:1:$#-1} | sed -E "s/([^ ]+)/${SSH_USER}@${SSH_HOST}:\1/g")" + info "pulling files: ${remote}" + info "to: ${host}" + scp -o "StrictHostKeyChecking no" -r -q -P ${SSH_PORT} ${remote} ${host} +} + +function remote_push() { + # check_ssh_env - will be checked in remote_shell + local remote="$(echo $@ | awk '{print $NF}')" + local host="${@:1:$#-1}" + remote_shell "mkdir -p $(dirname ${remote})" + info "pushing files: ${host}" + info "to: ${remote}" + scp -o "StrictHostKeyChecking no" -r -q -P ${SSH_PORT} ${host} ${SSH_USER}@${SSH_HOST}:${remote} +} diff --git a/llvm-build/utils/rununder.sh b/llvm-build/utils/rununder.sh new file mode 100755 index 0000000000000000000000000000000000000000..870403444ed1aa6e482b97e8c0cb061c16f07778 --- /dev/null +++ b/llvm-build/utils/rununder.sh @@ -0,0 +1,492 @@ +#!/usr/bin/env bash +# +# Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. +# +# turn some bugs into errors +set -o errexit -o pipefail -o noclobber -o nounset + +source "$(dirname $0)/logging.sh" + +# The following code need to separate test binary and its argumetns with '--' +# The similar solution as was before in 'cmake/modules/TestFile.cmake', +# but now inside rununer.sh (previous solution broke lit 'RUN' generation logic) +script_args= +for (( i=$#;i>0;i-- ));do + if [ "${!i:0:1}" = "/" ] && [ "${!i}" != "/dev/null" ]; then + if file "${!i}" | grep -q 'ARM'; then + # separate test binary args: + script_args="\"${!i}\" -- ${script_args}" + continue + fi + fi + script_args="\"${!i}\" ${script_args}" +done +eval set -- ${script_args} + +OPTIONS="dfo:vr:e:a:i" +LONGOPTS="help,redirect-output:,redirect-stdout:,redirect-input:,add-path:\ +,ld-lib-path:,device-tmp:,device-serial:,isolate-cmd:\ +,adb-client:,hdc-client:,cache-builder:,host-tmp:,rununderdebug,chdir:,summary:\ +,connection:,ssh-user:,ssh-host:,ssh-port:,extra-data:,extra-link:,extra-directory:" + +# -regarding ! and PIPESTATUS see above +# -temporarily store output to be able to check for errors +# -activate quoting/enhanced mode (e.g. by writing out “--options”) +# -pass arguments only via -- "$@" to separate them correctly +! PARSED=$(getopt --options=${OPTIONS} \ + --longoptions=${LONGOPTS} --name "${0}" -- "$@") +if [[ ${PIPESTATUS[0]} -ne 0 ]]; then + # return value is 1 - getopt has complained about wrong arguments to stdout + exit 2 +fi + +eval set -- "${PARSED}" + +# Default values for parameters +redirect_output= +redirect_stdout= +redirect_input="/dev/null" +chdir= +summary= +prog_to_test=n +DEVICE_TMP="/data/local/tmp" +EXPORT_LD_LIBRARY_PATH= +EXPORT_PATH= +ISOLATE_CMD= +RUNUNDERDEBUG="${RUNUNDERDEBUG-}" # get value from env variable(if any) +CACHE_BUILDER="${CACHE_BUILDER-}" # get value from env variable(if any) +SANDBOX_BUILD_DIR= +CONNECTION_TYPE= +SSH_USER= +SSH_HOST= +SSH_PORT= +ADB_SERVER_SOCKET= +HDC_SERVER_SOCKET= +device_serial= +extra_data= +extra_links= +extra_dirs= + +function usage() { + cat << EOF +Usage: ${0} +Run tests on remote device. + +Example of running a test on OHOS device: +./rununder.sh --connection=HDC --hdc-client="127.0.0.1:8710" --device-serial=XXXX1234 ./a.out + +Common options: + --connection HDC|ADB|SSH Specify connection type + --ssh-user Specify ssh connection username + --ssh-host Specify ssh ip to connect + --ssh-port Specify ssh port to connect + --adb-client Set env variable ADB_SERVER_SOCKET for the + ADB connection. + For example, --adb-client="tcp:10.122.9.11:5037" + --hdc-client Set env variable HDC_SERVER_SOCKET for the + HDC connection. + For example, --hdc-client="127.0.0.1:5039" + --device-serial Set env variable ANDROID_SERIAL for the ADB + connection. + Set env variable HDC_DEVICE_SERIAL for the HDC + connection. + For example, --device-serial= + "a-provider.devops-b.huawei.com:23077" + --device-tmp Specify path for test directory location on the + remote device. Default: ${DEVICE_TMP} + --add-path Add specified path to the PATH variable. + --ld-lib-path Add PATH to the LD_LIBRARY_PATH variable. + --cache-builder Binary cache builder or its wrapper. + --rununderdebug Make output more verbose. + --sandbox-build-dir Path to the host build directory for the tests. + It allows to use the same directories structure + on the remote device. + --extra-data Extra directories/files to be pushed with the test + --extra-link : Pair of link/target separated with `:` to be + created on the remote device + --extra-directory Create remote directory on converted + --help Show this message. +Run options: + --isolate-cmd Command to run something on the isolated cores. +timeit options: + --redirect-output Redirect stdout and stderr for the target to + PATH. + --redirect-input Redirect stdin for the target to PATH. + Default: ${redirect_input} + --summary Write monitored process summary (exit code and + time) to PATH. +EOF +} + +# Processing parameters +while true; do + case "${1}" in + --adb-client) + # Setup connection for adb command using + # env variable, i.e. export ADB_SERVER_SOCKET="tcp:10.122.9.11:5037" + export ADB_SERVER_SOCKET=${2} + shift 2 ;; + --hdc-client) + # Setup connection for hdc command using + # env variable, i.e. export HDC_SERVER_SOCKET="127.0.0.1:5039" + export HDC_SERVER_SOCKET=${2} + shift 2 ;; + --rununderdebug) + RUNUNDERDEBUG=1 + shift 1 ;; + --cache-builder) + CACHE_BUILDER=${2} + shift 2 ;; + --add-path) + EXPORT_PATH="PATH=${2}:\${PATH}" + shift 2 ;; + --ld-lib-path) + EXPORT_LD_LIBRARY_PATH="${EXPORT_LD_LIBRARY_PATH}:${2}" + shift 2 ;; + --device-tmp) + DEVICE_TMP="${2}" + shift 2 ;; + --isolate-cmd) + ISOLATE_CMD="${2}" + shift 2 ;; + --sandbox-build-dir) + SANDBOX_BUILD_DIR="${2}" + shift 2 ;; + --device-serial) + device_serial=${2} + shift 2 ;; + --do-not-push-clean-files) + DO_NOT_PUSH_AND_CLEAN_BINARIES=1 + shift ;; + --redirect-output) + redirect_output="${2}" + shift 2 ;; + --redirect-stdout) + redirect_stdout="${2}" + shift 2 ;; + --redirect-input) + redirect_input="${2}" + shift 2 ;; + --chdir) + chdir="${2}" + cd "${chdir}" + shift 2 ;; + --summary) + summary="${2}" + shift 2 ;; + --connection) + CONNECTION_TYPE="${2}" + shift 2;; + --ssh-user) + SSH_USER="${2}" + shift 2;; + --ssh-host) + SSH_HOST="${2}" + shift 2;; + --ssh-port) + SSH_PORT="${2}" + shift 2;; + --extra-data) + extra_data="${extra_data} ${2}" + shift 2;; + --extra-link) + extra_links="${extra_links} ${2}" + shift 2;; + --extra-directory) + extra_dirs="${extra_dirs} ${2}" + shift 2;; + --help) + usage + exit 0 ;; + --) + shift + break ;; + *) + error "Parameter ${1} cannot be parsed." + usage + exit 1 ;; + esac +done + +if [[ "${SANDBOX_BUILD_DIR}" && "${SANDBOX_BUILD_DIR}" != /* ]]; then + error "SANDBOX_BUILD_DIR should be absolute path, got: ${SANDBOX_BUILD_DIR}" + exit 1 +fi + +if [[ "${CONNECTION_TYPE}" == "HDC" && ! ( "${HDC_SERVER_SOCKET}" && "${device_serial}" ) ]] || + [[ "${CONNECTION_TYPE}" == "ADB" && ! ( "${ADB_SERVER_SOCKET}" && "${device_serial}" ) ]] || + [[ "${CONNECTION_TYPE}" == "SSH" && ! ( "${SSH_USER}" && "${SSH_HOST}" && "${SSH_PORT}" ) ]]; then + error "wrong connection type, or wrong connection type parameters!" + error "CONNECTION_TYPE=${CONNECTION_TYPE}" + error "SSH_USER=${SSH_USER}" + error "SSH_HOST=${SSH_HOST}" + error "SSH_PORT=${SSH_PORT}" + error "ADB_SERVER_SOCKET=${ADB_SERVER_SOCKET}" + error "HDC_SERVER_SOCKET=${HDC_SERVER_SOCKET}" + error "DEVICE_SERIAL=${device_serial}" + exit 1 +fi + +THIS_DIR="$(dirname $0)" +if [[ "${CONNECTION_TYPE}" == "ADB" ]]; then + export ANDROID_SERIAL="${device_serial}" + source ${THIS_DIR}/remote_interfaces/i_adb.sh +elif [[ "${CONNECTION_TYPE}" == "SSH" ]]; then + source ${THIS_DIR}/remote_interfaces/i_ssh.sh +elif [[ "${CONNECTION_TYPE}" == "HDC" ]]; then + export HDC_DEVICE_SERIAL="${device_serial}" + source ${THIS_DIR}/remote_interfaces/i_hdc.sh +fi + +function dbg_cat_file() { + if [[ ${RUNUNDERDEBUG} -eq 1 || ${2-} -ne 0 ]]; then + ls -l ${1} + info "********************Content of ${1}********************" + if ! file -L --mime "${1}" | grep -q "binary"; then + cat_whole_if_less_than_ln_cnt=200 + if [[ $(wc -l < "${1}") -le ${cat_whole_if_less_than_ln_cnt} ]]; then + cat "${1}" + else + # cat head and tail + txt_ln_cnt=15 + (set -x; head -n ${txt_ln_cnt} "${1}") + (set -x; tail -n ${txt_ln_cnt} "${1}") + fi + else + if which xxd 1>/dev/null; then + bin_ln_cnt=64 + xxd "${1}" | head -n ${bin_ln_cnt} + xxd "${1}" | tail -n ${bin_ln_cnt} + else + info "<--binary file content(xxd utility was not found)-->" + fi + fi + info "***********************************************************" + fi +} + +function convert_host_path_to_remote() { + remote_path_converted="${1}" + no_check="${2-}" + if [[ "${SANDBOX_BUILD_DIR}" ]]; then + if [[ ! "${1}" =~ ${SANDBOX_BUILD_DIR} && -z "${no_check}" ]]; then + error "The host path not located under SANDBOX_BUILD_DIR" + error "Host path(${1}) vs SANDBOX_BUILD_DIR(${SANDBOX_BUILD_DIR})" + exit 1 + fi + # replace host sandbox build dir on DEVICE_TMP + remote_path_converted="${DEVICE_TMP}/${1##${SANDBOX_BUILD_DIR}/}" + else + # old fashion one level directory structure + remote_path_converted="${DEVICE_TMP}/${$}/${1##*/}" + fi +} + +function make_remote_link() ( + # Note: we expect, that if link `l` point to local file `f`, + # then `f` will be present on the remote device + # on the `remote_path_converted` path. + + target="${1?"link target not set!"}" + link="${2?"link path not set!"}" + convert_host_path_to_remote "${target}" "nocheck" + target_remote="${remote_path_converted}" + convert_host_path_to_remote "${link}" "nocheck" + link_remote="${remote_path_converted}" + remote_shell "ln -s ${target_remote} ${link_remote}" +) + +# push executable file and corresponding resources +function push_prog_data() { + prog_to_test="${1}" + shift 1 + prog_args="$@" + + # declare test_dir, test_remote_dir; create remote working directory + test_dir=$(dirname "${prog_to_test}") # full path + + convert_host_path_to_remote "${test_dir}" + test_remote_dir="${remote_path_converted}" + if [[ "${DO_NOT_PUSH_AND_CLEAN_BINARIES-}" ]]; then + # expect that same directory structure as in sandbox already present + # on device, test_remote_dir point on it, so just return here + return + fi + + need_output_dir= + if [[ -d "${test_dir}/Output" ]]; then + need_output_dir="Output" + fi + remote_shell "mkdir -p ${test_remote_dir}/${need_output_dir}" + remote_push "${prog_to_test}" "${test_remote_dir}/" + + # parse all args and push if any + for arg in ${prog_args}; do + if [[ "${arg}" == "." ]]; then + continue + fi + if [[ -e "${test_dir}/${arg}" ]]; then + remote_push "${test_dir}/${arg}" "${test_remote_dir}/${arg}" + fi + done + + # create extra directories + for directory in ${extra_dirs}; do + convert_host_path_to_remote "${directory}" "nocheck" + remote_shell "mkdir -p ${remote_path_converted}" + done + + # push all extra files + for data in ${extra_data}; do + + all_files="$(find "${data}" -type f)" + for file in ${all_files}; do + convert_host_path_to_remote "${file}" "nocheck" + remote_push "${file}" "${remote_path_converted}" + done + + all_links="$(find "${data}" -type l)" + for link in ${all_links}; do + real_path="$(realpath "${link}")" + make_remote_link "${real_path}" "${link}" + done + + done + + # create extra links + for target_link in ${extra_links}; do + target="$(echo "${target_link}" | cut -d: -f1)" + link="$(echo "${target_link}" | cut -d: -f2)" + make_remote_link "${target}" "${link}" + done +} + +function remote_clean_up() { + if [[ "${SANDBOX_BUILD_DIR}" || "${DO_NOT_PUSH_AND_CLEAN_BINARIES-}" ]] + then + # do not delete in case of SANDBOX_BUILD_DIR because some other tests + # can be in that dir - LNT should delete whole tmp directory at the end + return + fi + one_str="${@}" + remote_shell "rm -rf ${one_str}" +} + +function check_wrapper_file_on_device() { + if [[ "${DO_NOT_PUSH_AND_CLEAN_BINARIES-}" ]]; then + return + fi + # check present, print exit code (remote hdc/adb run may not return + # exit code) + if [[ $(remote_shell 'test -f '"${2}"'; echo $?') -eq 1 ]]; then + # there is no wrapper file on device yet -> push it + remote_push "${1}" "${2}" + remote_shell "chmod +x ${2}" + fi +} + +function device_shell_in_dir() { + local cmd= + if [[ ${2} ]]; then + cmd="cd ${2} && " + fi + + cmd+="${1:?Command is not specified}" + remote_shell "${cmd}" +} + +function run_on_device_wrapper() { + device_shell_in_dir "${ISOLATE_CMD} ${1}" "${2}" +} + +tmp= +for path in $(echo "${EXPORT_LD_LIBRARY_PATH}" | tr ':' ' '); do + if [[ ! "${path}" =~ "${DEVICE_TMP}" ]]; then + convert_host_path_to_remote "${path}" + path="${remote_path_converted}" + fi + tmp="${tmp}:${path}" +done +EXPORT_LD_LIBRARY_PATH="LD_LIBRARY_PATH=${tmp}" + +if [[ ${RUNUNDERDEBUG} -eq 1 ]]; then + info "rununder: CONNECTION_TYPE : ${CONNECTION_TYPE}" + info "rununder: SSH_USER : ${SSH_USER}" + info "rununder: SSH_HOST : ${SSH_HOST}" + info "rununder: SSH_PORT : ${SSH_PORT}" + info "rununder: DEVICE TMP : ${DEVICE_TMP}" + info "rununder: CACHE_BUILDER : ${CACHE_BUILDER}" + info "rununder: ADB CLIENT : ${ADB_SERVER_SOCKET}" + info "rununder: HDC CLIENT : ${HDC_SERVER_SOCKET}" + info "rununder: LD_PATH : ${EXPORT_LD_LIBRARY_PATH}" + info "rununder: ENV VARS:" + set +fi + +function run_on_device() { + prog_to_test="$(realpath ${1})" + shift 1 + prog_args="$@" + + push_prog_data "${prog_to_test}" "${prog_args}" + prog_to_test_on_device="${test_remote_dir}/$(basename ${prog_to_test})" + + cmd_input_redirect="" + if [[ "${redirect_input}" != "/dev/null" ]]; then + convert_host_path_to_remote "${redirect_input}" + redirect_input_remote="${remote_path_converted}" + remote_push "${redirect_input}" "${redirect_input_remote}" + cmd_input_redirect=" < ${redirect_input_remote} " + fi + cmd_output_redirect="" + if [[ "${redirect_output}" ]]; then + convert_host_path_to_remote "${redirect_output}" + redirect_output_remote="${remote_path_converted}" + cmd_output_redirect="> ${redirect_output_remote} 2>&1 " + fi + cmd_stdout_redirect="" + if [[ "${redirect_stdout}" ]]; then + convert_host_path_to_remote "${redirect_stdout}" + redirect_stdout_remote="${remote_path_converted}" + cmd_stdout_redirect="> ${redirect_stdout_remote} " + fi + cmd_summary="" + if [[ "${summary}" ]]; then + convert_host_path_to_remote "${summary}" + summary_remote="${remote_path_converted}" + cmd_summary="; echo $? >${summary_remote} " + fi + cmd_chdir="" + if [[ "${chdir}" ]]; then + convert_host_path_to_remote "${chdir}" + chdir_remote=${remote_path_converted} + cmd_chdir="cd ${chdir_remote} && " + fi + + cmd_str="${cmd_chdir}" + cmd_str+="env ${EXPORT_LD_LIBRARY_PATH} ${EXPORT_PATH} " + cmd_str+="${prog_to_test_on_device} ${prog_args}" + cmd_str+="${cmd_input_redirect} ${cmd_output_redirect} ${cmd_stdout_redirect}" + cmd_str+="${cmd_summary}" + + info "${cmd_str}" + run_on_device_wrapper "${cmd_str}" "${test_remote_dir}" + + if [[ "${summary}" ]]; then + remote_pull "${summary_remote}" "${summary}" + dbg_cat_file "${summary}" + fi + if [[ "${redirect_output}" ]]; then + rm -f "${redirect_output}" + remote_pull "${redirect_output_remote}" "${redirect_output}" + dbg_cat_file "${redirect_output}" + fi + if [[ "${redirect_stdout}" ]]; then + rm -f "${redirect_stdout}" + remote_pull "${redirect_stdout_remote}" "${redirect_stdout}" + dbg_cat_file "${redirect_stdout}" + fi + remote_clean_up "${test_remote_dir}" +} + +run_on_device "$@" diff --git a/llvm-build/wrappers/aarch64-unknown-linux-ohos-clang b/llvm-build/wrappers/aarch64-unknown-linux-ohos-clang new file mode 100644 index 0000000000000000000000000000000000000000..f65af6c320b0ca603b47d166a5ed6d190aec00e3 --- /dev/null +++ b/llvm-build/wrappers/aarch64-unknown-linux-ohos-clang @@ -0,0 +1,9 @@ +#!/bin/sh + +SOURCE=$(dirname -- "$( readlink -f -- "$0"; )") + +exec $SOURCE/clang \ + -target aarch64-linux-ohos \ + --sysroot=$SOURCE/../../sysroot \ + -D__MUSL__ \ + "$@" diff --git a/llvm-build/wrappers/aarch64-unknown-linux-ohos-clang++ b/llvm-build/wrappers/aarch64-unknown-linux-ohos-clang++ new file mode 100644 index 0000000000000000000000000000000000000000..1982ffa02f664a029719dfc095a17476847bd9ac --- /dev/null +++ b/llvm-build/wrappers/aarch64-unknown-linux-ohos-clang++ @@ -0,0 +1,9 @@ +#!/bin/sh + +SOURCE=$(dirname -- "$( readlink -f -- "$0"; )") + +exec $SOURCE/clang++ \ + -target aarch64-linux-ohos \ + --sysroot=$SOURCE/../../sysroot \ + -D__MUSL__ \ + "$@" diff --git a/llvm-build/wrappers/armv7-unknown-linux-ohos-clang b/llvm-build/wrappers/armv7-unknown-linux-ohos-clang new file mode 100644 index 0000000000000000000000000000000000000000..b4226f17d8af11ed7f36d349a562d4986d3b6669 --- /dev/null +++ b/llvm-build/wrappers/armv7-unknown-linux-ohos-clang @@ -0,0 +1,13 @@ +#!/bin/sh + +SOURCE=$(dirname -- "$( readlink -f -- "$0"; )") + +exec $SOURCE/clang \ + -target arm-linux-ohos \ + --sysroot=$SOURCE/../../sysroot \ + -D__MUSL__ \ + -march=armv7-a \ + -mfloat-abi=softfp \ + -mtune=generic-armv7-a \ + -mthumb \ + "$@" diff --git a/llvm-build/wrappers/armv7-unknown-linux-ohos-clang++ b/llvm-build/wrappers/armv7-unknown-linux-ohos-clang++ new file mode 100644 index 0000000000000000000000000000000000000000..344646ae79fbcb3cfd4522bc0ef1e372640581b0 --- /dev/null +++ b/llvm-build/wrappers/armv7-unknown-linux-ohos-clang++ @@ -0,0 +1,13 @@ +#!/bin/sh + +SOURCE=$(dirname -- "$( readlink -f -- "$0"; )") + +exec $SOURCE/clang++ \ + -target arm-linux-ohos \ + --sysroot=$SOURCE/../../sysroot \ + -D__MUSL__ \ + -march=armv7-a \ + -mfloat-abi=softfp \ + -mtune=generic-armv7-a \ + -mthumb \ + "$@" diff --git a/llvm-build/wrappers/loongarch64-unknown-linux-ohos-clang b/llvm-build/wrappers/loongarch64-unknown-linux-ohos-clang new file mode 100644 index 0000000000000000000000000000000000000000..6d2e3021aae838bd6c9508b8fce32188252d8598 --- /dev/null +++ b/llvm-build/wrappers/loongarch64-unknown-linux-ohos-clang @@ -0,0 +1,9 @@ +#!/bin/sh + +SOURCE=$(dirname -- "$( readlink -f -- "$0"; )") + +exec $SOURCE/clang \ + -target loongarch64-linux-ohos \ + --sysroot=$SOURCE/../../sysroot \ + -D__MUSL__ \ + "$@" diff --git a/llvm-build/wrappers/loongarch64-unknown-linux-ohos-clang++ b/llvm-build/wrappers/loongarch64-unknown-linux-ohos-clang++ new file mode 100644 index 0000000000000000000000000000000000000000..a10739dbccf64a560479b4c2d15cead45c912e35 --- /dev/null +++ b/llvm-build/wrappers/loongarch64-unknown-linux-ohos-clang++ @@ -0,0 +1,9 @@ +#!/bin/sh + +SOURCE=$(dirname -- "$( readlink -f -- "$0"; )") + +exec $SOURCE/clang++ \ + -target loongarch64-linux-ohos \ + --sysroot=$SOURCE/../../sysroot \ + -D__MUSL__ \ + "$@" diff --git a/llvm-build/wrappers/x86_64-unknown-linux-ohos-clang b/llvm-build/wrappers/x86_64-unknown-linux-ohos-clang new file mode 100644 index 0000000000000000000000000000000000000000..bc2f1d1ef52f0cb0704726794c197ad7b23c155b --- /dev/null +++ b/llvm-build/wrappers/x86_64-unknown-linux-ohos-clang @@ -0,0 +1,9 @@ +#!/bin/sh + +SOURCE=$(dirname -- "$( readlink -f -- "$0"; )") + +exec $SOURCE/clang \ + -target x86_64-linux-ohos \ + --sysroot=$SOURCE/../../sysroot \ + -D__MUSL__ \ + "$@" diff --git a/llvm-build/wrappers/x86_64-unknown-linux-ohos-clang++ b/llvm-build/wrappers/x86_64-unknown-linux-ohos-clang++ new file mode 100644 index 0000000000000000000000000000000000000000..5876ba547ad36df8e8b7e1b099c6ceaf2af84e47 --- /dev/null +++ b/llvm-build/wrappers/x86_64-unknown-linux-ohos-clang++ @@ -0,0 +1,9 @@ +#!/bin/sh + +SOURCE=$(dirname -- "$( readlink -f -- "$0"; )") + +exec $SOURCE/clang++ \ + -target x86_64-linux-ohos \ + --sysroot=$SOURCE/../../sysroot \ + -D__MUSL__ \ + "$@" diff --git a/llvm_products/config.json b/llvm_products/config.json new file mode 100644 index 0000000000000000000000000000000000000000..3d5e8dbb4a69eca2c287fa6d17098831498a903c --- /dev/null +++ b/llvm_products/config.json @@ -0,0 +1,13 @@ +{ + "product_name": "", + "ohos_version": "OpenHarmony 1.0", + "version": "3.0", + "type": "small", + "device_company": "ohos", + "board": "", + "kernel_type": "liteos_a", + "kernel_version": "3.0.0", + "subsystems": [], + "third_party_dir": "//third_party", + "product_adapter_dir": "" +} \ No newline at end of file diff --git a/llvm_products/llvm_build.json b/llvm_products/llvm_build.json new file mode 100644 index 0000000000000000000000000000000000000000..a5a7061492af37d0e59563ebdee16f1dd51e777f --- /dev/null +++ b/llvm_products/llvm_build.json @@ -0,0 +1,28 @@ +{ + "product_name": "llvm_build", + "device_company": "ohos", + "target_cpu": "arm", + "board": "llvm_build", + "type": "standard", + "version": "3.0", + "subsystems": [ + { + "subsystem": "thirdparty", + "components": [ + { + "component": "musl", + "features": [] + } + ] + }, + { + "subsystem": "llvmproject", + "components": [ + { + "component": "llvm-project", + "features": [] + } + ] + } + ] +} diff --git a/llvm_products/llvm_build_lite.json b/llvm_products/llvm_build_lite.json new file mode 100644 index 0000000000000000000000000000000000000000..d39f979021d7e7d4f53945d7e162e807fdf6d3f0 --- /dev/null +++ b/llvm_products/llvm_build_lite.json @@ -0,0 +1,22 @@ +{ + "product_name": "llvm_build_lite", + "device_company": "ohos", + "target_cpu": "arm", + "board": "llvm_build", + "board_path": "toolchain/llvm-project/board-config", + "type": "small", + "kernel_type": "liteos_a", + "version": "3.0", + "subsystems": [ + { + "subsystem": "thirdparty", + "components": [ + { + "component": "musl", + "features": [] + } + ] + } + ] + } + \ No newline at end of file