mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-08 19:10:53 +00:00
Build
This commit is contained in:
parent
0d76b4b84c
commit
4412b0c29b
2
Makefile
2
Makefile
@ -57,6 +57,8 @@ endif
|
||||
BAZEL_COMMON_FLAGS=\
|
||||
--announce_rc \
|
||||
--features=swift.use_global_module_cache \
|
||||
--features=swift.split_derived_files_generation \
|
||||
--features=swift.skip_function_bodies_for_derived_files
|
||||
|
||||
BAZEL_DEBUG_FLAGS=\
|
||||
--features=swift.enable_batch_mode \
|
||||
|
@ -1,4 +1,4 @@
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
|
||||
|
||||
http_archive(
|
||||
name = "com_google_protobuf",
|
||||
@ -50,3 +50,9 @@ apple_support_dependencies()
|
||||
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
|
||||
|
||||
bazel_skylib_workspace()
|
||||
|
||||
http_file(
|
||||
name = "cmake_tar_gz",
|
||||
urls = ["https://github.com/Kitware/CMake/releases/download/v3.18.4/cmake-3.18.4-Darwin-x86_64.tar.gz"],
|
||||
sha256 = "9d27049660474cf134ab46fa0e0db771b263313fcb8ba82ee8b2d1a1a62f8f20",
|
||||
)
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit b8755bd2884d6bf651827c30e00bd0ea318e41a2
|
||||
Subproject commit 2583fa0bfd6909e7936da5b30e3547ba13e198dc
|
@ -1 +1 @@
|
||||
Subproject commit d6f9a87d70781e92b95b9344c7d21d921ccc3ae2
|
||||
Subproject commit f3434dcd7e1dd033231143078b8540ae1b754286
|
@ -1 +1 @@
|
||||
Subproject commit 44e8c29afe3baa7f5fc434f4a7e83f7ac786644e
|
||||
Subproject commit dcc52352949d5ccf184f5d202aa5084957b0e103
|
21
third-party/cmake/BUCK
vendored
21
third-party/cmake/BUCK
vendored
@ -1,21 +0,0 @@
|
||||
|
||||
genrule(
|
||||
name = "cmake",
|
||||
srcs = [
|
||||
"cmake-3.16.0.tar.gz",
|
||||
],
|
||||
bash =
|
||||
"""
|
||||
core_count="`sysctl -n hw.logicalcpu`"
|
||||
mkdir -p "$OUT"
|
||||
tar -xzf "$SRCDIR/cmake-3.16.0.tar.gz" --directory "$OUT"
|
||||
pushd "$OUT/cmake-3.16.0"
|
||||
./bootstrap --parallel=$core_count -- -DCMAKE_BUILD_TYPE:STRING=Release
|
||||
make -j $core_count
|
||||
popd
|
||||
""",
|
||||
out = "cmake",
|
||||
visibility = [
|
||||
"PUBLIC",
|
||||
]
|
||||
)
|
32
third-party/cmake/BUILD
vendored
32
third-party/cmake/BUILD
vendored
@ -1,32 +0,0 @@
|
||||
|
||||
genrule(
|
||||
name = "cmake",
|
||||
srcs = [
|
||||
"cmake-3.16.0.tar.gz",
|
||||
],
|
||||
cmd_bash =
|
||||
"""
|
||||
BUILD_DIR="$(RULEDIR)/build"
|
||||
rm -rf "$$BUILD_DIR"
|
||||
mkdir -p "$$BUILD_DIR"
|
||||
tar -xzf "$(location cmake-3.16.0.tar.gz)" --directory "$$BUILD_DIR"
|
||||
|
||||
pushd "$$BUILD_DIR/cmake-3.16.0"
|
||||
|
||||
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
||||
|
||||
core_count="`sysctl -n hw.logicalcpu`"
|
||||
./bootstrap --parallel=$$core_count -- -DCMAKE_BUILD_TYPE:STRING=Release
|
||||
make -j $$core_count
|
||||
|
||||
popd
|
||||
|
||||
tar -cf "$(location cmake.tar)" -C "$$BUILD_DIR/cmake-3.16.0" .
|
||||
""",
|
||||
outs = [
|
||||
"cmake.tar",
|
||||
],
|
||||
visibility = [
|
||||
"//visibility:public",
|
||||
]
|
||||
)
|
BIN
third-party/cmake/cmake-3.16.0.tar.gz
vendored
BIN
third-party/cmake/cmake-3.16.0.tar.gz
vendored
Binary file not shown.
8
third-party/mozjpeg/BUILD
vendored
8
third-party/mozjpeg/BUILD
vendored
@ -22,6 +22,7 @@ genrule(
|
||||
srcs = [
|
||||
"build-mozjpeg-bazel.sh",
|
||||
":mozjpeg_sources",
|
||||
"@cmake_tar_gz//file",
|
||||
],
|
||||
cmd_bash =
|
||||
"""
|
||||
@ -44,7 +45,7 @@ genrule(
|
||||
CMAKE_DIR="$$(pwd)/$$BUILD_DIR/cmake"
|
||||
rm -rf "$$CMAKE_DIR"
|
||||
mkdir -p "$$CMAKE_DIR"
|
||||
tar -xf "$(location //third-party/cmake:cmake.tar)" -C "$$CMAKE_DIR"
|
||||
tar -xzf "$(location @cmake_tar_gz//file)" -C "$$CMAKE_DIR"
|
||||
|
||||
cp $(location :build-mozjpeg-bazel.sh) "$$BUILD_DIR/"
|
||||
|
||||
@ -54,7 +55,7 @@ genrule(
|
||||
|
||||
mkdir -p "$$BUILD_DIR/Public/mozjpeg"
|
||||
|
||||
PATH="$$PATH:$$CMAKE_DIR/bin" sh $$BUILD_DIR/build-mozjpeg-bazel.sh $$BUILD_ARCH "$$BUILD_DIR/mozjpeg" "$$BUILD_DIR"
|
||||
PATH="$$PATH:$$CMAKE_DIR/cmake-3.18.4-Darwin-x86_64/CMake.app/Contents/bin" sh $$BUILD_DIR/build-mozjpeg-bazel.sh $$BUILD_ARCH "$$BUILD_DIR/mozjpeg" "$$BUILD_DIR"
|
||||
""" +
|
||||
"\n".join([
|
||||
"cp -f \"$$BUILD_DIR/mozjpeg/{}\" \"$(location Public/mozjpeg/{})\"".format(header, header) for header in headers
|
||||
@ -67,9 +68,6 @@ genrule(
|
||||
outs = ["Public/mozjpeg/" + x for x in headers] +
|
||||
["Public/mozjpeg/jconfig.h"] +
|
||||
["Public/mozjpeg/lib/lib{}.a".format(x) for x in libs],
|
||||
tools = [
|
||||
"//third-party/cmake:cmake.tar",
|
||||
],
|
||||
visibility = [
|
||||
"//visibility:public",
|
||||
]
|
||||
|
9
third-party/yasm/BUILD
vendored
9
third-party/yasm/BUILD
vendored
@ -1,8 +1,10 @@
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
|
||||
|
||||
genrule(
|
||||
name = "yasm",
|
||||
srcs = [
|
||||
"yasm-1.3.0.tar.gz",
|
||||
"@cmake_tar_gz//file",
|
||||
],
|
||||
cmd_bash =
|
||||
"""
|
||||
@ -15,21 +17,18 @@ set -x
|
||||
CMAKE_DIR="$$(pwd)/$$BUILD_DIR/cmake"
|
||||
rm -rf "$$CMAKE_DIR"
|
||||
mkdir -p "$$CMAKE_DIR"
|
||||
tar -xf "$(location //third-party/cmake:cmake.tar)" -C "$$CMAKE_DIR"
|
||||
tar -xf "$(location @cmake_tar_gz//file)" -C "$$CMAKE_DIR"
|
||||
|
||||
tar -xzf "$(location yasm-1.3.0.tar.gz)" --directory "$$BUILD_DIR"
|
||||
pushd "$$BUILD_DIR/yasm-1.3.0"
|
||||
mkdir build
|
||||
cd build
|
||||
PATH="$$PATH:$$CMAKE_DIR/bin" cmake .. -DYASM_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF
|
||||
PATH="$$PATH:$$CMAKE_DIR/cmake-3.18.4-Darwin-x86_64/CMake.app/Contents/bin" cmake .. -DYASM_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF
|
||||
make -j $$core_count
|
||||
popd
|
||||
|
||||
tar -cf "$(location yasm.tar)" -C "$$BUILD_DIR/yasm-1.3.0/build" .
|
||||
""",
|
||||
tools = [
|
||||
"//third-party/cmake:cmake.tar",
|
||||
],
|
||||
outs = [
|
||||
"yasm.tar",
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user