Skip to content

Commit

Permalink
Enable parallelism for more dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-fedin authored and john-preston committed Jun 13, 2024
1 parent c49eb70 commit 3f216ad
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions Telegram/build/prepare/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def nativeToolsError():
elif (mac):
environment.update({
'SPECIAL_TARGET': 'mac',
'MAKE_THREADS_CNT': '-j8',
'MAKE_THREADS_CNT': '-j' + str(os.cpu_count()),
'MACOSX_DEPLOYMENT_TARGET': '10.13',
'UNGUARDED': '-Werror=unguarded-availability-new',
'MIN_VER': '-mmacosx-version-min=10.13',
Expand Down Expand Up @@ -435,7 +435,7 @@ def runStages():
stage('patches', """
git clone https://github.com/desktop-app/patches.git
cd patches
git checkout 25f76cf4d5
git checkout c237d12bcd
""")

stage('msys64', """
Expand Down Expand Up @@ -511,9 +511,9 @@ def runStages():
win:
git clone https://github.com/desktop-app/lzma.git
cd lzma\\C\\Util\\LzmaLib
msbuild LzmaLib.sln /property:Configuration=Debug /property:Platform="$X8664"
msbuild -m LzmaLib.sln /property:Configuration=Debug /property:Platform="$X8664"
release:
msbuild LzmaLib.sln /property:Configuration=Release /property:Platform="$X8664"
msbuild -m LzmaLib.sln /property:Configuration=Release /property:Platform="$X8664"
""")

stage('xz', """
Expand All @@ -540,9 +540,9 @@ def runStages():
-DCMAKE_C_FLAGS_DEBUG="/MTd /Zi /Ob0 /Od /RTC1" ^
-DCMAKE_C_FLAGS_RELEASE="/MT /O2 /Ob2 /DNDEBUG" ^
-DCMAKE_C_FLAGS="/DZLIB_WINAPI"
cmake --build . --config Debug
cmake --build . --config Debug --parallel
release:
cmake --build . --config Release
cmake --build . --config Release --parallel
mac:
CFLAGS="$MIN_VER $UNGUARDED" LDFLAGS="$MIN_VER" ./configure \\
--static \\
Expand All @@ -560,9 +560,9 @@ def runStages():
-A %WIN32X64% ^
-DWITH_JPEG8=ON ^
-DPNG_SUPPORTED=OFF
cmake --build . --config Debug
cmake --build . --config Debug --parallel
release:
cmake --build . --config Release
cmake --build . --config Release --parallel
mac:
CFLAGS="-arch arm64" cmake -B build.arm64 . \\
-D CMAKE_SYSTEM_NAME=Darwin \\
Expand Down Expand Up @@ -643,8 +643,8 @@ def runStages():
-DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded$<$<CONFIG:Debug>:Debug>" ^
-DCMAKE_C_FLAGS_DEBUG="/MTd /Zi /Ob0 /Od /RTC1" ^
-DCMAKE_C_FLAGS_RELEASE="/MT /O2 /Ob2 /DNDEBUG"
cmake --build out --config Debug
cmake --build out --config Release
cmake --build out --config Debug --parallel
cmake --build out --config Release --parallel
cmake --install out --config Release
mac:
CFLAGS="$UNGUARDED" CPPFLAGS="$UNGUARDED" cmake -B build . \\
Expand All @@ -663,9 +663,9 @@ def runStages():
cd out
win:
cmake -A %WIN32X64% ..
cmake --build . --config Debug
cmake --build . --config Debug --parallel
release:
cmake --build . --config Release
cmake --build . --config Release --parallel
!win:
mkdir Debug
cd Debug
Expand Down Expand Up @@ -780,10 +780,10 @@ def runStages():
-DBUILD_SHARED_LIBS=OFF ^
-DAVIF_ENABLE_WERROR=OFF ^
-DAVIF_CODEC_DAV1D=ON
cmake --build . --config Debug
cmake --build . --config Debug --parallel
cmake --install . --config Debug
release:
cmake --build . --config Release
cmake --build . --config Release --parallel
cmake --install . --config Release
mac:
cmake . \\
Expand Down Expand Up @@ -816,10 +816,10 @@ def runStages():
-DBUILD_SHARED_LIBS=OFF ^
-DENABLE_DECODER=OFF ^
-DENABLE_ENCODER=OFF
cmake --build . --config Debug
cmake --build . --config Debug --parallel
cmake --install . --config Debug
release:
cmake --build . --config Release
cmake --build . --config Release --parallel
cmake --install . --config Release
mac:
cmake . \\
Expand Down Expand Up @@ -898,10 +898,10 @@ def runStages():
-DWITH_RAV1E=OFF ^
-DWITH_RAV1E_PLUGIN=OFF ^
-DWITH_EXAMPLES=OFF
cmake --build . --config Debug
cmake --build . --config Debug --parallel
cmake --install . --config Debug
release:
cmake --build . --config Release
cmake --build . --config Release --parallel
cmake --install . --config Release
mac:
cmake . \\
Expand Down Expand Up @@ -964,10 +964,10 @@ def runStages():
-DCMAKE_C_FLAGS_RELEASE="/MT /O2 /Ob2 /DNDEBUG" ^
-DCMAKE_CXX_FLAGS_RELEASE="/MT /O2 /Ob2 /DNDEBUG" ^
%cmake_defines%
cmake --build . --config Debug
cmake --build . --config Debug --parallel
cmake --install . --config Debug
release:
cmake --build . --config Release
cmake --build . --config Release --parallel
cmake --install . --config Release
mac:
cmake . \\
Expand Down Expand Up @@ -1322,7 +1322,7 @@ def runStages():
ninja -C out/Release%FolderPostfix% common crash_generation_client exception_handler
cd tools\\windows\\dump_syms
gyp dump_syms.gyp --format=msvs
msbuild dump_syms.vcxproj /property:Configuration=Release /property:Platform="x64"
msbuild -m dump_syms.vcxproj /property:Configuration=Release /property:Platform="x64"
win:
deactivate
mac:
Expand Down

0 comments on commit 3f216ad

Please sign in to comment.