diff --git a/arm/setup_arm.sh b/arm/setup_arm.sh index f7a6ed12..f5d5265b 100755 --- a/arm/setup_arm.sh +++ b/arm/setup_arm.sh @@ -20,7 +20,6 @@ displayHelp () { printf "${bold}${GRE}Script to copy Thorium ARM BUILD.gn file over the Chromium source tree.${c0}\n" && printf "\n" } - case $1 in --help) displayHelp; exit 0;; esac @@ -44,8 +43,4 @@ printf "\n" && printf "${GRE}Enjoy Thorium on ARM!\n" && printf "\n" && -tput sgr0 && - -cd ~/chromium/src && - -exit 0 +tput sgr0 diff --git a/build.sh b/build.sh index c3e3a218..819c9a57 100755 --- a/build.sh +++ b/build.sh @@ -49,6 +49,4 @@ autoninja -C out/thorium thorium chrome_sandbox chromedriver clear_key_cdm thori cat ~/thorium/logos/thorium_logo_ascii_art.txt && printf "${GRE}${bold}Build Completed! ${YEL}${bold}You can now run \'./package.sh\' to build installation packages.\n" && -tput sgr0 && - -exit 0 +tput sgr0 diff --git a/build_android.sh b/build_android.sh index 73df5d35..29af7c56 100755 --- a/build_android.sh +++ b/build_android.sh @@ -56,5 +56,3 @@ cat ~/thorium/logos/thorium_logo_ascii_art.txt && printf "${GRE}${bold}Build Completed. ${YEL}${bold}You can copy the .apk(s) to your device or use ADB to install it.\n" && printf "${GRE}${bold}They are located in \'//chromium/src/out/thorium/apks/\'\n" && tput sgr0 - -exit 0 diff --git a/build_mac.sh b/build_mac.sh index 454eb36c..99658098 100755 --- a/build_mac.sh +++ b/build_mac.sh @@ -71,5 +71,4 @@ autoninja -C out/thorium chrome chromedriver -j$@ && cat ~/thorium/logos/thorium_logo_ascii_art.txt && printf "${GRE}${bold}Build Completed. ${YEL}${bold}You can now run \'./build_dmg.sh\'\n" && - -exit 0 +tput sgr0 diff --git a/build_win.sh b/build_win.sh index d4a30671..8ef5eaf4 100755 --- a/build_win.sh +++ b/build_win.sh @@ -51,6 +51,4 @@ mv -v -f ${CR_SRC_DIR}/out/thorium/mini_installer.exe ${CR_SRC_DIR}/out/thorium/ cat ~/thorium/logos/thorium_logo_ascii_art.txt && printf "${GRE}${bold}Build Completed. ${YEL}${bold}Installer at \'//out/thorium/thorium_mini_installer.exe\'\n" && -tput sgr0 && - -exit 0 +tput sgr0 diff --git a/clean.sh b/clean.sh index 294675cb..9a16b084 100755 --- a/clean.sh +++ b/clean.sh @@ -60,5 +60,3 @@ find ${CR_SRC_DIR}/out/thorium -name "*TOC*" -delete && printf "${GRE}Done cleaning artifacts.\n" && tput sgr0 - -exit 0 diff --git a/infra/set_exec.sh b/infra/set_exec.sh index 3c7af0f2..1852d4ff 100755 --- a/infra/set_exec.sh +++ b/infra/set_exec.sh @@ -25,6 +25,8 @@ cd .. && sudo chmod -v +x depot_tools/autoninja && +sudo chmod -v +x depot_tools/win_toolchain/package_from_installed.py && + sudo chmod -v +x build.sh && sudo chmod -v +x g && @@ -101,6 +103,10 @@ sudo chmod -v +x pak_src/build.sh && sudo chmod -v +x src/build/vs_toolchain.py && +sudo chmod -v +x src/build/install-build-deps.py && + +sudo chmod -v +x src/build/win/reorder-imports.py && + sudo chmod -v +x arm/setup_arm.sh && # sudo chmod -v +x src/tools/gn/bootstrap/bootstrap.py && diff --git a/other/README.md b/other/README.md index 8d147979..bcd8ea32 100644 --- a/other/README.md +++ b/other/README.md @@ -1,9 +1,5 @@ -## Compiler configs for AVX2 and SSE3 +## Compiler configs for SSE2, SSE3, SSE4.1, and AVX2 -To build for AVX2, copy the `build` directory in the AVX2 folder over `//chromium/src/build`. +For Polly, run `build_polly.sh` from //infra first, and then use the appropriate *BUILD.gn* for your build type from the Polly folder. -For SSE3, do the same except from the SSE3 folder. - -For Polly, run `build_polly.sh` first, and then use the appropriate *BUILD.gn* for your build type from the Polly folder. - -For Android arm64 builds, use the Android folder, including its *android_args.gn* for your args.gn, and the `build_android.sh` from the root of the repo for building the main apk and system webview apk. +For Android arm64 builds, use the Android folder, including its *android_args.gn* for your args.gn, and the `build_android.sh` from the root of the repo for building the main apk, content shell apk, and system webview apk. diff --git a/other/build_polly.sh b/other/build_polly.sh deleted file mode 100644 index e90fada1..00000000 --- a/other/build_polly.sh +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash - -## Copyright (c) 2024 Alex313031 - -## Clones latest LLVM being used by the Chromium Project, and builds a local LLVM toolchain with Polly to use the Polly optimizations in the main Thorium BUILD.gn - -YEL='\033[1;33m' # Yellow -CYA='\033[1;96m' # Cyan -RED='\033[1;31m' # Red -GRE='\033[1;32m' # Green -c0='\033[0m' # Reset Text -bold='\033[1m' # Bold Text -underline='\033[4m' # Underline Text - -# Error handling -yell() { echo "$0: $*" >&2; } -die() { yell "$*"; exit 111; } -try() { "$@" || die "${RED}Failed $*"; } - -# --help -displayHelp () { - cd ~/chromium/src && - python3 tools/clang/scripts/build.py --help && - printf "\n" && - printf "${bold}${GRE}Script to clone the latest LLVM being used by the Chromium Project, and builds a local ${c0}\n" && - printf "${bold}${GRE}LLVM toolchain with Polly to use the Polly optimizations in the main Thorium BUILD.gn${c0}\n" && - printf "${bold}${YEL}Use the --pgo flag to build LLVM with PGO.${c0}\n" && - printf "${bold}${YEL}Use the --jobs or -j flag to set the number of jobs (should be less or equal to the number of CPU cores).${c0}\n" && - printf "${bold}${YEL}Use the --verbose or -v flag to make Ninja show verbose commands.${c0}\n" && - printf "${bold}${YEL}Use the --version flag to show version, and --help to show help.${c0}\n" && - printf "\n" -} - -case $1 in - --help) displayHelp; exit 0;; -esac - -# --version -displayVersion () { - cd ~/chromium/src && - printf "\n" && - python3 tools/clang/scripts/build.py --version && - printf "\n" -} - -case $1 in - --version) displayVersion; exit 0;; -esac - -# Build with PGO -buildPollyPGO () { - cd ~/chromium/src && - - printf "${GRE}Building LLVM and Polly using PGO...${c0}\n" && - printf "\n" - sleep 1 && - - python3 tools/clang/scripts/build.py --without-android --without-fuchsia --disable-asserts --gcc-toolchain=/usr --bootstrap --thinlto --pgo $@ && - - printf "\n" - printf "${GRE}Done! You can now run ./build.sh\n" && - printf "\n" && - - tput sgr0 -} - -case $1 in - --pgo) buildPollyPGO; exit 0;; -esac - -printf "\n" && -printf "${bold}${GRE}Clones latest LLVM being used by the Chromium Project, and builds a local LLVM toolchain with Polly ${c0}\n" && -printf "${bold}${GRE}to use the Polly optimizations in the main Thorium BUILD.gn${c0}\n" && -printf "${bold}${YEL}Use the --pgo flag to build LLVM with PGO.${c0}\n" && -printf "${bold}${YEL}Use the --jobs or -j flag to set the number of jobs (should be less or equal to the number of CPU cores)${c0}\n" && -printf "${bold}${YEL}Use the --verbose or -v flag to make Ninja show verbose commands.${c0}\n" && -printf "${bold}${YEL}Use the --version flag to show version, and --help to show help.${c0}\n" && -printf "\n" - -cd ~/chromium/src && - -printf "${GRE}Building LLVM and Polly...${c0}\n" && -printf "\n" -sleep 1 && - -python3 tools/clang/scripts/build.py --without-android --without-fuchsia --disable-asserts --gcc-toolchain=/usr --bootstrap --thinlto $@ && - -printf "\n" -printf "${GRE}Done! You can now run ./build.sh\n" && -printf "\n" && - -tput sgr0 && - -exit 0 diff --git a/reset_depot_tools.sh b/reset_depot_tools.sh index 128c4051..3b7829fa 100755 --- a/reset_depot_tools.sh +++ b/reset_depot_tools.sh @@ -68,6 +68,4 @@ source ~/.bashrc && printf "\n" && printf "${GRE}Completed. ${YEL}You can now run \'./trunk.sh\'\n" -tput sgr0 && - -exit 0 +tput sgr0 diff --git a/setup.sh b/setup.sh index 24265cfd..b1d7fe15 100755 --- a/setup.sh +++ b/setup.sh @@ -231,5 +231,3 @@ cat logos/thorium_ascii_art.txt && printf "${GRE}Enjoy Thorium!\n" && printf "\n" && tput sgr0 - -exit 0 diff --git a/trunk.sh b/trunk.sh index 4321a65d..7f6b20ed 100755 --- a/trunk.sh +++ b/trunk.sh @@ -117,6 +117,5 @@ tput sgr0 && printf "\n" && cat ~/thorium/logos/chromium_logo_ascii_art.txt && -printf "\n" - -exit 0 +printf "\n" && +tput sgr0 diff --git a/version.sh b/version.sh index d903609c..a55f37a9 100755 --- a/version.sh +++ b/version.sh @@ -94,6 +94,4 @@ printf "\n" && cd ~/thorium && printf "${GRE}Done! ${YEL}You can now run \'./setup.sh\'\n" -tput sgr0 && - -exit 0 +tput sgr0 diff --git a/win_scripts/build.bat b/win_scripts/build.bat index bddf0944..1117a47d 100644 --- a/win_scripts/build.bat +++ b/win_scripts/build.bat @@ -10,5 +10,3 @@ set NINJA_SUMMARIZE_BUILD=1 && echo "Building Thorium..." && autoninja -C out\thorium chrome chromedriver content_shell setup mini_installer -j %1 - -exit 0 diff --git a/win_scripts/clean.bat b/win_scripts/clean.bat index 2c8f7e89..adbad7fc 100644 --- a/win_scripts/clean.bat +++ b/win_scripts/clean.bat @@ -23,5 +23,3 @@ rmdir /s /q thinlto-cache && rmdir /s /q fontconfig_caches && echo "Done!" - -exit 0 diff --git a/win_scripts/setup.bat b/win_scripts/setup.bat index 90b4dd33..29f09220 100644 --- a/win_scripts/setup.bat +++ b/win_scripts/setup.bat @@ -29,5 +29,3 @@ set NINJA_SUMMARIZE_BUILD=1 && echo "Dropping you to C:\src\chromium\src" && cd C:\src\chromium\src - -exit 0 diff --git a/win_scripts/trunk.bat b/win_scripts/trunk.bat index c3a60720..6eeac44a 100644 --- a/win_scripts/trunk.bat +++ b/win_scripts/trunk.bat @@ -37,6 +37,4 @@ gclient runhooks && echo "Downloading PGO Profile for Win64..." && -python tools\update_pgo_profiles.py --target=win64 update --gs-url-base=chromium-optimization-profiles/pgo_profiles && - -exit 0 +python tools\update_pgo_profiles.py --target=win64 update --gs-url-base=chromium-optimization-profiles/pgo_profiles