Skip to content
Snippets Groups Projects
none_2fe628d1cb91c9f53596f0b006030d50d4b34ca1.hash-material.yml 283 KiB
Newer Older
rev.ng CI's avatar
rev.ng CI committed
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR"
        cp -a "$JS_DIR/package.json" .

        # check that package.json has the right hash, this is to trigger a rebuild in orchestra
        # whenever we change the file
        echo 'fcb10a1055a762b77f844baf8348212fe7478d06c45427d70c2c2abd53d70229 package.json' | sha256sum -c -

        # Generate package lock
        "$ORCHESTRA_DOTDIR"/support/js-prerequisites/system-npm install --package-lock-only --silent

        # NOTE: until we install this component fetch-js-dependencies will only work with npm lockfiles
        #       due to yarn lockfiles needing the `@yarnpkg/lockfile` dependency installed to be read
        "$ORCHESTRA_DOTDIR"/support/fetch-js-dependencies npm -o ./.cache
      "dependencies": []
      "install": |+
        JS_DIR="$ORCHESTRA_DOTDIR/support/js-prerequisites"

        cd "$BUILD_DIR"
        mkdir "${DESTDIR}${ORCHESTRA_ROOT}/share/node_cache"

        # copy all download packages to node_cache
        cp -a .cache/*.tgz "${DESTDIR}${ORCHESTRA_ROOT}/share/node_cache"

        # copy the npm_static_repository tool
        cp -a "$JS_DIR/static-npm-registry" "${DESTDIR}${ORCHESTRA_ROOT}/libexec"
        cp -a "$JS_DIR/npm" "$JS_DIR/system-npm" \
          "${DESTDIR}${ORCHESTRA_ROOT}/bin"

        # Create npmrc
        cat - > "${DESTDIR}${ORCHESTRA_ROOT}/share/npmrc" << EOF
        EOF

        # Install packages needed for building
        export ORCHESTRA_NODE_CACHE="$BUILD_DIR/.cache:$ORCHESTRA_NODE_CACHE"

        # TODO: once we import node in orchestra, outline in its own component
        npm --global \
            --prefix="${DESTDIR}${ORCHESTRA_ROOT}" \
            install \
              yarn @yarnpkg/lockfile \
              prettier eslint lint-staged gts \
              eslint-plugin-node eslint-plugin-prettier \
              @typescript-eslint/eslint-plugin @typescript-eslint/parser

        # Overwrite yarn with our wrapper
        rm "${DESTDIR}${ORCHESTRA_ROOT}/bin/"{yarn,yarnpkg}
        cp -a "$JS_DIR/yarn" "${DESTDIR}${ORCHESTRA_ROOT}/bin/yarn"
        ln -s "yarn" "${DESTDIR}${ORCHESTRA_ROOT}/bin/yarnpkg"

      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": ""
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies": []
      "configure": |-
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR"
        cat > requirements.txt <<'EOF'
        # Python language checkers/formatters
rev.ng CI's avatar
rev.ng CI committed
        black>=22.12.0,<23.0
        flake8>=5.0.4,<6.0
        flake8-breakpoint>=1.1.0,<2.0
        flake8-builtins>=2.1.0,<3.0
        flake8-comprehensions>=3.10.1,<4.0
        flake8-eradicate>=1.4.0,<2.0
        flake8-return>=1.2.0,<2.0
        flake8-simplify>=0.19.3,<1.0
        pep8-naming>=0.13.3,<1.0
        isort>=5.11.4,<6.0
        mypy==0.982

        # Python types, needed for mypy to work correctly
rev.ng CI's avatar
rev.ng CI committed
        types-backports
        types-PyYAML
        types-requests
        types-urllib3

        # cmake-format executable
        cmakelang

        # Applications/Script dependencies
        aiodataloader
        ariadne[asgi-file-uploads]>=0.16
        cffi
        Jinja2
        gql[aiohttp]
        grandiso
        jsonschema
        networkx
        pefile
        pydot
        pyelftools

        # This is our fork of the python-idb package that includes some fixes.
        https://github.com/revng/python-idb/archive/08ba07a.tar.gz

        # pydot 3.0.2 introduced an incompatibility with pydot which is supposed to be
        # resolved in a later version, but still causes problems to us (for instance,
        # monotone framework headers generation fails), so we request v2.4.7.  See
        # https://github.com/pydot/pydot/issues/277
        pyparsing==2.4.7

        pytest
        pytest-asyncio
        requests
        requests-toolbelt
        rich

        # uvicorn[standard] but without watchfiles (since it requires rust)
        uvicorn==0.18.3
        httptools>=0.5.0
        python-dotenv>=0.13
        uvloop>=0.14.0,!=0.15.0,!=0.15.1
        websockets>=10.0

        xdg
        EOF

        pip-package-list.py \
          revng-python-dependencies \
          -r requirements.txt \
          > packages.csv

        mkdir -p packages
        cd packages
        while IFS=, read -r NAME URL; do
          fetch.sh "$URL"
          echo "$NAME" >> "../package-list.txt"
        done < ../packages.csv
      "dependencies":
      - |-
        python-base-packages
      - |-
        pyyaml
      - |-
        cython
      "install": |-
        cd "$BUILD_DIR"
        export HARD_FLAGS_COMPILE="-I"$("${ORCHESTRA_DOTDIR}/support/get-python-path" include)" $HARD_FLAGS_COMPILE"
        python \
          -m pip \
          --disable-pip-version-check \
          --no-python-version-warning \
          install \
          --compile \
          --no-index \
          --no-build-isolation \
          --no-warn-script-location \
          --ignore-installed \
          --root "$DESTDIR" \
          --verbose \
          packages/*

        PYTHON_PACKAGES_DIR="$DESTDIR$ORCHESTRA_ROOT/share/orchestra/python-packages/"
        mkdir -p "$PYTHON_PACKAGES_DIR"
        cp \
          -a \
          package-list.txt \
          "$PYTHON_PACKAGES_DIR/revng-python-dependencies.txt"
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": !!null |-
    null
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        cmake
      - |-
        ninja
      - |-
        host-cxx-toolchain
      "configure": |
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR"
        cmake \
          -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
          -DCMAKE_INSTALL_SO_NO_EXE=0 \
          -DCMAKE_INSTALL_PREFIX="$ORCHESTRA_ROOT" \
          -DCMAKE_PREFIX_PATH="$ORCHESTRA_ROOT" "$SOURCE_DIR"
      "dependencies":
      - |-
        revng-qa-python-dependencies
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make ${JOBS:+-j$JOBS} install DESTDIR="$DESTDIR"
      "ndebug": !!bool |-
        true
  "commit": |-
rev.ng CI's avatar
rev.ng CI committed
    6e555bed221d2659c36a594803d6ca15a5adc032
rev.ng CI's avatar
rev.ng CI committed
  "default_build": |-
    default
  "license": |-
    LICENSE
  "repository": |-
    revng-qa
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies": []
      "configure": |-
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR"
        cat > requirements.txt <<'EOF'
        expandvars
        jinja2
        EOF

        pip-package-list.py \
          revng-qa-python-dependencies \
          -r requirements.txt \
          > packages.csv

        mkdir -p packages
        cd packages
        while IFS=, read -r NAME URL; do
          fetch.sh "$URL"
          echo "$NAME" >> "../package-list.txt"
        done < ../packages.csv
      "dependencies":
      - |-
        pyyaml
      - |-
        python-base-packages
      "install": |-
        cd "$BUILD_DIR"
        export HARD_FLAGS_COMPILE="-I"$("${ORCHESTRA_DOTDIR}/support/get-python-path" include)" $HARD_FLAGS_COMPILE"
        python \
          -m pip \
          --disable-pip-version-check \
          --no-python-version-warning \
          install \
          --compile \
          --no-index \
          --no-build-isolation \
          --no-warn-script-location \
          --ignore-installed \
          --root "$DESTDIR" \
          --verbose \
          packages/*

        PYTHON_PACKAGES_DIR="$DESTDIR$ORCHESTRA_ROOT/share/orchestra/python-packages/"
        mkdir -p "$PYTHON_PACKAGES_DIR"
        cp \
          -a \
          package-list.txt \
          "$PYTHON_PACKAGES_DIR/revng-qa-python-dependencies.txt"
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": !!null |-
    null
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "debug":
      "build_dependencies":
      - |-
        revng-js-prerequisites
      "configure": |
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR"
        cp -a "$SOURCE_DIR/"package{,-lock}.json .
        "$ORCHESTRA_DOTDIR"/support/fetch-js-dependencies npm -o cache/
      "dependencies": []
rev.ng CI's avatar
rev.ng CI committed
      "install": "cd \"$BUILD_DIR\"\n\nfunction do_install() {\n  cd \"$BUILD_DIR\"\n  # Copy vsix to /share/vscode-extensions\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/share/vscode-extensions\"\n  cp -a build/*.vsix \"${DESTDIR}${ORCHESTRA_ROOT}/share/vscode-extensions\"\n}\n\nif [ -f source-hash ] && cmp source-hash <(\"$ORCHESTRA_DOTDIR\"/support/directory-hash \"$SOURCE_DIR\"); then\n  do_install\n  exit 0\nfi\n\n\"$ORCHESTRA_DOTDIR\"/support/directory-hash \"$SOURCE_DIR\" > source-hash.tmp\n\nrsync \\\n  --archive --delete --quiet \\\n  --exclude=.git \\\n  --exclude-from=<(\n    git \\\n      -C \"$SOURCE_DIR\" \\\n      ls-files \\\n      --exclude-standard \\\n      --others \\\n      --ignored \\\n      --directory\n  ) \\\n  \"$SOURCE_DIR/\" \"$BUILD_DIR/build/\"\n\ncd \"$BUILD_DIR/build\"\nexport ORCHESTRA_NODE_CACHE=\"$BUILD_DIR/cache:$ORCHESTRA_NODE_CACHE\"\n\nnpm install --no-audit --omit peer \n\n# vsce will try to do an update check if in a tty, we use cat to suppress this\nNODE_ENV=development npm run package | cat\n\nif [ \"$RUN_TESTS\" -eq 1 ]; then\n  npm run --if-present lint\n  npm run --if-present test\nfi\n\ndo_install\n\nmv source-hash{.tmp,}\n"
rev.ng CI's avatar
rev.ng CI committed
      "ndebug": !!bool |-
        true
    "default":
      "build_dependencies":
      - |-
        revng-js-prerequisites
      "configure": |
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR"
        cp -a "$SOURCE_DIR/"package{,-lock}.json .
        "$ORCHESTRA_DOTDIR"/support/fetch-js-dependencies npm -o cache/
      "dependencies": []
rev.ng CI's avatar
rev.ng CI committed
      "install": "cd \"$BUILD_DIR\"\n\nfunction do_install() {\n  cd \"$BUILD_DIR\"\n  # Copy vsix to /share/vscode-extensions\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/share/vscode-extensions\"\n  cp -a build/*.vsix \"${DESTDIR}${ORCHESTRA_ROOT}/share/vscode-extensions\"\n}\n\nif [ -f source-hash ] && cmp source-hash <(\"$ORCHESTRA_DOTDIR\"/support/directory-hash \"$SOURCE_DIR\"); then\n  do_install\n  exit 0\nfi\n\n\"$ORCHESTRA_DOTDIR\"/support/directory-hash \"$SOURCE_DIR\" > source-hash.tmp\n\nrsync \\\n  --archive --delete --quiet \\\n  --exclude=.git \\\n  --exclude-from=<(\n    git \\\n      -C \"$SOURCE_DIR\" \\\n      ls-files \\\n      --exclude-standard \\\n      --others \\\n      --ignored \\\n      --directory\n  ) \\\n  \"$SOURCE_DIR/\" \"$BUILD_DIR/build/\"\n\ncd \"$BUILD_DIR/build\"\nexport ORCHESTRA_NODE_CACHE=\"$BUILD_DIR/cache:$ORCHESTRA_NODE_CACHE\"\n\nnpm install --no-audit --omit peer \n\n# vsce will try to do an update check if in a tty, we use cat to suppress this\nNODE_ENV=production npm run package | cat\n\nif [ \"$RUN_TESTS\" -eq 1 ]; then\n  npm run --if-present lint\n  npm run --if-present test\nfi\n\ndo_install\n\nmv source-hash{.tmp,}\n"
rev.ng CI's avatar
rev.ng CI committed
      "ndebug": !!bool |-
        true
  "commit": |-
    acfbfe74436ea823085d1f4d5b5b8274e5970087
  "default_build": |-
    default
  "license": |-
    LICENSE.md
  "repository": |-
    revng-vscode-theme
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "debug":
      "build_dependencies":
      - |-
        revng-js-prerequisites
      - |-
        revng
      "configure": |
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR"
        cp -a "$SOURCE_DIR/"package{,-lock}.json .
        "$ORCHESTRA_DOTDIR"/support/fetch-js-dependencies npm -o cache/
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"

        function do_install() {
          cd "$BUILD_DIR"
          # Copy vsix to /share/vscode-extensions
          mkdir -p "${DESTDIR}${ORCHESTRA_ROOT}/share/vscode-extensions"
          cp -a build/*.vsix "${DESTDIR}${ORCHESTRA_ROOT}/share/vscode-extensions"
        }

        if [ -f source-hash ] && cmp source-hash <("$ORCHESTRA_DOTDIR"/support/directory-hash "$SOURCE_DIR"); then
          do_install
          exit 0
        fi

        "$ORCHESTRA_DOTDIR"/support/directory-hash "$SOURCE_DIR" > source-hash.tmp

        rsync \
          --archive --delete --quiet \
          --exclude=.git \
          --exclude-from=<(
            git \
              -C "$SOURCE_DIR" \
              ls-files \
              --exclude-standard \
              --others \
              --ignored \
              --directory
          ) \
          "$SOURCE_DIR/" "$BUILD_DIR/build/"

        cd "$BUILD_DIR/build"
        export ORCHESTRA_NODE_CACHE="$BUILD_DIR/cache:$ORCHESTRA_NODE_CACHE"

        npm install --no-audit --omit peer revng-model

        # vsce will try to do an update check if in a tty, we use cat to suppress this
        NODE_ENV=development npm run package | cat

        if [ "$RUN_TESTS" -eq 1 ]; then
rev.ng CI's avatar
rev.ng CI committed
          npm run --if-present lint
rev.ng CI's avatar
rev.ng CI committed
          npm run --if-present test
        fi

        do_install

        mv source-hash{.tmp,}
      "ndebug": !!bool |-
        true
    "default":
      "build_dependencies":
      - |-
        revng-js-prerequisites
      - |-
        revng
      "configure": |
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR"
        cp -a "$SOURCE_DIR/"package{,-lock}.json .
        "$ORCHESTRA_DOTDIR"/support/fetch-js-dependencies npm -o cache/
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"

        function do_install() {
          cd "$BUILD_DIR"
          # Copy vsix to /share/vscode-extensions
          mkdir -p "${DESTDIR}${ORCHESTRA_ROOT}/share/vscode-extensions"
          cp -a build/*.vsix "${DESTDIR}${ORCHESTRA_ROOT}/share/vscode-extensions"
        }

        if [ -f source-hash ] && cmp source-hash <("$ORCHESTRA_DOTDIR"/support/directory-hash "$SOURCE_DIR"); then
          do_install
          exit 0
        fi

        "$ORCHESTRA_DOTDIR"/support/directory-hash "$SOURCE_DIR" > source-hash.tmp

        rsync \
          --archive --delete --quiet \
          --exclude=.git \
          --exclude-from=<(
            git \
              -C "$SOURCE_DIR" \
              ls-files \
              --exclude-standard \
              --others \
              --ignored \
              --directory
          ) \
          "$SOURCE_DIR/" "$BUILD_DIR/build/"

        cd "$BUILD_DIR/build"
        export ORCHESTRA_NODE_CACHE="$BUILD_DIR/cache:$ORCHESTRA_NODE_CACHE"

        npm install --no-audit --omit peer revng-model

        # vsce will try to do an update check if in a tty, we use cat to suppress this
        NODE_ENV=production npm run package | cat

        if [ "$RUN_TESTS" -eq 1 ]; then
rev.ng CI's avatar
rev.ng CI committed
          npm run --if-present lint
rev.ng CI's avatar
rev.ng CI committed
          npm run --if-present test
        fi

        do_install

        mv source-hash{.tmp,}
      "ndebug": !!bool |-
        true
  "commit": |-
    449ba4807aa745f5a13db96c5e2a219a7dfeb6ca
  "default_build": |-
    default
  "license": |-
    LICENSE.md
  "repository": |-
    revng-ui
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        revng-ui
      - |-
        revng-theme
      - |-
        vscode-web
      "configure": |
        mkdir -p "$BUILD_DIR"
      "dependencies":
      - |-
        revng-c
      "install": |+
        PYTHON_PACKAGE_BASE=$("${ORCHESTRA_DOTDIR}/support/get-python-path" purelib)
        COMMANDS_DIR="${DESTDIR}${PYTHON_PACKAGE_BASE}/revng/cli/_commands"
        mkdir -p "$COMMANDS_DIR"
        cp -a "${ORCHESTRA_DOTDIR}/support/vscode-web/web-ui.py" \
              "$COMMANDS_DIR"

        INSTALL_DIR="${DESTDIR}${ORCHESTRA_ROOT}/share/vscode-web"
        mkdir -p "$INSTALL_DIR/static"
        tar -xf "${ORCHESTRA_ROOT}/share/vscode-web.tar.xz" -C"$INSTALL_DIR"

        # Repackage vsixs inside the destionation directory
        # If the EXTENSIONS_DIR has been specified and exists we'll take each vsix file and unzip it,
        # as this is the format needed by vscode-web to load extensions properly
        for extension in "$ORCHESTRA_ROOT"/share/vscode-extensions/*.vsix; do
          # We need a temporary directory since:
          # * unzip does not have the equivalent of --strip-components
          # * we need to read the extension's name from the package.json file
          TEMP=$(mktemp -d --tmpdir tmp.revng.vscode-web-ext-unpack.XXXXXXXXXX)
          # Inside the vsix there's a couple of manifest files in the root, these are for the
          # marketplace, whereas the `extension` directory contains the actual extension files
          # that need to be included
          unzip -qq "$extension" 'extension/*' -d"$TEMP"
          NAME=$(jq -r .name "$TEMP/extension/package.json")
          cp -raT "$TEMP/extension" "$INSTALL_DIR/static/extensions/$NAME"
          rm -rf "$TEMP"
        done

        # Copy product.json and icons to to INSTALL_DIR
        cp -a "$ORCHESTRA_DOTDIR/support/vscode-web/product.json" "$INSTALL_DIR/product.json"
        cp -a "$ORCHESTRA_DOTDIR/support/logo.ico" "$INSTALL_DIR/static/favicon.ico"
        cp -a "$ORCHESTRA_DOTDIR/support/logo.png" "$INSTALL_DIR/static/code-192.png"
        cp -a "$ORCHESTRA_DOTDIR/support/logo.png" "$INSTALL_DIR/static/code-512.png"

        # Since all extensions are explicitly specified in `product.json`, we can
        # remove all the other extensions that are not specified there
        EXTENSIONS=$(jq -r '.builtinExtensions[]' "$INSTALL_DIR/product.json")

        pushd "$INSTALL_DIR/static/extensions" &> /dev/null || exit

        # We compare the list of folders in the current directory (the extensions directory) to the list
        # of extensions that we specified in builtinExtensions, and we'll delete any that do not appear in
        # the latter
        readarray -t EXTRANEOUS_EXTENSIONS < \
          <(comm -23 \
            <(find . -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | sort) \
            <(echo "$EXTENSIONS" | sort))
        rm -rf "${EXTRANEOUS_EXTENSIONS[@]}"

        popd &> /dev/null || exit

      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": ""
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        host-cxx-toolchain
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" https://ftp.gnu.org/gnu/src-highlite/source-highlight-3.1.9.tar.gz

        cd "$BUILD_DIR"
        sed 's/ throw [(]IOException[)]//g' -i lib/srchilite/fileutil.h lib/srchilite/fileutil.cc

        CC=clang CXX=clang++ ./configure \
          --prefix="$ORCHESTRA_ROOT" \
          --with-boost="$ORCHESTRA_ROOT" \
          --with-sysroot="$ORCHESTRA_ROOT" \
          --without-bash-completion \
          --without-doxygen \
          --disable-static
      "dependencies":
      - |-
        boost
      - |-
        host-libcxx
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make ${JOBS:+-j$JOBS} install DESTDIR="$DESTDIR"
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    COPYING
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
rev.ng CI's avatar
rev.ng CI committed
      - |-
        host-c-toolchain
rev.ng CI's avatar
rev.ng CI committed
      - |-
        tcl
      "configure": |
        mkdir -p "$BUILD_DIR/source"
        extract.sh --into "$BUILD_DIR/source" "https://github.com/sqlite/sqlite/archive/refs/tags/version-3.39.4.tar.gz"
        cd "$BUILD_DIR" && ./source/configure \
          --prefix="$ORCHESTRA_ROOT" \
          --enable-shared \
          --enable-all \
          --with-pic \
          --disable-tcl
      "dependencies":
      - |-
        readline
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make ${JOBS:+-j$JOBS} install DESTDIR="$DESTDIR"
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    source/LICENSE.md
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
rev.ng CI's avatar
rev.ng CI committed
        host-c-toolchain
rev.ng CI's avatar
rev.ng CI committed
3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000
      "configure": |
        mkdir -p "$BUILD_DIR/source"
        extract.sh --into "$BUILD_DIR/source" "https://prdownloads.sourceforge.net/tcl/tcl8.6.12-src.tar.gz"
        cd "$BUILD_DIR" && ./source/unix/configure \
          --prefix="$ORCHESTRA_ROOT" \
          --enable-shared
      "dependencies": []
      "install": |+
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make ${JOBS:+-j$JOBS} install DESTDIR="$DESTDIR"
        ln -s tclsh8.6 "$DESTDIR$ORCHESTRA_ROOT/bin/tclsh"
        ls "$DESTDIR$ORCHESTRA_ROOT/bin/tclsh"

      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    source/license.terms
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        ninja
      - |-
        revng
      - |-
        revng-qa
      - |-
        test/revng-qa
      - |-
        clang-release
      "configure": |
        mkdir -p "$BUILD_DIR"
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        rm -rf *
        "$ORCHESTRA_ROOT/libexec/revng/revng-test-configure" \
          "$ORCHESTRA_ROOT/share/revng/test/configuration"/**/*.yml \
          --install-path "$ORCHESTRA_ROOT/share/revng/test" \
          --destination . \
          --target-type 'revng\..*'
        ninja run-all
        ninja install
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": !!null |-
    null
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        ninja
      - |-
        revng-c
      - |-
        revng-qa
      - |-
        test/revng
      - |-
        test/revng-qa
      - |-
        clang-release
      "configure": |
        mkdir -p "$BUILD_DIR"
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        rm -rf *
        "$ORCHESTRA_ROOT/libexec/revng/revng-test-configure" \
          "$ORCHESTRA_ROOT/share/revng/test/configuration"/**/*.yml \
          --install-path "$ORCHESTRA_ROOT/share/revng/test" \
          --destination . \
          --target-type 'revng-c\..*'
        ninja run-all
        ninja install
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": !!null |-
    null
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        ninja
      - |-
        revng-qa
      - |-
        toolchain/win32-vc16/vc
      - |-
        toolchain/arm/gcc
      - |-
        toolchain/x86-64/gcc
      - |-
        toolchain/i386/gcc
      - |-
        toolchain/s390x/gcc
      - |-
        toolchain/aarch64/gcc
      - |-
        toolchain/mips/gcc
      - |-
        toolchain/mipsel/gcc
      - |-
        toolchain/host/gcc
      - |-
        ida
      "configure": |
        mkdir -p "$BUILD_DIR"
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        rm -rf *
        "$ORCHESTRA_ROOT/libexec/revng/revng-test-configure" \
          "$ORCHESTRA_ROOT/share/revng/test/configuration"/**/*.yml \
          --install-path "$ORCHESTRA_ROOT/share/revng/test" \
          --destination . \
          --target-type 'revng-qa\..*'
        ninja run-all
        ninja install
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": !!null |-
    null
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path":
  - |-
    ${ORCHESTRA_ROOT}/x86_64-pc-linux-gnu/aarch64-unknown-linux-musl/binutils-bin/2.35
  "builds":
    "default":
      "build_dependencies":
      - |-
        glibc
      - |-
        toolchain/host/gcc
      - |-
        toolchain/host/binutils
      "configure": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/binutils/binutils-2.35.tar.bz2
        cd "$BUILD_DIR" && "$SOURCE_DIR/configure" \
          --build=x86_64-pc-linux-gnu \
          --host=x86_64-pc-linux-gnu \
          --target=aarch64-unknown-linux-musl \
          --with-sysroot="$ORCHESTRA_ROOT/aarch64-unknown-linux-musl" \
          --prefix=$ORCHESTRA_ROOT \
          --datadir=$ORCHESTRA_ROOT/share/binutils-data/aarch64-unknown-linux-musl/2.35 \
          --infodir=$ORCHESTRA_ROOT/share/binutils-data/aarch64-unknown-linux-musl/2.35/info \
          --mandir=$ORCHESTRA_ROOT/share/binutils-data/aarch64-unknown-linux-musl/2.35/man \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/aarch64-unknown-linux-musl/binutils-bin/2.35 \
          --libdir=$ORCHESTRA_ROOT/lib64/binutils/aarch64-unknown-linux-musl/2.35 \
          --libexecdir=$ORCHESTRA_ROOT/lib64/binutils/aarch64-unknown-linux-musl/2.35 \
          --includedir=$ORCHESTRA_ROOT/lib64/binutils/aarch64-unknown-linux-musl/2.35/include \
          --without-included-gettext \
          --with-zlib \
          --enable-poison-system-directories \
          --enable-secureplt \
          --enable-obsolete \
          --enable-gold \
          --disable-shared \
          --enable-threads \
          --enable-install-libiberty \
          --disable-werror \
          --disable-static \
          --disable-gdb \
          --disable-libdecnumber \
          --disable-readline \
          --disable-sim \
          --without-debuginfod \
          --without-stage1-ldflags \
           \
          CFLAGS="-w -ggdb3 -O3" \
          CXXFLAGS="-w -ggdb3 -O3"
      "dependencies":
      - |-
        gcc-runtime
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make ${JOBS:+-j$JOBS} install DESTDIR="$DESTDIR"
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    source/COPYING
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path":
  - |-
    ${ORCHESTRA_ROOT}/x86_64-pc-linux-gnu/aarch64-unknown-linux-musl/gcc-bin/7.3.0
  "builds":
    "stage1":
      "build_dependencies":
      - |-
        glibc
      - |-
        gmp
      - |-
        mpfr
      - |-
        mpc
      "configure": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/gcc/gcc-7.3.0/gcc-7.3.0.tar.gz
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-7.3.0-cfns-fix-mismatch-in-gnu_inline-attributes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-7.3.0-cpp-musl-support.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-7.3.0-fixes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-7.3.0-remove-dependency-on-libc_single_threaded.patch" "$SOURCE_DIR"
        sed -i 's|gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"|gcc_gxx_include_dir="/${gcc_gxx_without_sysroot#/}"|' "$SOURCE_DIR/gcc/configure"


        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR"

        echo 'char __libc_single_threaded __attribute__ ((weak));' > fake-libc-single-threaded.c
        gcc -c -fPIC -x c fake-libc-single-threaded.c -o "$BUILD_DIR/fake-libc-single-threaded.o"

        "$SOURCE_DIR/configure" \
          --host=x86_64-pc-linux-gnu \
          --build=x86_64-pc-linux-gnu \
          --target=aarch64-unknown-linux-musl \
          --prefix=$ORCHESTRA_ROOT \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/aarch64-unknown-linux-musl/gcc-bin/7.3.0 \
          --includedir=$ORCHESTRA_ROOT/lib/gcc/aarch64-unknown-linux-musl/7.3.0/include \
          --datadir=$ORCHESTRA_ROOT/share/gcc-data/aarch64-unknown-linux-musl/7.3.0 \
          --mandir=$ORCHESTRA_ROOT/share/gcc-data/aarch64-unknown-linux-musl/7.3.0/man \
          --infodir=$ORCHESTRA_ROOT/share/gcc-data/aarch64-unknown-linux-musl/7.3.0/info \
          --with-sysroot=$ORCHESTRA_ROOT/aarch64-unknown-linux-musl \
          --enable-obsolete \
          --enable-secureplt \
          --disable-werror \
          --disable-nls \
          --without-included-gettext \
          --enable-checking=release \
          --enable-libstdcxx-time \
          --enable-poison-system-directories \
          --disable-host-shared \
          --enable-shared \
          --disable-libatomic \
          --disable-bootstrap \
          --disable-multilib \
          --disable-altivec \
          --disable-fixed-point \
          --disable-libgcj \
          --disable-libgomp \
          --disable-libmudflap \
          --disable-libssp \
          --disable-libcilkrts \
          --disable-vtable-verify \
          --disable-libvtv \
          --disable-libquadmath \
          --disable-rpath \
          --enable-lto \
          --disable-vtable-verify \
          --disable-libsanitizer \
          --with-gmp="$ORCHESTRA_ROOT" \
          --with-mpfr="$ORCHESTRA_ROOT" \
          --with-mpc="$ORCHESTRA_ROOT" \
          --without-zstd \
          --without-cloog \
          --without-isl \
          --disable-libsanitizer \
          --disable-libssp \
          --disable-shared \
          --enable-languages=c \
          CFLAGS="-w -ggdb3 -O3 --sysroot $INSTALL_LINK_ONLY_PATH -idirafter $ORCHESTRA_ROOT/include -idirafter /usr/local/include -idirafter /usr/include/x86_64-linux-gnu -idirafter /usr/include" \
          CXXFLAGS="-w -ggdb3 -O3 --sysroot $INSTALL_LINK_ONLY_PATH -idirafter $ORCHESTRA_ROOT/include -idirafter /usr/local/include -idirafter /usr/include/x86_64-linux-gnu -idirafter /usr/include -std=gnu++11" \
          LDFLAGS="-L$INSTALL_LINK_ONLY_PATH/lib -L$ORCHESTRA_ROOT/lib -lrt --sysroot=$INSTALL_LINK_ONLY_PATH -Wl,-z,origin -Wl,--enable-new-dtags -fuse-ld=gold -Wl,-rpath,$RPATH_PLACEHOLDER/lib -Wl,-rpath,$RPATH_PLACEHOLDER/lib64/llvm/clang-release/lib/clang/12.0.0/lib/linux -static-libgcc -static-libstdc++ $BUILD_DIR/fake-libc-single-threaded.o -L$INSTALL_LINK_ONLY_PATH/lib64 --sysroot=$INSTALL_LINK_ONLY_PATH"
      "dependencies":
      - |-
        toolchain/aarch64/binutils
      - |-
        toolchain/host/binutils
      - |-
        toolchain/aarch64/musl~headers
      - |-
        toolchain/aarch64/linux-headers
      "install": "cd \"$BUILD_DIR\"\nmake ${JOBS:+-j$JOBS} \nmake install \n\nNEW_GCC_PATH=\"$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/aarch64-unknown-linux-musl/gcc-bin/7.3.0/\"\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/gcc\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/cc\"; then\n    ln -s gcc \"${DESTDIR}${NEW_GCC_PATH}/cc\"\n  fi\n\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/gcc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-gcc\"\n\n  cp -a \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/gcc/x86_64-pc-linux-gnu/7.3.0/*.{a,o} \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/\n\nfi\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/g++\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/c++\"; then\n    ln -s g++ \"${DESTDIR}${NEW_GCC_PATH}/c++\"\n  fi\n\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/g++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-g++\"\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/c++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-c++\"\n\nfi\n\nrm -f \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib64/libcc1.*\n\n# Fixinclude locates the wrong pthread.h\nfind \"${DESTDIR}${ORCHESTRA_ROOT}\" -type d -name include-fixed -exec rm -f {}/pthread.h \\;\n"
      "ndebug": !!bool |-
        true
    "stage2":
      "build_dependencies":
      - |-
        toolchain/aarch64/gcc~stage1
      - |-
        glibc
      - |-
        gmp
      - |-
        mpfr
      - |-
        mpc
      "configure": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/gcc/gcc-7.3.0/gcc-7.3.0.tar.gz
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-7.3.0-cfns-fix-mismatch-in-gnu_inline-attributes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-7.3.0-cpp-musl-support.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-7.3.0-fixes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-7.3.0-remove-dependency-on-libc_single_threaded.patch" "$SOURCE_DIR"
        sed -i 's|gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"|gcc_gxx_include_dir="/${gcc_gxx_without_sysroot#/}"|' "$SOURCE_DIR/gcc/configure"


        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR"

        echo 'char __libc_single_threaded __attribute__ ((weak));' > fake-libc-single-threaded.c
        gcc -c -fPIC -x c fake-libc-single-threaded.c -o "$BUILD_DIR/fake-libc-single-threaded.o"

        "$SOURCE_DIR/configure" \
          --host=x86_64-pc-linux-gnu \
          --build=x86_64-pc-linux-gnu \
          --target=aarch64-unknown-linux-musl \
          --prefix=$ORCHESTRA_ROOT \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/aarch64-unknown-linux-musl/gcc-bin/7.3.0 \
          --includedir=$ORCHESTRA_ROOT/lib/gcc/aarch64-unknown-linux-musl/7.3.0/include \
          --datadir=$ORCHESTRA_ROOT/share/gcc-data/aarch64-unknown-linux-musl/7.3.0 \
          --mandir=$ORCHESTRA_ROOT/share/gcc-data/aarch64-unknown-linux-musl/7.3.0/man \
          --infodir=$ORCHESTRA_ROOT/share/gcc-data/aarch64-unknown-linux-musl/7.3.0/info \
          --with-sysroot=$ORCHESTRA_ROOT/aarch64-unknown-linux-musl \
          --enable-obsolete \
          --enable-secureplt \
          --disable-werror \
          --disable-nls \
          --without-included-gettext \
          --enable-checking=release \
          --enable-libstdcxx-time \
          --enable-poison-system-directories \
          --disable-host-shared \
          --enable-shared \
          --disable-libatomic \
          --disable-bootstrap \
          --disable-multilib \
          --disable-altivec \
          --disable-fixed-point \
          --disable-libgcj \
          --disable-libgomp \
          --disable-libmudflap \
          --disable-libssp \
          --disable-libcilkrts \
          --disable-vtable-verify \
          --disable-libvtv \
          --disable-libquadmath \
          --disable-rpath \
          --enable-lto \