mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-28 00:06:09 +03:00
Add PGO build for Win and Mac
This commit is contained in:
parent
0c40902920
commit
e9ff6f6092
14
src/build.sh
14
src/build.sh
@ -82,6 +82,20 @@ if [ "$(uname)" = Linux ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
case "$(uname)" in
|
||||
MINGW*|MSYS*)
|
||||
case "$(uname -m)" in
|
||||
x86_64) PGO_NAME=win64;;
|
||||
*) PGO_NAME=win32;;
|
||||
esac;;
|
||||
Darwin) PGO_NAME=mac;;
|
||||
esac
|
||||
if [ "$PGO_NAME" ]; then
|
||||
profile=$(cat chrome/build/$PGO_NAME.pgo.txt)
|
||||
flags="$flags
|
||||
pgo_data_path=\"../../chrome/build/pgo_profiles/$profile\""
|
||||
fi
|
||||
|
||||
rm -rf "./$out"
|
||||
mkdir -p out
|
||||
|
||||
|
@ -47,6 +47,23 @@ if [ "$ARCH" = Linux -a ! -f chrome/android/profiles/afdo.prof ]; then
|
||||
curl "$afdo_url" | bzip2 -cd >chrome/android/profiles/afdo.prof
|
||||
fi
|
||||
|
||||
# Profiles (Windows, Mac)
|
||||
case "$ARCH" in
|
||||
Windows)
|
||||
case "$(uname -m)" in
|
||||
x86_64) PGO_NAME=win64;;
|
||||
*) PGO_NAME=win32;;
|
||||
esac;;
|
||||
Darwin) PGO_NAME=mac;;
|
||||
esac
|
||||
if [ "$PGO_NAME" ]; then
|
||||
mkdir -p chrome/build/pgo_profiles
|
||||
profile=$(cat chrome/build/$PGO_NAME.pgo.txt)
|
||||
cd chrome/build/pgo_profiles
|
||||
curl -LO "https://storage.googleapis.com/chromium-optimization-profiles/pgo_profiles/$profile"
|
||||
cd ../../..
|
||||
fi
|
||||
|
||||
# dsymutil (Mac)
|
||||
if [ "$ARCH" = Darwin ]; then
|
||||
mkdir -p tools/clang/dsymutil
|
||||
|
Loading…
Reference in New Issue
Block a user