# Some values are gathered from the mach stub script # SPECIAL NOTE: The object directory is going to be located at ../.obj reletive to the # build root because most people build from a cloned git repo and it is just easier # to keep objdirs out of the repo this way. This logic is further down. # Application _BUILD_APP=navigator # Type of branding _BUILD_BRANDING=release # Current OS - $BINOC_SYSTEM is exported from the mach stub # If you want to use client.mk change this to either windows or linux _BUILD_OS=$BINOC_SYSTEM # Is this a 64bit build? _BUILD_64=1 # This is a prefix that may be needed for applications that don't build # at topsrcdir _BUILD_APP_PREFIX=projects # Build the updater, if so set to 1? _BUILD_UPDATER= # GTK major version number desired # You do not have to blank this on Windows _GTK_VERSION=2 # Set to 1 if you want debug symbols on Linux _LINUX_DEBUG_SYMBOLS= # Specific Windows SDK version number (leave blank to use what comes with VS) # You do not have to blank this on Linux # 10.0.17763.0 for current release _WINSDK_VERSION=10.0.17763.0 # These are specific optimizations for private BinOC Builds - Leave this clear # Also, only applies to Win64 builds _BINOC_OPTZ= # ============================================================================= # General Build Options mk_add_options MOZ_MAKE_FLAGS="-j10" mk_add_options AUTOCLOBBER=1 # I would highly suggest you NOT edit anything below this point ac_add_options --enable-official-vendor ac_add_options --enable-jemalloc ac_add_options --enable-strip ac_add_options --disable-debug ac_add_options --disable-tests # Symbols are useless to me on Linux if [ "$_BUILD_OS" = "linux" ] && [ -z "$_LINUX_DEBUG_SYMBOLS" ]; then ac_add_options --disable-debug-symbols fi # 32 or 64 bit if [ -n "$_BUILD_64" ]; then _BUILD_ARCH=x64 if [ "$_BUILD_OS" = "windows" ]; then ac_add_options --target=x86_64-pc-mingw32 ac_add_options --host=x86_64-pc-mingw32 else ac_add_options --x-libraries=/usr/lib64 fi else _BUILD_ARCH=x86 if [ "$_BUILD_OS" = "linux" ]; then ac_add_options --x-libraries=/usr/lib fi fi if [ "$_BUILD_OS" = "windows" ]; then WIN32_REDIST_DIR=$VCINSTALLDIR/redist/$_BUILD_ARCH/Microsoft.VC140.CRT WIN_UCRT_REDIST_DIR="C:/Program Files (x86)/Windows Kits/10/Redist/${_WINSDK_VERSION}/ucrt/DLLs/$_BUILD_ARCH" else ac_add_options --with-pthreads ac_add_options --enable-default-toolkit=cairo-gtk$_GTK_VERSION fi # Compiler optimizations if [ -n "$_BINOC_OPTZ" ] && [ -n "$_BUILD_64" ] && [ "$_BUILD_OS" = "windows" ]; then ac_add_options --enable-optimize="-O2 -GS- -GL -Qfast_transcendentals -Qpar -Qpar-report:1 -arch:AVX2 -favor:AMD64" ac_add_options --disable-dbm ac_add_options --enable-security-sqlstore else if [ "$_BUILD_OS" = "windows" ]; then ac_add_options --enable-optimize="-O2 -GS- -Qfast_transcendentals -Qpar -Qpar-report:1" else ac_add_options --enable-optimize="-O2 -msse2 -mfpmath=sse -w" fi fi # ============================================================================= # Deal with comm and other odd build paths if [ -n "$_BUILD_APP_PREFIX" ] && [ "$_BUILD_APP" != "palemoon" ] && [ "$_BUILD_APP" != "basilisk" ]; then if [ "$_BUILD_APP" = "xulrunner" ]; then _BUILD_APP_PREFIX=platform fi ac_add_options --enable-application=$_BUILD_APP_PREFIX/$_BUILD_APP else ac_add_options --enable-application=$_BUILD_APP fi # Object Directory if [ "$_BUILD_OS" = "windows" ]; then mk_add_options MOZ_OBJDIR=../.obj/$BINOC_GIT_BRANCH/$_BUILD_APP-$BINOC_CONFIG_GUESS else mk_add_options MOZ_OBJDIR=../.obj/$BINOC_GIT_BRANCH/$_BUILD_APP-$BINOC_CONFIG_GUESS-gtk$_GTK_VERSION fi # ============================================================================= # Build the platform if [ "$_BUILD_APP" = "abprime" ] || [ "$_BUILD_APP" = "inspector" ] || [ "$_BUILD_APP" = "scratchpad" ] || [ "$_BUILD_APP" = "profile-switcher" ]; then ac_add_options --disable-platform else # Binary Projects use Branding and Updater if [ "$_BUILD_BRANDING" = "release" ]; then if [ "$_BUILD_APP" != "xulrunner" ]; then ac_add_options --enable-official-branding fi if [ -n "$_BUILD_UPDATER" ]; then ac_add_options --enable-updater ac_add_options --enable-update-channel=release else ac_add_options --disable-updater fi elif [ "$_BUILD_BRANDING" = "unstable" ]; then if [ "$_BUILD_APP" != "xulrunner" ]; then if [ "$_BUILD_APP" = "palemoon" ] || [ "$_BUILD_APP" = "palemoon" ]; then ac_add_options --with-branding=$_BUILD_APP/branding/unstable else ac_add_options --with-branding=$_BUILD_APP_PREFIX/$_BUILD_APP/branding/unstable fi fi if [ -n "$_BUILD_UPDATER" ]; then ac_add_options --enable-updater ac_add_options --enable-update-channel=unstable else ac_add_options --disable-updater fi else ac_add_options --disable-updater fi fi if [ "$_BUILD_APP" = "palemoon" ] || [ "$_BUILD_APP" = "basilisk" ] || [ "$_BUILD_APP" = "navigator" ]; then ac_add_options --enable-av1 fi if [ "$_BUILD_APP" = "palemoon" ] || [ "$_BUILD_APP" = "navigator" ] || [ "$_BUILD_APP" = "mail" ]; then ac_add_options --disable-necko-wifi ac_add_options --disable-eme ac_add_options --disable-accessibility if [ "$_BUILD_OS" = "windows" ]; then ac_add_options --disable-parental-controls fi fi if [ "$_BUILD_APP" = "navigator" ] || [ "$_BUILD_APP" = "mail" ]; then ac_add_options --disable-jetpack ac_add_options --disable-devtools-server ac_add_options --disable-devtools if [ "$_BUILD_OS" = "linux" ]; then export MOZ_PKG_SPECIAL=gtk$_GTK_VERSION fi fi if [ "$_BUILD_APP" = "basilisk" ]; then export BASILISK_VERSION=1 export MOZ_TELEMETRY_REPORTING= export MOZ_ADDON_SIGNING= export MOZ_REQUIRE_SIGNING= ac_add_options --enable-eme ac_add_options --enable-gamepad ac_add_options --enable-webrtc fi # =============================================================================