mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-05 19:28:46 +02:00
Cleanup
This commit is contained in:
parent
504cb1d596
commit
d5a6cb86d2
141 changed files with 7 additions and 12905 deletions
211
third-party/libx264/BUILD
vendored
211
third-party/libx264/BUILD
vendored
|
|
@ -1,211 +0,0 @@
|
|||
|
||||
headers = [
|
||||
"x264.h",
|
||||
"x264_config.h",
|
||||
]
|
||||
|
||||
libs = [
|
||||
"x264",
|
||||
]
|
||||
|
||||
filegroup(
|
||||
name = "libx264_sources",
|
||||
srcs = glob([
|
||||
"x264/**/*"
|
||||
], exclude = [
|
||||
"x264/.git/**/*"
|
||||
]),
|
||||
)
|
||||
|
||||
|
||||
genrule(
|
||||
name = "lib264_build",
|
||||
srcs = [
|
||||
"build-libx264-bazel.sh",
|
||||
":libx264_sources",
|
||||
],
|
||||
cmd_bash =
|
||||
"""
|
||||
set -ex
|
||||
|
||||
if [ "$(TARGET_CPU)" == "ios_armv7" ]; then
|
||||
BUILD_ARCH="armv7"
|
||||
PLATFORM_HEADER_DIR="armv7-darwin-gcc"
|
||||
elif [ "$(TARGET_CPU)" == "ios_arm64" ]; then
|
||||
BUILD_ARCH="arm64"
|
||||
PLATFORM_HEADER_DIR="arm64-darwin-gcc"
|
||||
elif [ "$(TARGET_CPU)" == "ios_sim_arm64" ]; then
|
||||
BUILD_ARCH="sim_arm64"
|
||||
PLATFORM_HEADER_DIR="arm64-iphonesimulator-gcc"
|
||||
elif [ "$(TARGET_CPU)" == "ios_x86_64" ]; then
|
||||
BUILD_ARCH="x86_64"
|
||||
PLATFORM_HEADER_DIR="x86_64-iphonesimulator-gcc"
|
||||
else
|
||||
echo "Unsupported architecture $(TARGET_CPU)"
|
||||
fi
|
||||
|
||||
BUILD_DIR="$(RULEDIR)/build_$${BUILD_ARCH}"
|
||||
rm -rf "$$BUILD_DIR"
|
||||
mkdir -p "$$BUILD_DIR"
|
||||
|
||||
YASM_DIR="$$BUILD_DIR/yasm"
|
||||
rm -rf "$$YASM_DIR"
|
||||
mkdir -p "$$YASM_DIR"
|
||||
tar -xf "$(location //third-party/yasm:yasm.tar)" -C "$$YASM_DIR"
|
||||
ABS_YASM_DIR="$$(pwd)/$$(dirname $$YASM_DIR)/$$(basename $$YASM_DIR)"
|
||||
|
||||
cp $(location :build-libx264-bazel.sh) "$$BUILD_DIR/"
|
||||
|
||||
SOURCE_PATH="third-party/libx264/x264"
|
||||
|
||||
cp -R "$$SOURCE_PATH" "$$BUILD_DIR/"
|
||||
|
||||
mkdir -p "$$BUILD_DIR/Public/libx264"
|
||||
|
||||
PATH="$$PATH:$$ABS_YASM_DIR" sh $$BUILD_DIR/build-libx264-bazel.sh $$BUILD_ARCH "$$BUILD_DIR/x264" "$$BUILD_DIR"
|
||||
""" +
|
||||
"\n".join([
|
||||
"cp -f \"$$BUILD_DIR/scratch/thin/include/{}\" \"$(location Public/libx264/{})\"".format(header, header) for header in headers
|
||||
]) +
|
||||
"\n" +
|
||||
"\n".join([
|
||||
"cp -f \"$$BUILD_DIR/scratch/thin/lib/lib{}.a\" \"$(location Public/libx264/lib{}.a)\"".format(lib, lib) for lib in libs
|
||||
]) +
|
||||
"\n",
|
||||
outs = ["Public/libx264/" + x for x in headers] +
|
||||
["Public/libx264/lib{}.a".format(x) for x in libs],
|
||||
tools = [
|
||||
"//third-party/yasm:yasm.tar",
|
||||
],
|
||||
visibility = [
|
||||
"//visibility:public",
|
||||
]
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "libx264_lib",
|
||||
srcs = [":Public/libx264/lib" + x + ".a" for x in libs],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "libx264",
|
||||
srcs = [
|
||||
"x264/common/osdep.c",
|
||||
"x264/common/base.c",
|
||||
"x264/common/cpu.c",
|
||||
"x264/common/tables.c",
|
||||
"x264/encoder/api.c",
|
||||
"x264/common/mc.c",
|
||||
"x264/common/predict.c",
|
||||
"x264/common/pixel.c",
|
||||
"x264/common/macroblock.c",
|
||||
"x264/common/frame.c",
|
||||
"x264/common/dct.c",
|
||||
"x264/common/cabac.c",
|
||||
"x264/common/common.c",
|
||||
"x264/common/rectangle.c",
|
||||
"x264/common/set.c",
|
||||
"x264/common/quant.c",
|
||||
"x264/common/deblock.c",
|
||||
"x264/common/vlc.c",
|
||||
"x264/common/mvpred.c",
|
||||
"x264/common/bitstream.c",
|
||||
"x264/encoder/analyse.c",
|
||||
"x264/encoder/me.c",
|
||||
"x264/encoder/ratecontrol.c",
|
||||
"x264/encoder/set.c",
|
||||
"x264/encoder/macroblock.c",
|
||||
"x264/encoder/cabac.c",
|
||||
"x264/encoder/cavlc.c",
|
||||
"x264/encoder/encoder.c",
|
||||
"x264/encoder/lookahead.c",
|
||||
"x264/common/threadpool.c",
|
||||
|
||||
"x264/encoder/analyse.h",
|
||||
"x264/encoder/macroblock.h",
|
||||
"x264/encoder/me.h",
|
||||
"x264/encoder/ratecontrol.h",
|
||||
"x264/encoder/set.h",
|
||||
"x264/common/base.h",
|
||||
"x264/common/osdep.h",
|
||||
"x264/common/cpu.h",
|
||||
"x264/common/tables.h",
|
||||
"x264/common/common.h",
|
||||
"x264/common/cabac.h",
|
||||
"x264/common/bitstream.h",
|
||||
"x264/common/set.h",
|
||||
"x264/common/predict.h",
|
||||
"x264/common/pixel.h",
|
||||
"x264/common/mc.h",
|
||||
"x264/common/frame.h",
|
||||
"x264/common/dct.h",
|
||||
"x264/common/quant.h",
|
||||
"x264/common/threadpool.h",
|
||||
"x264/common/macroblock.h",
|
||||
"x264/common/rectangle.h",
|
||||
"Public/libx264/x264_config.h",
|
||||
"config/config.h",
|
||||
"x264/x264.h",
|
||||
|
||||
"x264/common/aarch64/asm-offsets.h",
|
||||
"x264/common/aarch64/bitstream.h",
|
||||
"x264/common/aarch64/deblock.h",
|
||||
"x264/common/aarch64/dct.h",
|
||||
"x264/common/aarch64/mc.h",
|
||||
"x264/common/aarch64/predict.h",
|
||||
"x264/common/aarch64/quant.h",
|
||||
"x264/common/aarch64/pixel.h",
|
||||
|
||||
"x264/common/aarch64/cabac-a.S",
|
||||
"x264/common/aarch64/dct-a.S",
|
||||
"x264/common/aarch64/deblock-a.S",
|
||||
"x264/common/aarch64/mc-a.S",
|
||||
"x264/common/aarch64/pixel-a.S",
|
||||
"x264/common/aarch64/predict-a.S",
|
||||
"x264/common/aarch64/quant-a.S",
|
||||
"x264/common/aarch64/bitstream-a.S",
|
||||
|
||||
"x264/common/aarch64/asm-offsets.c",
|
||||
"x264/common/aarch64/mc-c.c",
|
||||
"x264/common/aarch64/predict-c.c",
|
||||
],
|
||||
hdrs = [
|
||||
"x264/encoder/rdo.c",
|
||||
"x264/encoder/cavlc.c",
|
||||
"x264/encoder/cabac.c",
|
||||
"x264/encoder/slicetype.c",
|
||||
"x264/common/aarch64/asm.S",
|
||||
],
|
||||
includes = [
|
||||
"Public",
|
||||
],
|
||||
copts = [
|
||||
"-Ithird-party/libx264/x264",
|
||||
"-Ithird-party/libx264/config",
|
||||
"-Ithird-party/libx264/Public/libx264",
|
||||
"-DBIT_DEPTH=8",
|
||||
"-DHIGH_BIT_DEPTH=0",
|
||||
"-DPREFIX",
|
||||
"-Dprivate_prefix=x264_8",
|
||||
],
|
||||
visibility = [
|
||||
"//visibility:public",
|
||||
],
|
||||
)
|
||||
|
||||
objc_library(
|
||||
name = "libx264_old",
|
||||
module_name = "libx264_old",
|
||||
enable_modules = True,
|
||||
hdrs = [":Public/libx264/" + x for x in headers],
|
||||
includes = [
|
||||
"Public",
|
||||
],
|
||||
deps = [
|
||||
":libx264_lib",
|
||||
":libx264_from_source",
|
||||
],
|
||||
visibility = [
|
||||
"//visibility:public",
|
||||
],
|
||||
)
|
||||
1019
third-party/libx264/Public/libx264/x264.h
vendored
1019
third-party/libx264/Public/libx264/x264.h
vendored
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +0,0 @@
|
|||
#define X264_GPL 1
|
||||
#define X264_INTERLACED 1
|
||||
#define X264_BIT_DEPTH 8
|
||||
#define X264_CHROMA_FORMAT 0
|
||||
#define X264_VERSION ""
|
||||
#define X264_POINTVER "0.164.x"
|
||||
89
third-party/libx264/build-libx264-bazel.sh
vendored
89
third-party/libx264/build-libx264-bazel.sh
vendored
|
|
@ -1,89 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
RAW_ARCH="$1"
|
||||
|
||||
SOURCE_DIR=$(echo "$(cd "$(dirname "$2")"; pwd -P)/$(basename "$2")")
|
||||
BUILD_DIR=$(echo "$(cd "$(dirname "$3")"; pwd -P)/$(basename "$3")")
|
||||
|
||||
SCRATCH="$BUILD_DIR/scratch"
|
||||
|
||||
#set -e
|
||||
#devnull='> /dev/null 2>&1'
|
||||
|
||||
DEPLOYMENT_TARGET="13.0"
|
||||
CONFIGURE_FLAGS="--enable-static --enable-pic --disable-cli --bit-depth=8 --disable-opencl"
|
||||
|
||||
echo "building $RAW_ARCH..."
|
||||
mkdir -p "$SCRATCH/$RAW_ARCH"
|
||||
cd "$SCRATCH/$RAW_ARCH"
|
||||
ASFLAGS=
|
||||
|
||||
if [ "$RAW_ARCH" = "i386" -o "$RAW_ARCH" = "x86_64" ]
|
||||
then
|
||||
ARCH="$RAW_ARCH"
|
||||
PLATFORM="iPhoneSimulator"
|
||||
CPU=""
|
||||
CFLAGS="$CFLAGS -mios-simulator-version-min=$DEPLOYMENT_TARGET"
|
||||
HOST="--host=i386-apple-darwin"
|
||||
elif [ "$RAW_ARCH" = "sim_arm64" ]; then
|
||||
ARCH="arm64"
|
||||
PLATFORM="iPhoneSimulator"
|
||||
CFLAGS="$CFLAGS -mios-simulator-version-min=$DEPLOYMENT_TARGET --target=arm64-apple-ios$DEPLOYMENT_TARGET-simulator"
|
||||
HOST="--host=aarch64-apple-darwin"
|
||||
else
|
||||
ARCH="$RAW_ARCH"
|
||||
PLATFORM="iPhoneOS"
|
||||
HOST="--host=aarch64-apple-darwin"
|
||||
XARCH="-arch aarch64"
|
||||
CFLAGS="$CFLAGS -mios-version-min=$DEPLOYMENT_TARGET"
|
||||
ASFLAGS="$CFLAGS"
|
||||
if [ "$RAW_ARCH" = "arm64" ]
|
||||
then
|
||||
EXPORT="GASPP_FIX_XCODE5=1"
|
||||
fi
|
||||
fi
|
||||
|
||||
CFLAGS="-arch $ARCH"
|
||||
|
||||
#if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" -o "$ARCH" = "" ]; then
|
||||
# PLATFORM="iPhoneSimulator"
|
||||
# CPU=
|
||||
# if [ "$ARCH" = "x86_64" ]
|
||||
# then
|
||||
# CFLAGS="$CFLAGS -mios-simulator-version-min=7.0"
|
||||
# HOST=
|
||||
# else
|
||||
# CFLAGS="$CFLAGS -mios-simulator-version-min=5.0"
|
||||
# HOST="--host=i386-apple-darwin"
|
||||
# fi
|
||||
#else
|
||||
# PLATFORM="iPhoneOS"
|
||||
# if [ $ARCH = "arm64" ]
|
||||
# then
|
||||
# HOST="--host=aarch64-apple-darwin"
|
||||
# XARCH="-arch aarch64"
|
||||
# else
|
||||
# HOST="--host=arm-apple-darwin"
|
||||
# XARCH="-arch arm"
|
||||
# fi
|
||||
# CFLAGS="$CFLAGS -fembed-bitcode -mios-version-min=7.0"
|
||||
# ASFLAGS="$CFLAGS"
|
||||
#fi
|
||||
|
||||
XCRUN_SDK=`echo $PLATFORM | tr '[:upper:]' '[:lower:]'`
|
||||
CC="xcrun -sdk $XCRUN_SDK clang"
|
||||
if [ $PLATFORM = "iPhoneOS" ]
|
||||
then
|
||||
export AS="$SOURCE_DIR/tools/gas-preprocessor.pl $XARCH -- $CC"
|
||||
else
|
||||
export -n AS
|
||||
fi
|
||||
CXXFLAGS="$CFLAGS"
|
||||
LDFLAGS="$CFLAGS"
|
||||
|
||||
CC=$CC $SOURCE_DIR/configure $CONFIGURE_FLAGS $HOST --extra-cflags="$CFLAGS" --extra-asflags="$ASFLAGS" --extra-ldflags="$LDFLAGS" --prefix="$SCRATCH/thin" || exit 1
|
||||
|
||||
make -j3 install || exit 1
|
||||
42
third-party/libx264/config/config.h
vendored
42
third-party/libx264/config/config.h
vendored
|
|
@ -1,42 +0,0 @@
|
|||
#define HAVE_AARCH64 1
|
||||
#define HAVE_NEON 1
|
||||
#define ARCH_AARCH64 1
|
||||
#define SYS_MACOSX 1
|
||||
#define STACK_ALIGNMENT 16
|
||||
#define HAVE_POSIXTHREAD 1
|
||||
#define HAVE_THREAD 1
|
||||
#define HAVE_LOG2F 1
|
||||
#define HAVE_STRTOK_R 1
|
||||
#define HAVE_CLOCK_GETTIME 1
|
||||
#define HAVE_MMAP 1
|
||||
#define HAVE_VECTOREXT 1
|
||||
#define fseek fseeko
|
||||
#define ftell ftello
|
||||
#define HAVE_BITDEPTH8 1
|
||||
#define HAVE_GPL 1
|
||||
#define HAVE_INTERLACED 1
|
||||
#define HAVE_MALLOC_H 0
|
||||
#define HAVE_ALTIVEC 0
|
||||
#define HAVE_ALTIVEC_H 0
|
||||
#define HAVE_MMX 0
|
||||
#define HAVE_ARMV6 0
|
||||
#define HAVE_ARMV6T2 0
|
||||
#define HAVE_BEOSTHREAD 0
|
||||
#define HAVE_WIN32THREAD 0
|
||||
#define HAVE_SWSCALE 0
|
||||
#define HAVE_LAVF 0
|
||||
#define HAVE_FFMS 0
|
||||
#define HAVE_GPAC 0
|
||||
#define HAVE_AVS 0
|
||||
#define HAVE_CPU_COUNT 0
|
||||
#define HAVE_OPENCL 0
|
||||
#define HAVE_THP 0
|
||||
#define HAVE_LSMASH 0
|
||||
#define HAVE_X86_INLINE_ASM 0
|
||||
#define HAVE_AS_FUNC 0
|
||||
#define HAVE_INTEL_DISPATCHER 0
|
||||
#define HAVE_MSA 0
|
||||
#define HAVE_WINRT 0
|
||||
#define HAVE_VSX 0
|
||||
#define HAVE_ARM_INLINE_ASM 0
|
||||
#define HAVE_BITDEPTH10 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue