This commit is contained in:
Ali 2020-02-20 18:08:36 +04:00
parent a75bd17b6c
commit f57d6b6168
8323 changed files with 4359 additions and 56254 deletions

0
third-party/BUILD vendored Normal file
View file

30
third-party/cmake/BUILD vendored Normal file
View file

@ -0,0 +1,30 @@
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"
core_count="`sysctl -n hw.logicalcpu`"
./bootstrap --parallel=$$core_count -- -DCMAKE_BUILD_TYPE:STRING=Release
make -j $$core_count
popd
cp "$$BUILD_DIR/cmake-3.16.0/bin/cmake" "$(location cmake.bin)"
""",
outs = [
"cmake.bin",
],
visibility = [
"//visibility:public",
]
)

36
third-party/yasm/BUILD vendored Normal file
View file

@ -0,0 +1,36 @@
genrule(
name = "yasm",
srcs = [
"yasm-1.3.0.tar.gz",
],
cmd_bash =
"""
core_count="`sysctl -n hw.logicalcpu`"
BUILD_DIR="$(RULEDIR)/build"
rm -rf "$$BUILD_DIR"
mkdir -p "$$BUILD_DIR"
CMAKE_DIR="$$BUILD_DIR/cmake"
mkdir -p "$$CMAKE_DIR"
cp "$(location //third-party/cmake:cmake.bin)" "$$CMAKE_DIR/cmake"
tar -xzf "$(location yasm-1.3.0.tar.gz)" --directory "$$BUILD_DIR"
pushd "$$BUILD_DIR/yasm-1.3.0"
mkdir build
cd build
export PATH=\"$$PATH:$$CMAKE_DIR\"
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.bin",
],
outs = [
"yasm.tar",
],
visibility = [
"//visibility:public",
]
)