Resource package for cronet
Accoding to https://chromiumdash.appspot.com/releases, major verion of 86 is the best choice of recent stable releases
https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md
- Install
VS 2019
(Community) - Install
Desktop Development with C++
Workload- Check
C++ ATL for latest v142 build tools
- Check
C++ MFC for latest v142 build tools
- Check
- Set
vs2019
orGYP_MSVS_OVERRIDE_PATH
- Install
depot_tools
- Install
python27
https://chromium.googlesource.com/chromium/src/+/master/docs/mac_build_instructions.md
- Install
Xcode 12.2
+ - Install
depot_tools
https://chromium.googlesource.com/chromium/src/+/master/docs/ios/build_instructions.md
iOS should only be built on macOS
- Install
Xcode 12.2
+ - Install
depot_tools
https://chromium.googlesource.com/chromium/src/+/master/docs/linux/build_instructions.md
- Install
depot_tools
After fetch code, run
./build/install-build-deps.sh
https://chromium.googlesource.com/chromium/src/+/master/docs/android_build_instructions.md
- Install
depot_tools
After fetch code, run
./build/install-build-deps-android.sh
mkdir chromium && cd chromium
fetch --nohooks --no-history chromium
gclient runhooks # for the first time
cd src && git fetch origin +refs/tags/86.0.4240.93:branch_86.0.4240.93 --depth 1
git checkout -b branch_86.0.4240.93
cd .. && gclient sync -D -f --no-history
mkdir chromium && cd chromium
fetch --nohooks --no-history chromium
gclient runhooks # for the first time
cd src && git fetch origin +refs/tags/86.0.4240.93:branch_86.0.4240.93 --depth 1
git checkout -b branch_86.0.4240.93
cd .. && gclient sync -D -f --no-history
mkdir chromium-ios && cd chromium-ios
fetch --nohooks --no-history ios
gclient runhooks # for the first time
cd src && git fetch origin +refs/tags/86.0.4240.93:branch_86.0.4240.93 --depth 1
git checkout -b branch_86.0.4240.93
cd .. && gclient sync -D -f --no-history
mkdir chromium && cd chromium
fetch --nohooks --no-history chromium
cd src && ./build/install-build-deps.sh # for the first time
gclient runhooks # for the first time
cd src && git fetch origin +refs/tags/86.0.4240.93:branch_86.0.4240.93 --depth 1
git checkout -b branch_86.0.4240.93
cd .. && gclient sync -D -f --no-history
mkdir chromium-android && cd chromium-android
fetch --nohooks --no-history android
cd src && ./build/install-build-deps-android.sh # for the first time
gclient runhooks # for the first time
cd src && git fetch origin +refs/tags/86.0.4240.93:branch_86.0.4240.93 --depth 1
git checkout -b branch_86.0.4240.93
cd .. && gclient sync -D -f --no-history
Default target_cpu
is x64
cd src
gn args out\stable86_Release_Single_Cronet
# Add & save below lines
# is_debug = false
# is_component_build =false
ninja -C out\stable86_Release_Single_Cronet cronet_package
# out\stable86_Release_Single_Cronet\cronet\cronet.86.0.4240.198.dll
gn args out\stable86_Release_Single_Cronet --list --short --overridesonly > stable86_Release_Single_Cronet.overrides.log
Default target_cpu
is x64
cd src
gn args out/stable86_Release_Single_Cronet
# Add & save below lines
# is_debug = false
# is_component_build =false
ninja -C out/stable86_Release_Single_Cronet cronet_package
# out/stable86_Release_Single_Cronet/cronet/libcronet.86.0.4240.198.dylib
gn args out/stable86_Release_Single_Cronet --list --short --overridesonly > stable86_Release_Single_Cronet.overrides.log
CAUTION
id
may not be compatible with your detination application/library
$ otool -D libcronet.86.0.4240.198.dylib
cronet/macos/libcronet.86.0.4240.198.dylib:
@executable_path/libcronet.86.0.4240.198.dylib
Change id
with install_name_tool
install_name_tool -id @rpath/libcronet.86.0.4240.198.dylib libcronet.86.0.4240.198.dylib
https://chromium.googlesource.com/chromium/src/+/master/components/cronet/build_instructions.md
Default target_cpu
is x64
cd src
./components/cronet/tools/cr_cronet.py gn --out_dir=out/stable86_Release_Cronet
ninja -C out/stable86_Release_Cronet cronet_package
# out/stable86_Release_Cronet/cronet/Static/Cronet.framework
gn args out/stable86_Release_Cronet --list --short --overridesonly > stable86_Release_Cronet.overrides.log
After
./components/cronet/tools/cr_cronet.py gn --out_dir=out/stable86_Release_Cronet_arm64
, usegn args out/stable86_Release_Cronet_arm64
to addtarget_cpu = "arm64"
, to generate arm64 for iphoneos instead of iphonesimulator
Default target_cpu
is x64
cd src
gn args out/stable86_Release_Single_Cronet
# Add & save below lines
# is_debug = false
# is_component_build =false
ninja -C out/stable86_Release_Single_Cronet cronet_package
# out/stable86_Release_Single_Cronet/cronet/libcronet.86.0.4240.198.so
gn args out/stable86_Release_Single_Cronet --list --short --overridesonly > stable86_Release_Single_Cronet.overrides.log
https://chromium.googlesource.com/chromium/src/+/master/components/cronet/build_instructions.md
Default target_cpu
is arm
cd src
./components/cronet/tools/cr_cronet.py gn --out_dir=out/stable86_Release_Cronet
ninja -C out/stable86_Release_Cronet cronet_package
# out/stable86_Release_Cronet/cronet/libs/armabi-v7a/libcronet.86.0.4240.198.so
gn args out/stable86_Release_Cronet --list --short --overridesonly > stable86_Release_Cronet.overrides.log
After
./components/cronet/tools/cr_cronet.py gn --out_dir=out/stable86_Release_Cronet_arm64
, addtarget_cpu = "arm64"
, to generateout/stable86_Release_Cronet/cronet/libs/arm64-v8a/libcronet.86.0.4240.198.so
After
./components/cronet/tools/cr_cronet.py gn --out_dir=out/stable86_Release_Cronet_x86
, addtarget_cpu = "x86"
and removearm_use_neon = false
, to generateout/stable86_Release_Cronet/cronet/libs/x86/libcronet.86.0.4240.198.so
After
./components/cronet/tools/cr_cronet.py gn --out_dir=out/stable86_Release_Cronet_x64
, addtarget_cpu = "x64"
and removearm_use_neon = false
, to generateout/stable86_Release_Cronet/cronet/libs/x86_64/libcronet.86.0.4240.198.so