Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc633013 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊 Committed by Nishith Khanna
Browse files

Allow debug builds

parent dd2b9506
Loading
Loading
Loading
Loading
+23 −2
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ clean=0
gsync=0
history=1
patchonly=0
debug=0
arch=""

usage() {
@@ -26,6 +27,7 @@ usage() {
    echo "    -u Show this message"
    echo "    -s Sync source"
    echo "    -h Sync without history"
    echo "    -d Debug build"
    echo "    -p Apply patches - Only after synced"
    echo
    exit 1
@@ -59,6 +61,24 @@ build() {
    build_args+=' android_keystore_password="platform"'
    build_args+=' trichrome_certdigest="c8a2e9bccf597c2fb6dc66bee293fc13f2fc47ec77bc6b2b0d52c11f51192ab8"'

    if [ $debug -eq 1 ]; then
        build_args+=' is_official_build=false'
        build_args+=' is_debug=true'
        build_args+=' chrome_pgo_phase=0'
        build_args+=' v8_enable_debugging_features=false'
        build_args+=' enable_android_secondary_abi=true'
        build_args+=' android_static_analysis="off"'
        build_args+=' generate_linker_map=false'
        build_args+=' strip_debug_info=false'
        build_args+=' dcheck_always_on=true'
    else
        build_args+=' is_official_build=true'
        build_args+=' is_debug=false'
        build_args+=' chrome_pgo_phase=2'
        build_args+=' generate_linker_map=true'
        build_args+=' dcheck_always_on=false'
    fi

    echo ">> [$(date)] Building chromium $chromium_version for $1"
    gn gen "out/$1" --args="$build_args"
    if [ $1 '==' "x64" ] || [ $1 '==' "arm64" ]; then
@@ -67,7 +87,7 @@ build() {
        build_targets="trichrome_webview_apk trichrome_chrome_apk trichrome_library_apk"
    fi

    ninja -C out/$1 $build_targets
    autoninja -C out/$1 $build_targets
    mkdir -p "${root_dir}/apks/${apk_arch}"

    for apk in $apks; do
@@ -221,7 +241,7 @@ init_repo() {
    fi
}

while getopts ":a:cur:shp" opt; do
while getopts ":a:cur:shpd" opt; do
    case $opt in
    a) arch="$OPTARG" ;;
    c) clean=1 ;;
@@ -229,6 +249,7 @@ while getopts ":a:cur:shp" opt; do
    s) gsync=1 ;;
    h) history=0 ;;
    p) patchonly=1 ;;
    d) debug=1 ;;
    :)
        echo "Option -$OPTARG requires an argument"
        echo
+0 −5
Original line number Diff line number Diff line
@@ -2,8 +2,6 @@ android_channel="stable"
blink_symbol_level=1
build_contextual_search=false
build_with_tflite_lib=false
chrome_pgo_phase=2
dcheck_always_on=false
dfmify_dev_ui=false
disable_android_lint=true
disable_fieldtrial_testing_config=true
@@ -29,12 +27,9 @@ enable_request_header_integrity=false
enable_vr=false
exclude_unwind_tables=false
ffmpeg_branding="Chrome"
generate_linker_map=true
icu_use_data_file=true
is_cfi=false
is_component_build=false
is_debug=false
is_official_build=true
media_use_openh264=false
proprietary_codecs=true
rtc_build_examples=false